Skip to content

Commit

Permalink
Auto merge of #116508 - RalfJung:miri, r=RalfJung
Browse files Browse the repository at this point in the history
Miri subtree update

r? `@ghost`
  • Loading branch information
bors committed Oct 7, 2023
2 parents fc01a74 + a04b7a3 commit 0f3d72a
Show file tree
Hide file tree
Showing 90 changed files with 2,384 additions and 1,813 deletions.
52 changes: 42 additions & 10 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ dependencies = [
name = "cargo-miri"
version = "0.1.0"
dependencies = [
"cargo_metadata",
"cargo_metadata 0.18.0",
"directories",
"rustc-build-sysroot",
"rustc_tools_util",
Expand Down Expand Up @@ -423,6 +423,20 @@ dependencies = [
"thiserror",
]

[[package]]
name = "cargo_metadata"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb9ac64500cc83ce4b9f8dafa78186aa008c8dea77a09b94cd307fd0cd5022a8"
dependencies = [
"camino",
"cargo-platform",
"semver",
"serde",
"serde_json",
"thiserror",
]

[[package]]
name = "cargotest2"
version = "0.1.0"
Expand Down Expand Up @@ -551,7 +565,7 @@ name = "clippy_lints"
version = "0.1.75"
dependencies = [
"arrayvec",
"cargo_metadata",
"cargo_metadata 0.15.4",
"clippy_utils",
"declare_clippy_lint",
"if_chain",
Expand Down Expand Up @@ -1038,11 +1052,11 @@ dependencies = [

[[package]]
name = "directories"
version = "4.0.1"
version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210"
checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35"
dependencies = [
"dirs-sys",
"dirs-sys 0.4.1",
]

[[package]]
Expand All @@ -1051,7 +1065,7 @@ version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
dependencies = [
"dirs-sys",
"dirs-sys 0.3.7",
]

[[package]]
Expand All @@ -1075,6 +1089,18 @@ dependencies = [
"winapi",
]

[[package]]
name = "dirs-sys"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
dependencies = [
"libc",
"option-ext",
"redox_users",
"windows-sys 0.48.0",
]

[[package]]
name = "dirs-sys-next"
version = "0.1.2"
Expand Down Expand Up @@ -2664,6 +2690,12 @@ dependencies = [
"zip",
]

[[package]]
name = "option-ext"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"

[[package]]
name = "overload"
version = "0.1.1"
Expand Down Expand Up @@ -4686,7 +4718,7 @@ dependencies = [
"annotate-snippets",
"anyhow",
"bytecount",
"cargo_metadata",
"cargo_metadata 0.15.4",
"clap",
"diff",
"dirs",
Expand Down Expand Up @@ -5358,7 +5390,7 @@ name = "tidy"
version = "0.1.0"
dependencies = [
"cargo-platform",
"cargo_metadata",
"cargo_metadata 0.15.4",
"ignore",
"lazy_static",
"miropt-test-tools",
Expand Down Expand Up @@ -5663,7 +5695,7 @@ dependencies = [
"anyhow",
"bstr",
"cargo-platform",
"cargo_metadata",
"cargo_metadata 0.15.4",
"color-eyre",
"colored",
"comma",
Expand All @@ -5690,7 +5722,7 @@ dependencies = [
"anyhow",
"bstr",
"cargo-platform",
"cargo_metadata",
"cargo_metadata 0.15.4",
"color-eyre",
"colored",
"comma",
Expand Down
17 changes: 5 additions & 12 deletions src/tools/miri/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,12 @@ and you can (cross-)run the entire test suite using:
MIRI_TEST_TARGET=i686-unknown-linux-gnu ./miri test
```

If your target doesn't support libstd, you can run miri with
If your target doesn't support libstd that should usually just work. However, if you are using a
custom target file, you might have to set `MIRI_NO_STD=1`.

```
MIRI_NO_STD=1 MIRI_TEST_TARGET=thumbv7em-none-eabihf ./miri test tests/fail/alloc/no_global_allocator.rs
MIRI_NO_STD=1 ./miri run tests/pass/no_std.rs --target thumbv7em-none-eabihf
```

to avoid attempting (and failing) to build libstd. Note that almost no tests will pass
this way, but you can run individual tests.

`./miri test FILTER` only runs those tests that contain `FILTER` in their
filename (including the base directory, e.g. `./miri test fail` will run all
compile-fail tests).
`./miri test FILTER` only runs those tests that contain `FILTER` in their filename (including the
base directory, e.g. `./miri test fail` will run all compile-fail tests). These filters are passed
to `cargo test`, so for multiple filers you need to use `./miri test -- FILTER1 FILTER2`.

You can get a trace of which MIR statements are being executed by setting the
`MIRI_LOG` environment variable. For example:
Expand Down
Loading

0 comments on commit 0f3d72a

Please sign in to comment.