diff options
| author | bors <bors@rust-lang.org> | 2023-05-12 12:19:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-12 12:19:07 +0000 |
| commit | cd5f8b4f70b403413ea44ea6e81a228412b47829 (patch) | |
| tree | ed951c028f936d2c1871719cb0f8ac7d6603b622 | |
| parent | 81a4c1d58d7ecbb8870f723b09f9f1a9fcbefdcc (diff) | |
| parent | 18fd17d2cd88c8ecd250ca8dbb20a29ad79b30b3 (diff) | |
| download | rust-cd5f8b4f70b403413ea44ea6e81a228412b47829.tar.gz rust-cd5f8b4f70b403413ea44ea6e81a228412b47829.zip | |
Auto merge of #2892 - RalfJung:rustup, r=RalfJung
Rustup
| -rw-r--r-- | src/bootstrap/test.rs | 21 | ||||
| -rwxr-xr-x | src/tools/miri/ci.sh | 3 | ||||
| -rw-r--r-- | src/tools/miri/rust-version | 2 |
3 files changed, 21 insertions, 5 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 854b7f5bd3a..374b6cafcac 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -613,6 +613,21 @@ impl Step for Miri { builder.run(&mut cargo); } + // Run it again for mir-opt-level 4 to catch some miscompilations. + if builder.config.test_args().is_empty() { + cargo.env("MIRIFLAGS", "-O -Zmir-opt-level=4 -Cdebug-assertions=yes"); + // Optimizations can change backtraces + cargo.env("MIRI_SKIP_UI_CHECKS", "1"); + // Optimizations can change error locations and remove UB so don't run `fail` tests. + cargo.args(&["tests/pass", "tests/panic"]); + + let mut cargo = prepare_cargo_test(cargo, &[], &[], "miri", compiler, target, builder); + { + let _time = util::timeit(&builder); + builder.run(&mut cargo); + } + } + // # Run `cargo miri test`. // This is just a smoke test (Miri's own CI invokes this in a bunch of different ways and ensures // that we get the desired output), but that is sufficient to make sure that the libtest harness @@ -644,8 +659,10 @@ impl Step for Miri { cargo.env("RUST_BACKTRACE", "1"); let mut cargo = Command::from(cargo); - let _time = util::timeit(&builder); - builder.run(&mut cargo); + { + let _time = util::timeit(&builder); + builder.run(&mut cargo); + } } } diff --git a/src/tools/miri/ci.sh b/src/tools/miri/ci.sh index 76cc2e94927..b5b3b211b05 100755 --- a/src/tools/miri/ci.sh +++ b/src/tools/miri/ci.sh @@ -45,8 +45,7 @@ function run_tests { # them. Also error locations change so we don't run the failing tests. # We explicitly enable debug-assertions here, they are disabled by -O but we have tests # which exist to check that we panic on debug assertion failures. - #FIXME: Disabled due to <https://github.com/rust-lang/rust/issues/111422>. - #MIRIFLAGS="${MIRIFLAGS:-} -O -Zmir-opt-level=4 -Cdebug-assertions=yes" MIRI_SKIP_UI_CHECKS=1 ./miri test -- tests/{pass,panic} + MIRIFLAGS="${MIRIFLAGS:-} -O -Zmir-opt-level=4 -Cdebug-assertions=yes" 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 diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version index 6ff63155f71..42687826b02 100644 --- a/src/tools/miri/rust-version +++ b/src/tools/miri/rust-version @@ -1 +1 @@ -699a862a3d4e4a2d5603c93297c0c44021ea72f5 +0b795044c6f0854445f1f2bb6443e87848e150d1 |
