Commit Graph

6666 Commits

Author SHA1 Message Date
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
bors
b9c677112a Auto merge of #2382 - RalfJung:atomic, r=RalfJung
add support for new RMW orders

Implements support for https://github.com/rust-lang/rust/pull/98383.

Also restructure intrinsic shims a bit so we have atomic and SIMD intrinsics in their own file, and refactor atomic intrinsic name parsing.
2022-07-18 12:56:44 +00:00
Ralf Jung
6ab64620a6 refactor atomic intrinsic handling to actually parse the intrinsic name 2022-07-18 08:55:50 -04:00
Ralf Jung
ad3010c449 make atomic intrinsic impl details private 2022-07-18 08:22:27 -04:00
Ralf Jung
c850ffe01a add support for new RMW orders 2022-07-18 08:20:06 -04:00
Ralf Jung
1174cda4f1 remove ret param from foreign_item hierarchy 2022-07-18 08:05:46 -04:00
Ralf Jung
53ead1b8c9 move simd intrinsics to their own file 2022-07-18 08:03:58 -04:00
Ralf Jung
52a6ac96b0 move atomic intrinsics to their own file 2022-07-18 07:55:11 -04:00
bors
5a4d71faad Auto merge of #2379 - RalfJung:ui-test-target-filter, r=oli-obk
ui_test: more robust syntax for target filtering

Implicit fallbacks are always fragile and prone to typos, so let's be explicit.
2022-07-18 07:26:49 +00:00
bors
0a0a15af5a Auto merge of #2380 - RalfJung:isatty, r=RalfJung
isatty tweaks

`@saethlin` I realized we need to gate this behind the isolation flag, sorry. :/  The point of isolated mode is that it is 100% deterministic, so we cannot call host functions that might give different answers on different runs.
2022-07-18 02:32:04 +00:00
Ralf Jung
e30dd07139 libc test: also call isatty on an actual file 2022-07-17 22:31:38 -04:00
Ralf Jung
090f289214 make an expect into proper error reporting 2022-07-17 21:57:56 -04:00
Ralf Jung
1c85975768 ui_test: more robust syntax for target filtering 2022-07-17 21:54:10 -04:00
Ralf Jung
896f558f2b with isolation we want to be fully deterministic 2022-07-17 21:50:10 -04:00
bors
8ec3425a8a Auto merge of #2349 - saethlin:isatty, r=RalfJung
Improve isatty support

Per https://github.com/rust-lang/miri/issues/2292#issuecomment-1171858283, this is an attempt at

> do something more clever with Miri's `isatty` shim

Since Unix -> Unix is very simple, I'm starting with a patch that just does that. Happy to augment/rewrite this based on feedback.

The linked file in libtest specifically only supports stdout. If we're doing this to support terminal applications, I think it would be strange to support one but not all 3 of the standard streams.

The `atty` crate contains a bunch of extra logic that libtest does not contain, in order to support MSYS terminals: db8d55f88e so I think if we're going to do Windows support, we should probably access all that logic somehow. I think it's pretty clear that the implementation is not going to change, so I think if we want to, pasting the contents of the `atty` crate into Miri is on the table, instead of taking a dependency.
2022-07-18 01:37:38 +00:00
Ben Kimock
eefdeacdb1 Test that isatty doesn't crash 2022-07-17 21:13:59 -04:00
Ben Kimock
2f84cb34c1 Pass through isatty if the host is also unix 2022-07-17 16:53:14 -04:00
bors
36a7a654b0 Auto merge of #2378 - RalfJung:sb, r=RalfJung
use PlaceTy visitor and dedup sime retagging code

I benchmarked this and as far as I can see the difference to the old code is totally within noise. And this makes the code a lot simpler and removes duplication so yay. :)
2022-07-17 14:40:37 +00:00
Ralf Jung
39866f817a remove a fastpath that does not seem to actually help 2022-07-17 10:35:19 -04:00
Ralf Jung
68510600a3 use PlaceTy visitor 2022-07-17 10:19:29 -04:00
bors
416cddb251 Auto merge of #2376 - RalfJung:rustup, r=RalfJung
rustup
2022-07-17 12:19:31 +00:00