diff --git a/.github/workflows/ci_pipe.yml b/.github/workflows/ci_pipe.yml index b8cf8cc89..6f6d95fb6 100644 --- a/.github/workflows/ci_pipe.yml +++ b/.github/workflows/ci_pipe.yml @@ -121,7 +121,7 @@ jobs: username: '$oauthtoken' password: ${{ secrets.NGC_API_KEY }} image: ${{ inputs.test_container }} - options: --cap-add=sys_nice + options: "--cap-add=sys_nice --cap-add=sys_ptrace" env: NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} PARALLEL_LEVEL: '10' diff --git a/ci/scripts/github/test.sh b/ci/scripts/github/test.sh index 87a06ea79..5cccec867 100755 --- a/ci/scripts/github/test.sh +++ b/ci/scripts/github/test.sh @@ -41,12 +41,7 @@ cmake -B build -G Ninja ${CMAKE_BUILD_ALL_FEATURES} . rapids-logger "Running C++ Tests" cd ${MRC_ROOT}/build set +e -# Tests known to be failing -# Issues: -# * test_mrc_private - https://github.com/nv-morpheus/MRC/issues/33 -# * nvrpc - https://github.com/nv-morpheus/MRC/issues/34 ctest --output-on-failure \ - --exclude-regex "test_mrc_private|nvrpc" \ --output-junit ${REPORTS_DIR}/report_ctest.xml CTEST_RESULTS=$? diff --git a/ci/scripts/github/test_codecov.sh b/ci/scripts/github/test_codecov.sh index 36e0c24c1..969c43153 100755 --- a/ci/scripts/github/test_codecov.sh +++ b/ci/scripts/github/test_codecov.sh @@ -44,9 +44,7 @@ set +e # Tests known to be failing # Issues: # * test_mrc_private - https://github.com/nv-morpheus/MRC/issues/33 -# * nvrpc - https://github.com/nv-morpheus/MRC/issues/34 ctest --output-on-failure \ - --exclude-regex "test_mrc_private|nvrpc" \ --output-junit ${REPORTS_DIR}/report_ctest.xml CTEST_RESULTS=$? diff --git a/cpp/mrc/CMakeLists.txt b/cpp/mrc/CMakeLists.txt index 2202cf70c..482eeb869 100644 --- a/cpp/mrc/CMakeLists.txt +++ b/cpp/mrc/CMakeLists.txt @@ -194,6 +194,10 @@ target_compile_definitions(libmrc $<$:MRC_ENABLE_BENCHMARKING> ) +if (MRC_ENABLE_CODECOV) + target_compile_definitions(libmrc INTERFACE "MRC_CODECOV_ENABLED") +endif() + target_compile_features(libmrc PUBLIC cxx_std_20) set_target_properties(libmrc PROPERTIES OUTPUT_NAME ${PROJECT_NAME}) diff --git a/cpp/mrc/src/internal/control_plane/server.cpp b/cpp/mrc/src/internal/control_plane/server.cpp index 49ef83b0c..ecc0e3fd9 100644 --- a/cpp/mrc/src/internal/control_plane/server.cpp +++ b/cpp/mrc/src/internal/control_plane/server.cpp @@ -603,8 +603,8 @@ void Server::drop_stream(const stream_id_t& stream_id) auto search = m_connections.streams().find(stream_id); if (search == m_connections.streams().end()) { - LOG(WARNING) << "attempting to drop stream_id: " << stream_id - << " which is not found in set of connected streams"; + LOG(FATAL) << "attempting to drop stream_id: " << stream_id + << " which is not found in set of connected streams"; } auto writer = search->second->writer(); diff --git a/cpp/mrc/src/tests/common.hpp b/cpp/mrc/src/tests/common.hpp index 1773594d1..45bb03342 100644 --- a/cpp/mrc/src/tests/common.hpp +++ b/cpp/mrc/src/tests/common.hpp @@ -17,10 +17,20 @@ #pragma once +#include + +#include #include #include namespace mrc { + +#ifdef MRC_CODECOV_ENABLED + #define SKIP_IF_CODE_COV() GTEST_SKIP() << "Skipping test when code coverage is enabled"; +#else + #define SKIP_IF_CODE_COV() +#endif + class Options; } // namespace mrc namespace mrc::internal::system { diff --git a/cpp/mrc/src/tests/test_expected.cpp b/cpp/mrc/src/tests/test_expected.cpp index 10204240a..366bfccae 100644 --- a/cpp/mrc/src/tests/test_expected.cpp +++ b/cpp/mrc/src/tests/test_expected.cpp @@ -108,7 +108,7 @@ TEST_F(TestExpected, Chaining3) EXPECT_FALSE(rc); EXPECT_EQ(rc.error().message(), "void fail"); - EXPECT_ANY_THROW(rc->value()); + EXPECT_ANY_THROW(rc.value()); } TEST_F(TestExpected, UniquePointer) diff --git a/cpp/mrc/src/tests/test_ucx.cpp b/cpp/mrc/src/tests/test_ucx.cpp index abf9e249f..6f10ceb8a 100644 --- a/cpp/mrc/src/tests/test_ucx.cpp +++ b/cpp/mrc/src/tests/test_ucx.cpp @@ -15,6 +15,8 @@ * limitations under the License. */ +#include "common.hpp" + #include "internal/ucx/all.hpp" #include "internal/ucx/endpoint.hpp" @@ -72,6 +74,9 @@ TEST_F(TestUCX, CreateWorkerAddress) TEST_F(TestUCX, EndpointsInProcess) { + // note this test really should use a progress engine + GTEST_SKIP(); + auto worker_1 = std::make_shared(m_context); auto worker_2 = std::make_shared(m_context); @@ -107,6 +112,8 @@ static void rdma_get_callback(void* request, ucs_status_t status, void* user_dat TEST_F(TestUCX, Get) { + SKIP_IF_CODE_COV() + auto context = std::make_shared(); auto worker_get_src = std::make_shared(context); @@ -205,6 +212,8 @@ class SendRecvManager TEST_F(TestUCX, Recv) { + SKIP_IF_CODE_COV(); + auto context = std::make_shared(); auto worker_src = std::make_shared(context); @@ -279,6 +288,8 @@ TEST_F(TestUCX, Recv) TEST_F(TestUCX, Recv2) { + SKIP_IF_CODE_COV(); + auto context = std::make_shared(); auto worker_src = std::make_shared(context); diff --git a/cpp/mrc/tests/test_mrc.hpp b/cpp/mrc/tests/test_mrc.hpp index af2b17357..0dd9f93d8 100644 --- a/cpp/mrc/tests/test_mrc.hpp +++ b/cpp/mrc/tests/test_mrc.hpp @@ -26,6 +26,7 @@ #include #include #include +#include #include // for mutex & unique_lock #define TEST_CLASS(name) \ @@ -33,6 +34,13 @@ {} namespace mrc { + +#ifdef MRC_CODECOV_ENABLED + #define SKIP_IF_CODE_COV() GTEST_SKIP() << "Skipping test when code coverage is enabled"; +#else + #define SKIP_IF_CODE_COV() +#endif + // class that records when it's moved/copied struct CopyMoveCounter {