File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 1616
1717#include "barrier.h"
1818#include "util.h"
19+ #include "tests.h"
1920
2021/* 20ms to test deadlocks; All timings use multiples of this constant as
2122 * alarm/sleep timers. If this timeout is too small for slow machines to perform
@@ -419,19 +420,16 @@ TEST_BARRIER(test_barrier_pending_exit,
419420 TEST_BARRIER_WAIT_SUCCESS (pid2 ));
420421
421422int main (int argc , char * argv []) {
422- /*
423- * This test uses real-time alarms and sleeps to test for CPU races
424- * explicitly. This is highly fragile if your system is under load. We
425- * already increased the BASE_TIME value to make the tests more robust,
426- * but that just makes the test take significantly longer. Hence,
427- * disable the test by default, so it will not break CI.
428- */
429- if (argc < 2 )
430- return EXIT_TEST_SKIP ;
431-
423+ log_set_max_level (LOG_INFO );
432424 log_parse_environment ();
433425 log_open ();
434426
427+ if (!slow_tests_enabled ()) {
428+ log_notice ("%s: slow tests are disabled, exiting." ,
429+ program_invocation_short_name );
430+ return EXIT_TEST_SKIP ;
431+ }
432+
435433 test_barrier_sync ();
436434 test_barrier_wait_next ();
437435 test_barrier_wait_next_twice ();
You can’t perform that action at this time.
0 commit comments