diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 6feb1662..b1568cd5 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -245,4 +245,6 @@ jobs: shell: bash # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest --output-on-failure -C $BUILD_TYPE + run: | + ctest --output-on-failure -C $BUILD_TYPE && \ + ctest -V -R '^async auto reset event tests-multi-threaded$' diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f5afecd1..a67428d6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -47,7 +47,7 @@ if(WIN32) ) else() # let more time for some tests - set(async_auto_reset_event_tests_TIMEOUT 60) + set(async_auto_reset_event_tests_TIMEOUT 200) endif() foreach(test ${tests}) diff --git a/test/async_auto_reset_event_tests.cpp b/test/async_auto_reset_event_tests.cpp index 32cdb42b..cf8fe775 100644 --- a/test/async_auto_reset_event_tests.cpp +++ b/test/async_auto_reset_event_tests.cpp @@ -102,6 +102,18 @@ TEST_CASE("multi-threaded") co_await tp.schedule(); co_await event; ++value; + + thread_local volatile bool nested = false; + + if (nested) + { + co_await tp.schedule(); + assert(!nested); + } + + nested = true; + cppcoro::scoped_lambda cleanup = [] { nested = false; }; + event.set(); };