Skip to content

Commit c094d42

Browse files
committed
update miri-seed handling for run-pass test suite
1 parent 068517a commit c094d42

File tree

5 files changed

+2
-12
lines changed

5 files changed

+2
-12
lines changed

tests/compiletest.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fn compile_fail(path: &str, target: &str, opt: bool) {
6868
run_tests("compile-fail", path, target, flags);
6969
}
7070

71-
fn miri_pass(path: &str, target: &str, opt: bool, noseed: bool) {
71+
fn miri_pass(path: &str, target: &str, opt: bool) {
7272
let opt_str = if opt { " with optimizations" } else { "" };
7373
eprintln!("{}", format!(
7474
"## Running run-pass tests in {} against miri for target {}{}",
@@ -80,9 +80,6 @@ fn miri_pass(path: &str, target: &str, opt: bool, noseed: bool) {
8080
let mut flags = Vec::new();
8181
if opt {
8282
flags.push("-Zmir-opt-level=3".to_owned());
83-
} else if !noseed {
84-
// Run with intptrcast. Avoid test matrix explosion by doing either this or opt-level=3.
85-
flags.push("-Zmiri-seed=".to_owned());
8683
}
8784

8885
run_tests("ui", path, target, flags);
@@ -106,8 +103,7 @@ fn get_target() -> String {
106103
}
107104

108105
fn run_pass_miri(opt: bool) {
109-
miri_pass("tests/run-pass", &get_target(), opt, false);
110-
miri_pass("tests/run-pass-noseed", &get_target(), opt, true);
106+
miri_pass("tests/run-pass", &get_target(), opt);
111107
}
112108

113109
fn compile_fail_miri(opt: bool) {

tests/run-pass-noseed/hashmap.rs renamed to tests/run-pass/hashmap.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// compile-flags: -Zmiri-seed=0000000000000000
2-
31
use std::collections::{self, HashMap};
42
use std::hash::{BuildHasherDefault, BuildHasher};
53

tests/run-pass-noseed/heap_allocator.rs renamed to tests/run-pass/heap_allocator.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// compile-flags: -Zmiri-seed=
21
#![feature(allocator_api)]
32

43
use std::ptr::NonNull;

tests/run-pass-noseed/intptrcast.rs renamed to tests/run-pass/intptrcast.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// compile-flags: -Zmiri-seed=0000000000000000
2-
31
// This returns a miri pointer at type usize, if the argument is a proper pointer
42
fn transmute_ptr_to_int<T>(x: *const T) -> usize {
53
unsafe { std::mem::transmute(x) }

tests/run-pass-noseed/malloc.rs renamed to tests/run-pass/malloc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//ignore-windows: Uses POSIX APIs
2-
//compile-flags: -Zmiri-seed=
32

43
#![feature(rustc_private)]
54

0 commit comments

Comments
 (0)