Skip to content

Commit

Permalink
update getrandom so we do not need permissive-provenance for it
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jun 27, 2022
1 parent d9e7a3a commit f6a1692
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 50 deletions.
78 changes: 34 additions & 44 deletions test-cargo-miri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions test-cargo-miri/run-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,15 @@ def test_cargo_miri_test():
default_ref = "test.cross-target.stdout.ref" if is_foreign else "test.default.stdout.ref"
filter_ref = "test.filter.cross-target.stdout.ref" if is_foreign else "test.filter.stdout.ref"

# macOS needs permissive provenance inside getrandom.
test("`cargo miri test`",
cargo_miri("test"),
default_ref, "test.stderr-empty.ref",
env={'MIRIFLAGS': "-Zmiri-permissive-provenance -Zmiri-seed=feed"},
env={'MIRIFLAGS': "-Zmiri-seed=feed"},
)
test("`cargo miri test` (no isolation, no doctests)",
cargo_miri("test") + ["--bins", "--tests"], # no `--lib`, we disabled that in `Cargo.toml`
"test.cross-target.stdout.ref", "test.stderr-empty.ref",
env={'MIRIFLAGS': "-Zmiri-permissive-provenance -Zmiri-disable-isolation"},
env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
)
test("`cargo miri test` (with filter)",
cargo_miri("test") + ["--", "--format=pretty", "le1"],
Expand All @@ -132,7 +131,6 @@ def test_cargo_miri_test():
test("`cargo miri test` (test target)",
cargo_miri("test") + ["--test", "test", "--", "--format=pretty"],
"test.test-target.stdout.ref", "test.stderr-empty.ref",
env={'MIRIFLAGS': "-Zmiri-permissive-provenance"},
)
test("`cargo miri test` (bin target)",
cargo_miri("test") + ["--bin", "cargo-miri-test", "--", "--format=pretty"],
Expand All @@ -150,13 +148,11 @@ def test_cargo_miri_test():
test("`cargo miri test` (custom target dir)",
cargo_miri("test") + ["--target-dir=custom-test"],
default_ref, "test.stderr-empty.ref",
env={'MIRIFLAGS': "-Zmiri-permissive-provenance"},
)
del os.environ["CARGO_TARGET_DIR"] # this overrides `build.target-dir` passed by `--config`, so unset it
test("`cargo miri test` (config-cli)",
cargo_miri("test") + ["--config=build.target-dir=\"config-cli\"", "-Zunstable-options"],
default_ref, "test.stderr-empty.ref",
env={'MIRIFLAGS': "-Zmiri-permissive-provenance"},
)

os.chdir(os.path.dirname(os.path.realpath(__file__)))
Expand Down

0 comments on commit f6a1692

Please sign in to comment.