diff --git a/.github/workflows/linux_valgrind.yml b/.github/workflows/linux_valgrind.yml index e27cde797..db593fc9f 100644 --- a/.github/workflows/linux_valgrind.yml +++ b/.github/workflows/linux_valgrind.yml @@ -58,6 +58,7 @@ jobs: shell: bash run: | cmake --build build --target tests.unit.modules.execution + cmake --build build --target std_thread_scheduler_test - name: Test shell: bash run: | diff --git a/libs/pika/execution/include/pika/execution/algorithms/ensure_started.hpp b/libs/pika/execution/include/pika/execution/algorithms/ensure_started.hpp index b02e51c3f..2f9eccbfe 100644 --- a/libs/pika/execution/include/pika/execution/algorithms/ensure_started.hpp +++ b/libs/pika/execution/include/pika/execution/algorithms/ensure_started.hpp @@ -158,14 +158,14 @@ namespace pika::ensure_started_detail { template friend void tag_invoke(pika::execution::experimental::set_error_t, - ensure_started_receiver&& r, Error&& error) noexcept + ensure_started_receiver r, Error&& error) noexcept { r.state->v.template emplace(error_type(PIKA_FORWARD(Error, error))); r.state->set_predecessor_done(); } friend void tag_invoke(pika::execution::experimental::set_stopped_t, - ensure_started_receiver&& r) noexcept + ensure_started_receiver r) noexcept { r.state->set_predecessor_done(); }; @@ -188,7 +188,7 @@ namespace pika::ensure_started_detail { template friend auto tag_invoke(pika::execution::experimental::set_value_t, - ensure_started_receiver&& r, Ts&&... ts) noexcept + ensure_started_receiver r, Ts&&... ts) noexcept -> decltype(std::declval< pika::detail::variant>() .template emplace( diff --git a/libs/pika/executors/tests/unit/CMakeLists.txt b/libs/pika/executors/tests/unit/CMakeLists.txt index 0f856125d..ae592e8c6 100644 --- a/libs/pika/executors/tests/unit/CMakeLists.txt +++ b/libs/pika/executors/tests/unit/CMakeLists.txt @@ -20,6 +20,8 @@ set(tests thread_pool_scheduler ) +set(std_thread_scheduler_PARAMETERS VALGRIND) + # nvc++ causes test failures in release mode. This is assumed to be a code # generation bug. if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") @@ -33,8 +35,6 @@ endif() foreach(test ${tests}) set(sources ${test}.cpp) - set(${test}_PARAMETERS THREADS 4) - source_group("Source Files" FILES ${sources}) set(folder_name "Tests/Unit/Modules/Executors") @@ -47,6 +47,7 @@ foreach(test ${tests}) FOLDER ${folder_name} ) - pika_add_unit_test("modules.executors" ${test} ${${test}_PARAMETERS}) - + pika_add_unit_test( + "modules.executors" ${test} ${${test}_PARAMETERS} THREADS 4 + ) endforeach()