diff options
| author | Ralf Jung <post@ralfj.de> | 2022-11-28 08:48:49 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-11-28 08:58:21 +0100 |
| commit | 63eae2b30fcb249fd5cb412b5f23ee14a21dd192 (patch) | |
| tree | 8b0f34a50fd6de9c521a408544c05a1f28c162ff /src | |
| parent | ad9784eb3d5f4d68a378fce07d4c8707129310d9 (diff) | |
| download | rust-63eae2b30fcb249fd5cb412b5f23ee14a21dd192.tar.gz rust-63eae2b30fcb249fd5cb412b5f23ee14a21dd192.zip | |
add many-seeds capabilities to CI
Diffstat (limited to 'src')
| -rwxr-xr-x | src/tools/miri/ci.sh | 11 | ||||
| -rw-r--r-- | src/tools/miri/tests/many-seeds/scoped-thread-leak.rs | 8 |
2 files changed, 16 insertions, 3 deletions
diff --git a/src/tools/miri/ci.sh b/src/tools/miri/ci.sh index dd2d2abe35b..e455b482338 100755 --- a/src/tools/miri/ci.sh +++ b/src/tools/miri/ci.sh @@ -40,10 +40,15 @@ function run_tests { ./miri test if [ -z "${MIRI_TEST_TARGET+exists}" ]; then # Only for host architecture: tests with optimizations (`-O` is what cargo passes, but crank MIR - # optimizations up all the way). - # Optimizations change diagnostics (mostly backtraces), so we don't check them - #FIXME(#2155): we want to only run the pass and panic tests here, not the fail tests. + # optimizations up all the way, too). + # Optimizations change diagnostics (mostly backtraces), so we don't check + # them. Also error locations change so we don't run the failing tests. MIRIFLAGS="${MIRIFLAGS:-} -O -Zmir-opt-level=4" MIRI_SKIP_UI_CHECKS=1 ./miri test -- tests/{pass,panic} + + # Also run some many-seeds tests. 64 seeds means this takes around a minute per test. + for FILE in tests/many-seeds/*.rs; do + MIRI_SEEDS=64 CARGO_EXTRA_FLAGS="$CARGO_EXTRA_FLAGS -q" ./miri many-seeds ./miri run "$FILE" + done fi ## test-cargo-miri diff --git a/src/tools/miri/tests/many-seeds/scoped-thread-leak.rs b/src/tools/miri/tests/many-seeds/scoped-thread-leak.rs new file mode 100644 index 00000000000..f28e43696f7 --- /dev/null +++ b/src/tools/miri/tests/many-seeds/scoped-thread-leak.rs @@ -0,0 +1,8 @@ +//! Regression test for https://github.com/rust-lang/miri/issues/2629 +use std::thread; + +fn main() { + thread::scope(|s| { + s.spawn(|| {}); + }); +} |
