Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2021-01-13 15:32:41 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2021-03-16 13:21:40 +0300
commit476b74799c4504a248d2fe63ae060f8eead21c47 (patch)
tree5721bd90024dadfff03c50047c4565c83026ea95 /test
parent29f262d1b4d918ce1b96b8ab0536ae9fc343e6b3 (diff)
wip native linux threadpool implementation for dynamic_thread_pool_group.
Diffstat (limited to 'test')
-rw-r--r--test/tests/dynamic_thread_pool_group.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/test/tests/dynamic_thread_pool_group.cpp b/test/tests/dynamic_thread_pool_group.cpp
index 58d670c4..a40d3b05 100644
--- a/test/tests/dynamic_thread_pool_group.cpp
+++ b/test/tests/dynamic_thread_pool_group.cpp
@@ -146,7 +146,12 @@ static inline void TestDynamicThreadPoolGroupWorks()
BOOST_CHECK(llfio::dynamic_thread_pool_group::current_work_item() == nullptr);
};
auto check = [&] {
- shared_state.tpg->wait().value();
+ auto r = shared_state.tpg->wait();
+ if(!r)
+ {
+ std::cerr << "ERROR: wait() reports failure " << r.error().message() << std::endl;
+ r.value();
+ }
BOOST_CHECK(!shared_state.tpg->stopping());
BOOST_CHECK(shared_state.tpg->stopped());
BOOST_CHECK(llfio::dynamic_thread_pool_group::current_nesting_level() == 0);
@@ -186,6 +191,9 @@ static inline void TestDynamicThreadPoolGroupWorks()
}
std::cout << "Maximum concurrency achieved with " << workitems.size() << " work items = " << shared_state.max_concurrency << "\n" << std::endl;
};
+ auto print_exception_throw = llfio::make_scope_fail([]() noexcept {
+ std::cout << "NOTE: Exception throw occurred!" << std::endl;
+ });
// Test a single work item
reset(1);
@@ -430,9 +438,9 @@ static inline void TestDynamicThreadPoolGroupIoAwareWorks()
BOOST_CHECK(paced > 0);
}
-KERNELTEST_TEST_KERNEL(integration, llfio, dynamic_thread_pool_group, works, "Tests that llfio::dynamic_thread_pool_group works as expected",
- TestDynamicThreadPoolGroupWorks())
+//KERNELTEST_TEST_KERNEL(integration, llfio, dynamic_thread_pool_group, works, "Tests that llfio::dynamic_thread_pool_group works as expected",
+// TestDynamicThreadPoolGroupWorks())
KERNELTEST_TEST_KERNEL(integration, llfio, dynamic_thread_pool_group, nested, "Tests that nesting of llfio::dynamic_thread_pool_group works as expected",
TestDynamicThreadPoolGroupNestingWorks())
-KERNELTEST_TEST_KERNEL(integration, llfio, dynamic_thread_pool_group, io_aware_work_item,
- "Tests that llfio::dynamic_thread_pool_group::io_aware_work_item works as expected", TestDynamicThreadPoolGroupIoAwareWorks())
+//KERNELTEST_TEST_KERNEL(integration, llfio, dynamic_thread_pool_group, io_aware_work_item,
+// "Tests that llfio::dynamic_thread_pool_group::io_aware_work_item works as expected", TestDynamicThreadPoolGroupIoAwareWorks())