Commit Graph

6686 Commits

Author SHA1 Message Date
Ralf Jung
7cd1d78a47 only complain about runtime toolchain mismatch when there actually is a runtime toolchain 2022-07-21 09:30:09 -04:00
Ralf Jung
800273c1d9 cargo-miri: set RUSTC to us 2022-07-21 09:20:46 -04:00
bors
3800933ff0 Auto merge of #2383 - rust-lang:dot_mode, r=oli-obk
Print one . character per test instead of one line

`./miri bless -- --quiet` now prints a dot per test, along with the regular Rust unit tests that listen to this flag
2022-07-21 07:40:32 +00:00
Oli Scherer
ecacc56843 Use names suggestive of channel endpoints 2022-07-21 07:39:54 +00:00
Oli Scherer
68041b42fc Print one character per test instead of one line 2022-07-21 07:35:49 +00:00
Oli Scherer
30931eeecb Add a dedicated thread for output printing 2022-07-21 07:35:49 +00:00
bors
084e02fd08 Auto merge of #2398 - sunshowers:nextest-compat, r=RalfJung
[cargo-miri] support nextest

Add the ability to run `cargo miri nextest list` and `cargo miri nextest run`.

[cargo-nextest](https://nexte.st) is a new test runner for Rust maintained mostly by myself. It has several new features, but the most relevant to miri is the fact that it runs [each test in its own process](https://nexte.st/book/how-it-works.html#the-nextest-model). This gives miri users better leak detection (https://github.com/rust-lang/miri/issues/1481) for free, for example.

See https://github.com/nextest-rs/nextest/issues/181 for discussion, including comments by `@eddyb` and `@RalfJung.`

Future work might be to have miri read [the list of tests](https://docs.rs/nextest-metadata/latest/nextest_metadata/struct.TestListSummary.html) (or [test binaries](https://docs.rs/nextest-metadata/latest/nextest_metadata/struct.BinaryListSummary.html)) generated by `nextest list`. `@eddyb` thinks that might be useful.

I tested `cargo miri nextest run` against smallvec, and it worked great.

Note: Running tests out of archives is currently broken, as the comment in run-test.py explains.
2022-07-21 01:52:14 +00:00
Rain
88ad9ca906 [cargo-miri] support nextest
Add the ability to run the `list` and `run` nextest commands, which
enable per-test isolation.
2022-07-20 18:44:20 -07:00
bors
9ecdc9ea61 Auto merge of #2381 - rust-lang:infra, r=RalfJung
Add a scheme for always using the default toolchain, running clippy and fmt before running any other command

I keep forgetting to run rustup-toolchain on rebases across toolchain updates

I also keep forgetting to run rustfmt and clippy. The former isn't run by vscode if I don't explicitly save (I have autosave on).
2022-07-21 00:38:37 +00:00
Ralf Jung
4d4eeca8a8 fix miri script 2022-07-20 20:38:08 -04:00
Oli Scherer
517e1d78b8 Add a scheme for always using the default toolchain, running clippy and fmt before running any other command 2022-07-20 20:38:08 -04:00
bors
e8c4c9af9c Auto merge of #2404 - RalfJung:mix, r=RalfJung
check for extern static size mismatches

Also handle get_alloc_extra the same throughout Stacked Borrows. I don't think this `unwrap` can actually cause an ICE since another part of SB will raise an error before, but still, seems strange to do this inconsistently in retagging vs expose_ptr.
2022-07-20 22:32:41 +00:00
Ralf Jung
9f99d10689 some stray tag → prov renames 2022-07-20 18:32:03 -04:00
Ralf Jung
e649a9acfb check for extern static size mismatches 2022-07-20 18:32:03 -04:00
Ralf Jung
59f9a918ed handle get_alloc_extra the same throughout Stacked Borrows 2022-07-20 17:57:31 -04:00
bors
167e5dcad3 Auto merge of #2403 - RalfJung:rustup, r=RalfJung
rustup
2022-07-20 20:11:10 +00:00
Ralf Jung
ff4666f39c rustup 2022-07-20 16:02:06 -04:00
bors
7975391808 Auto merge of #2402 - RalfJung:cargo-target, r=RalfJung
cargo-miri: reorder --target to after the user-defined commands

This should help with https://github.com/rust-lang/miri/pull/2398.
2022-07-20 19:47:48 +00:00
Ralf Jung
c81cfe240a cargo-miri: reorder --target to after the user-defined commands 2022-07-20 15:47:09 -04:00
bors
1366bf6b07 Auto merge of #2373 - rust-lang:test_dependencies, r=RalfJung
Allow ui tests to have dependencies in a reliable way

This completely sidesteps the issue that compiletest-rs has where old artifacts of a dependency cause `multiple available crates of name XXX` errors. At this point I think we've reached feature parity for clippy, too, so I'm going to try publishing a version once this is merged.
2022-07-20 15:59:21 +00:00
Oli Scherer
ab6fb9d2aa Allow tests to have dependencies 2022-07-20 15:54:35 +00:00
bors
d5e199f441 Auto merge of #2401 - RalfJung:dyn, r=RalfJung
fix test file name

Would be better to run this test when doing `./miri test dyn`.
2022-07-20 15:27:42 +00:00
Ralf Jung
e0514508b4 fix test file name 2022-07-20 11:27:04 -04:00
bors
0844e46049 Auto merge of #2391 - RalfJung:stderr, r=oli-obk
on an error, always print the unnormalized stderr

Currently we skip this if a stderr diff was printed, but the stderr diff is normalized, so e.g. one cannot learn line numbers from it.

Is there a way to get the diff to only print the parts the differ, like a usual `diff -u`? Currently it always seems to print the full output, so with a long stderr we now get doubly long test results even if the diff is actually rather small.
2022-07-20 12:39:21 +00:00
bors
90fbdadade Auto merge of #2399 - RalfJung:subcommands, r=RalfJung
no need for an exhaustive enum of subcommands
2022-07-20 11:43:38 +00:00
Ralf Jung
e12a721d84 no need for an exhaustive enum of subcommands 2022-07-20 07:42:56 -04:00
bors
ebda1deb7b Auto merge of #2397 - RalfJung:cleanup, r=RalfJung
only do env var cleanup if all threads have stopped

Hopefully fixes https://github.com/rust-lang/miri/issues/2396
2022-07-20 02:12:09 +00:00
Ralf Jung
5fbf036670 only do env var cleanup if all threads have stopped 2022-07-19 21:44:45 -04:00
bors
ddde70c121 Auto merge of #2394 - saethlin:unique-range-ice, r=RalfJung
Fix bugs where unique_range became invalid

And also expand the cache integrity checks to cover this case.

I'm going to run this over all the ICEs I've gotten out of Miri recently, could be a bit.

Fixes https://github.com/rust-lang/miri/issues/2389
2022-07-20 01:39:40 +00:00
Ben Kimock
4268918a50 Clarify implementation a bit 2022-07-19 20:53:48 -04:00
Ben Kimock
3e93045c87 Add a minimal reproducer of the ICE
Co-authored-by: Ralf Jung <post@ralfj.de>
2022-07-19 20:23:30 -04:00
Ben Kimock
db93abe823 Fix bugs where unique_range became invalid
And also expand the cache integrity checks to cover this case, and
generally assert a lot more about the unique_range, then tighten up
sloppy implementation scenarios that this uncovered.
2022-07-19 20:02:20 -04:00
bors
9e37c488f3 Auto merge of #2395 - RalfJung:upcast, r=RalfJung
add some dyn upcasting tests

Copied from the rustc test suite.
2022-07-19 23:40:30 +00:00
Ralf Jung
4d220c31a4 add some dyn upcasting tests 2022-07-19 19:40:01 -04:00
bors
a7e51ac99e Auto merge of #2392 - RalfJung:rustup, r=RalfJung
rustup
2022-07-19 19:45:27 +00:00
Ralf Jung
5721927afe rustup 2022-07-19 15:44:47 -04:00
Ralf Jung
9f9aa00f5d tweak failure output a little 2022-07-19 14:44:00 -04:00
Ralf Jung
fb3ac74696 on an error, always print the unnormalized stderr 2022-07-19 14:40:17 -04:00
bors
e8095d0af4 Auto merge of #2390 - RalfJung:debug, r=RalfJung
fix some debugging papercuts

- detect when Miri got locally installed and is being run with the wrong toolchain
- when an ICE occurs, print a backtrace of where the interpreter was at the time
2022-07-19 18:15:05 +00:00
Ralf Jung
5cf7ed1e04 show where the interpreter was interpreting when an ICE occurs 2022-07-19 14:14:20 -04:00
Ralf Jung
9dba78a76b show a better error when running Miri with the wrong sysroot 2022-07-19 14:14:20 -04:00
bors
8757d866ab Auto merge of #2350 - RalfJung:remove-deprecated, r=oli-obk
remove deprecated options

These have been deprecated a month ago and nobody said they need them. Is that enough time? We can also let this PR sit a little.

Cc https://github.com/rust-lang/miri/issues/2187 https://github.com/rust-lang/miri/issues/2188
(keeping them open to track removing their supporting infrastructure in the core interpreter)
2022-07-19 12:29:29 +00:00
bors
9edbf3676b Auto merge of #2388 - RalfJung:rustup, r=RalfJung
rustup

Cc https://github.com/rust-lang/rust/issues/99461
2022-07-19 12:04:07 +00:00
Ralf Jung
1d5cfb565c rustup 2022-07-19 08:03:39 -04:00
bors
5bd59c8571 Auto merge of #2386 - RalfJung:xargo-atomic, r=RalfJung
cargo-miri: write the Xargo project files atomically

`@matthiaskrgr` this should fix https://github.com/rust-lang/miri/issues/2340. Any chance you could test this before we land it?
2022-07-19 11:17:12 +00:00
bors
eb7ea4c168 Auto merge of #2387 - RalfJung:ui-readme, r=oli-obk
update ui_test readme

I forgot to do that when changing the ignore/only syntax.
2022-07-19 09:26:14 +00:00
Ralf Jung
04b66ce342 update ui_test readme 2022-07-18 21:42:50 -04:00
Ralf Jung
56fefe19bf cargo-miri: write the Xargo project files atomically 2022-07-18 20:19:02 -04:00
bors
220df5f3cf Auto merge of #2385 - RalfJung:dev, r=RalfJung
use env vars, not Cargo.toml, to configure out dev profile

This should fix the cargo warnings we are seeing in rustc.
2022-07-18 21:49:32 +00:00
Ralf Jung
bfd148b783 use env vars, not Cargo.toml, to configure out dev profile 2022-07-18 17:48:45 -04:00