Skip to content

Commit c146b53

Browse files
committed
Allow openmp tests to re-run two times
Once llvm/llvm-project#141851 is merged, we can use the new lit-option `--max-retries-per-test=<POSTIVE_INT>` in order to re-run openmp tests. This change makes use of this option and configures it, so that openmp tests are re-run 4 times if needed. To prove that this works, we no longer filter out the flaky tests. Once llvm/llvm-project#142413 lands we can add `--show-attempts-count` to show how many attempts were actually needed. See also: * https://issues.redhat.com/browse/LLVM-145 * llvm/llvm-project#127796 * llvm/llvm-project#117773
1 parent faa5ec6 commit c146b53

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

llvm.spec

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2298,6 +2298,7 @@ export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_thread_handle.c"
22982298
unset LIT_XFAIL
22992299
%endif
23002300

2301+
%if %{maj_ver} < 21
23012302
# The following test is flaky and we'll filter it out
23022303
test_list_filter_out+=("libomp :: ompt/teams/distribute_dispatch.c")
23032304
test_list_filter_out+=("libomp :: affinity/kmp-abs-hw-subset.c")
@@ -2316,18 +2317,21 @@ test_list_filter_out+=("libomp :: worksharing/for/omp_collapse_one_int.c")
23162317
# Issue upstream: https://github.com/llvm/llvm-project/issues/127796
23172318
test_list_filter_out+=("libarcher :: races/task-two.c")
23182319
test_list_filter_out+=("libarcher :: races/lock-nested-unrelated.c")
2320+
%endif
23192321

23202322
%ifarch s390x
23212323
test_list_filter_out+=("libomp :: flush/omp_flush.c")
23222324
test_list_filter_out+=("libomp :: worksharing/for/omp_for_schedule_guided.c")
23232325
%endif
23242326

2327+
%if %{maj_ver} < 21
23252328
%ifarch aarch64 s390x
23262329
# The following test has been failing intermittently on aarch64 and s390x.
23272330
# Re-enable it after https://github.com/llvm/llvm-project/issues/117773
23282331
# gets fixed.
23292332
test_list_filter_out+=("libarcher :: races/taskwait-depend.c")
23302333
%endif
2334+
%endif
23312335

23322336
# The following tests seem pass on ppc64le and x86_64 and aarch64 only:
23332337
%ifnarch ppc64le x86_64 s390x aarch64
@@ -2429,6 +2433,20 @@ export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_2.c"
24292433

24302434
adjust_lit_filter_out test_list_filter_out
24312435

2436+
%if %{maj_ver} >= 21
2437+
# This allows openmp tests to be re-run 4 times. Once they pass
2438+
# after being re-run, they are marked as FLAKYPASS.
2439+
# See https://github.com/llvm/llvm-project/pull/141851 for the
2440+
# --max-retries-per-test option.
2441+
# We don't know if 4 is the right number to use here we just
2442+
# need to start with some number.
2443+
# Once https://github.com/llvm/llvm-project/pull/142413 landed
2444+
# we can add --show-attempts-count in order to see the exact
2445+
# number of attempts the tests needed to pass. And then we can
2446+
# adapt this number.
2447+
export LIT_OPTS="$LIT_OPTS --max-retries-per-test=4"
2448+
%endif
2449+
24322450
%if 0%{?rhel}
24332451
# libomp tests are often very slow on s390x brew builders
24342452
%ifnarch s390x

0 commit comments

Comments
 (0)