Hi!
In my project I wrote some addons for CppUnit for
multithreaded tests with ability to detect deadlocks...
So if u interesting in it I may send some sources to
u... In general it look like:
class ThreadedTestCaller_tester : public
CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE(ThreadedTestCaller_tester);
CPPUNIT_DEADLOCK_TEST(forever_loop, 500,
CppUnit::FAIL_IF_NOT_DEADLOCK);
CPPUNIT_DEADLOCK_TEST(just_return, 500,
CppUnit::FAIL_IF_DEADLOCK);
CPPUNIT_MULTITHREADED_TEST_BEGIN(1000,
CppUnit::FAIL_IF_DEADLOCK);
CPPUNIT_TEST_THREAD_ORD(waiter, 1);
CPPUNIT_TEST_THREAD_ORD(signaler, 2);
CPPUNIT_TEST_THREAD(default_priority_thread);
CPPUNIT_MULTITHREADED_TEST_END();
CPPUNIT_TEST_SUITE_END();
...
};
it very help me to test some tricky locking code and
simulate multi node tests ...
Logged In: YES
user_id=572001
Can anything be reused for this use case?
http://en.wikipedia.org/wiki/List_of_multi-threading_libraries
Logged In: NO
can you please send the code to support multithreading to
cppUnit?