Commit Graph

7 Commits

Author SHA1 Message Date
liang zhou
4ef74379c2 Why modify freelist_test.cpp and test_common.hpp :
In VxWorks Kernel, the re-schedule mechanism does not enable "round-robin" reschdule between the same priority tasks by default. So the case "stack_unbounded_stress_test" will lead to test case hang forever. Here's the details:

The test case creates 4 tasks as “Reader”, and then 4 tasks as “Writer”, all those 8 task has the same priority 220.
If the target has 2 cores, the first 2 reader tasks will occupy the cores by “while (1)” without yield, so the other 2 readers tasks and 4 writers tasks have no chance to be run.
This will lead to the test case loop forever , then the exp scrip will catch it and print “RTP Execution Timeout; rebooting”

The test case creates 4 tasks as “Reader”, and then 4 tasks as “Writer”, all those 8 task has the same priority 220 in VxWorks Kernel.
If the target has 2 cores, the first 2 reader tasks will occupy the cores by “while (1)” without yield, so the other 2 readers tasks and 4 writers tasks have no chance to be run.
This will lead to the test case loop forever without any ending.

Why modify spsc_queue_stress_test.cpp :
In VxWorks user-land task (Wind River calls it as RTP), the max number of objects (the internal data structure RTP uses) in one RTP is limited at most 65535.
When the test is selected to run, the C++ constructor will create 1<<16 number of mutex via "new spsc_queue_tester".
And after test1->run() is finished, the C++ destructor will delete 1<<16 number of mutex by default.
This caused the problem, because VxWorks just support ((1<<16)-1) objects within an RTP.
2018-11-12 15:25:39 +08:00
Marcel Raad
9b127e5da9 Add missing includes
This fixes the compile breaks in the regression tests.
2014-09-29 17:49:03 +02:00
Tim Blechmann
18af8efb28 lockfree: relax freelist tests
[SVN r80700]
2012-09-25 14:05:56 +00:00
Tim Blechmann
06799ee657 lockfree: testsuite - avoid stack-allocation of tester classes
Signed-off-by: Tim Blechmann <tim@klingt.org>

[SVN r79345]
2012-07-08 08:35:18 +00:00
Tim Blechmann
8d9dca0e46 lockfree: fix some compiler warnings & relax stress tests
Signed-off-by: Tim Blechmann <tim@klingt.org>

[SVN r79247]
2012-07-03 17:17:54 +00:00
Tim Blechmann
dbbea5f705 lockfree: work around thread/exception/parameter vs test compile issue
Signed-off-by: Tim Blechmann <tim@klingt.org>

[SVN r79197]
2012-07-01 08:38:43 +00:00
Tim Blechmann
f8298d22bd lockfree: import boost.lockfree with boost.atomic as implementation detail
Signed-off-by: Tim Blechmann <tim@klingt.org>

[SVN r79195]
2012-07-01 08:37:57 +00:00