Skip to content

Commit ee12232

Browse files
committed
Test with -Zmiri-provenance-gc=1 on Linux
1 parent 0ec82fa commit ee12232

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@ cat /tmp/toolstate/toolstates.json
2525
python3 "$X_PY" test --stage 2 check-tools
2626
python3 "$X_PY" test --stage 2 src/tools/clippy
2727
python3 "$X_PY" test --stage 2 src/tools/rustfmt
28-
python3 "$X_PY" test --stage 2 src/tools/miri
28+
29+
# Testing Miri is a bit more complicated.
30+
# We set the GC interval to the shortest possible value (0 would be off) to increase the chance
31+
# that bugs which only surface when the GC runs at a specific time are more likely to cause CI to fail.
32+
# This significantly increases the runtime of our test suite, or we'd do this in PR CI too.
33+
if [[ -z "${PR_CI_JOB}" ]]; then
34+
MIRIFLAGS=-Zmiri-provenance-gc=1 python3 "$X_PY" test --stage 2 src/tools/miri
35+
else
36+
python3 "$X_PY" test --stage 2 src/tools/miri
37+
fi
2938
# We natively run this script on x86_64-unknown-linux-gnu and x86_64-pc-windows-msvc.
3039
# Also cover some other targets via cross-testing, in particular all tier 1 targets.
3140
export BOOTSTRAP_SKIP_TARGET_SANITY=1 # we don't need `cc` for these targets

src/tools/miri/tests/pass/0weak_memory_consistency.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
//@compile-flags: -Zmiri-ignore-leaks -Zmiri-disable-stacked-borrows
1+
//@compile-flags: -Zmiri-ignore-leaks -Zmiri-disable-stacked-borrows -Zmiri-provenance-gc=10000
2+
// This test's runtime explodes if the GC interval is set to 1 (which we do in CI), so we
3+
// override it internally back to the default frequency.
24

35
// The following tests check whether our weak memory emulation produces
46
// any inconsistent execution outcomes

0 commit comments

Comments
 (0)