From c094d42504c41ebd4e452542f3fa2cbc303fc975 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 23 Jul 2019 21:53:47 +0200 Subject: [PATCH] update miri-seed handling for run-pass test suite --- tests/compiletest.rs | 8 ++------ tests/{run-pass-noseed => run-pass}/hashmap.rs | 2 -- tests/{run-pass-noseed => run-pass}/heap_allocator.rs | 1 - tests/{run-pass-noseed => run-pass}/intptrcast.rs | 2 -- tests/{run-pass-noseed => run-pass}/malloc.rs | 1 - 5 files changed, 2 insertions(+), 12 deletions(-) rename tests/{run-pass-noseed => run-pass}/hashmap.rs (95%) rename tests/{run-pass-noseed => run-pass}/heap_allocator.rs (99%) rename tests/{run-pass-noseed => run-pass}/intptrcast.rs (94%) rename tests/{run-pass-noseed => run-pass}/malloc.rs (97%) diff --git a/tests/compiletest.rs b/tests/compiletest.rs index 16311d0749b..9394084ad34 100644 --- a/tests/compiletest.rs +++ b/tests/compiletest.rs @@ -68,7 +68,7 @@ fn compile_fail(path: &str, target: &str, opt: bool) { run_tests("compile-fail", path, target, flags); } -fn miri_pass(path: &str, target: &str, opt: bool, noseed: bool) { +fn miri_pass(path: &str, target: &str, opt: bool) { let opt_str = if opt { " with optimizations" } else { "" }; eprintln!("{}", format!( "## Running run-pass tests in {} against miri for target {}{}", @@ -80,9 +80,6 @@ fn miri_pass(path: &str, target: &str, opt: bool, noseed: bool) { let mut flags = Vec::new(); if opt { flags.push("-Zmir-opt-level=3".to_owned()); - } else if !noseed { - // Run with intptrcast. Avoid test matrix explosion by doing either this or opt-level=3. - flags.push("-Zmiri-seed=".to_owned()); } run_tests("ui", path, target, flags); @@ -106,8 +103,7 @@ fn get_target() -> String { } fn run_pass_miri(opt: bool) { - miri_pass("tests/run-pass", &get_target(), opt, false); - miri_pass("tests/run-pass-noseed", &get_target(), opt, true); + miri_pass("tests/run-pass", &get_target(), opt); } fn compile_fail_miri(opt: bool) { diff --git a/tests/run-pass-noseed/hashmap.rs b/tests/run-pass/hashmap.rs similarity index 95% rename from tests/run-pass-noseed/hashmap.rs rename to tests/run-pass/hashmap.rs index e249238d48c..1ff9c26ba18 100644 --- a/tests/run-pass-noseed/hashmap.rs +++ b/tests/run-pass/hashmap.rs @@ -1,5 +1,3 @@ -// compile-flags: -Zmiri-seed=0000000000000000 - use std::collections::{self, HashMap}; use std::hash::{BuildHasherDefault, BuildHasher}; diff --git a/tests/run-pass-noseed/heap_allocator.rs b/tests/run-pass/heap_allocator.rs similarity index 99% rename from tests/run-pass-noseed/heap_allocator.rs rename to tests/run-pass/heap_allocator.rs index e7a609a7d98..7bcb08058c3 100644 --- a/tests/run-pass-noseed/heap_allocator.rs +++ b/tests/run-pass/heap_allocator.rs @@ -1,4 +1,3 @@ -// compile-flags: -Zmiri-seed= #![feature(allocator_api)] use std::ptr::NonNull; diff --git a/tests/run-pass-noseed/intptrcast.rs b/tests/run-pass/intptrcast.rs similarity index 94% rename from tests/run-pass-noseed/intptrcast.rs rename to tests/run-pass/intptrcast.rs index 1b5251c9111..c28958b872d 100644 --- a/tests/run-pass-noseed/intptrcast.rs +++ b/tests/run-pass/intptrcast.rs @@ -1,5 +1,3 @@ -// compile-flags: -Zmiri-seed=0000000000000000 - // This returns a miri pointer at type usize, if the argument is a proper pointer fn transmute_ptr_to_int(x: *const T) -> usize { unsafe { std::mem::transmute(x) } diff --git a/tests/run-pass-noseed/malloc.rs b/tests/run-pass/malloc.rs similarity index 97% rename from tests/run-pass-noseed/malloc.rs rename to tests/run-pass/malloc.rs index bf51baacd35..f66263425ee 100644 --- a/tests/run-pass-noseed/malloc.rs +++ b/tests/run-pass/malloc.rs @@ -1,5 +1,4 @@ //ignore-windows: Uses POSIX APIs -//compile-flags: -Zmiri-seed= #![feature(rustc_private)] -- 2.44.0