summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-08-01 07:58:45 -0600
committerTom Rini <trini@konsulko.com>2022-09-02 16:21:44 -0400
commitea94d053e19ee3341301cf999a8dd78e37b83cca (patch)
tree94bfae9af3d2f92815effcd7351db40577a32af5 /doc
parente033c180d0327e8fa791660ae26cdebd5e400153 (diff)
test: Allow running tests multiple times
Some tests can have race conditions which are hard to detect on a single one. Add a way to run tests more than once, to help with this. Each individual test is run the requested number of times before moving to the next test. If any runs failed, a message is shown. This is most useful when running a single test, since running all tests multiple times can take a while. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/develop/tests_sandbox.rst24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/develop/tests_sandbox.rst b/doc/develop/tests_sandbox.rst
index 40cf8ecdd7..8e42a32afb 100644
--- a/doc/develop/tests_sandbox.rst
+++ b/doc/develop/tests_sandbox.rst
@@ -119,6 +119,30 @@ You can easily use gdb on these tests, without needing --gdbserver::
You can then single-step and look at variables as needed.
+Running tests multiple times
+----------------------------
+
+Some tests can have race conditions which are hard to detect on a single
+one. It is possible to run each individual test multiple times, before moving
+to the next test, with the '-r' flag.
+
+This is most useful when running a single test, since running all tests
+multiple times can take a while.
+
+For example::
+
+ => ut dm -r1000 dm_test_rtc_set_get
+ ...
+ Test: dm_test_rtc_set_get: rtc.c (flat tree)
+ Test: dm_test_rtc_set_get: rtc.c
+ test/dm/rtc.c:257, dm_test_rtc_reset(): old_base_time == base_time: Expected 0x62e7453c (1659323708), got 0x62e7453d (1659323709)
+ Test: dm_test_rtc_set_get: rtc.c (flat tree)
+ Test: dm_test_rtc_set_get: rtc.c
+ Test: dm_test_rtc_set_get: rtc.c (flat tree)
+ ...
+ Test dm_test_rtc_reset failed 3 times
+
+
Running sandbox_spl tests directly
----------------------------------