21 Commits

Author SHA1 Message Date
Tim Blechmann
7d37abb303 CMake: add option for increasing the stresstest threshold 2025-04-06 10:16:01 +08:00
Tim Blechmann
6a70a658aa modernisation: use c++14 where possible 2024-05-03 21:45:54 +08:00
Tim Blechmann
bafa33be67 tests: cleanups 2023-11-03 14:59:50 +08:00
Tim Blechmann
8b25ed24db tests: use modern boost.test macros 2023-11-03 14:59:50 +08:00
Tim Blechmann
e3b6eb8d1f tests: silence warnings 2023-11-03 14:59:50 +08:00
Tim Blechmann
3ccac29ae3 import pre-commit and clang-format 2023-11-03 14:59:50 +08:00
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
Tim Blechmann
dcaba572e8 testsuite: avoid namespace std 2018-03-28 10:08:50 +02:00
Daniela Engert
582b27bf0b Fix compilation errors regarding undefined symbol 'cout' because of missing include <iostream>.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2017-05-12 17:27:31 +02:00
Tim Blechmann
4c5b485068 lockfree: fix race condition in testsuite
[SVN r82169]
2012-12-22 15:50:31 +00:00
Tim Blechmann
7afb51f7af lockfree: test fixes
[SVN r82145]
2012-12-21 13:04:10 +00:00
Tim Blechmann
54ec924cd7 lockfree: fix race condition in testsuite
thanks to peter dimov!

[SVN r82104]
2012-12-19 19:23:55 +00:00
Tim Blechmann
1aa72418bc lockfree: testsuite cleanup
[SVN r81742]
2012-12-06 15:41:40 +00:00
Tim Blechmann
5c35fb4117 lockfree: fix test case on certain compilers
[SVN r81741]
2012-12-06 14:12:48 +00:00
Tim Blechmann
1c67ecf90f lockfree: cleanups in testsuite
[SVN r81317]
2012-11-13 10:59:27 +00:00
Tim Blechmann
c732d7fd31 lockfree: relax stress tests
the testsuite seems to take too much time for some test farm machines

Signed-off-by: Tim Blechmann <tim@klingt.org>

[SVN r80666]
2012-09-23 12:32:49 +00:00
Tim Blechmann
e72bba543b lockfree: fix some inspect warnings
[SVN r80465]
2012-09-09 13:12:43 +00:00
Tim Blechmann
834b3b95c0 lockfree: replace not by ! to allow compilation with msvc
Signed-off-by: Tim Blechmann <tim@klingt.org>

[SVN r79313]
2012-07-06 10:25:47 +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
86019acfbb lockfree: testsuite compile fix
Signed-off-by: Tim Blechmann <tim@klingt.org>

[SVN r79217]
2012-07-01 21:26:55 +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