From c5c02b532001a9981bc2ee026340b6ecda08c13f Mon Sep 17 00:00:00 2001 From: "Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)" Date: Tue, 25 May 2021 13:08:07 +0100 Subject: Fix CI failures in last commit. --- .github/workflows/unittests_linux.yml | 2 +- test/tests/dynamic_thread_pool_group.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unittests_linux.yml b/.github/workflows/unittests_linux.yml index 3cb81b81..c395b445 100644 --- a/.github/workflows/unittests_linux.yml +++ b/.github/workflows/unittests_linux.yml @@ -28,7 +28,7 @@ jobs: - name: CMake tests Linux shell: bash run: | - sudo apt-get remove -y libstdc++-10-dev g++-10 gcc-10 + sudo apt-get remove -y libstdc++-11-dev g++-11 gcc-11 sudo apt-get autoremove if [ "${{ matrix.compiler }}" = "libc++" ]; then wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -; diff --git a/test/tests/dynamic_thread_pool_group.cpp b/test/tests/dynamic_thread_pool_group.cpp index fa641bb6..99ae5951 100644 --- a/test/tests/dynamic_thread_pool_group.cpp +++ b/test/tests/dynamic_thread_pool_group.cpp @@ -239,7 +239,7 @@ static inline void TestDynamicThreadPoolGroupWorkItemDelayWorks() { using _base = llfio::dynamic_thread_pool_group::work_item; shared_state_t *shared{nullptr}; - const size_t myidx; + const size_t myidx{0}; work_item() = default; explicit work_item(shared_state_t *_shared, size_t _myidx) @@ -313,7 +313,11 @@ static inline void TestDynamicThreadPoolGroupWorkItemDelayWorks() std::cout << " " << shared_state.within_100ms << " delayed work items were scheduled within 100ms of request." << std::endl; std::cout << " " << shared_state.over_100ms << " delayed work items were scheduled over 100ms of request." << std::endl; BOOST_CHECK(shared_state.within_1ms > 0); +#ifdef __APPLE__ + BOOST_CHECK(shared_state.over_100ms < 40); // Mac OS appears to apply significant slop to timers +#else BOOST_CHECK(shared_state.over_100ms < 10); +#endif } static inline void TestDynamicThreadPoolGroupNestingWorks() -- cgit v1.2.3