From 32c2ed7b263e649236561219ae2f781e8fa40c19 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Mon, 31 Jul 2023 08:04:29 +0000 Subject: [PATCH 01/13] Bump ui test crate --- src/tools/miri/Cargo.lock | 100 ++++++++++++++++++++++++++-- src/tools/miri/Cargo.toml | 2 +- src/tools/miri/tests/compiletest.rs | 63 ++++++------------ 3 files changed, 115 insertions(+), 50 deletions(-) diff --git a/src/tools/miri/Cargo.lock b/src/tools/miri/Cargo.lock index f253d71e50d..f0a145767b3 100644 --- a/src/tools/miri/Cargo.lock +++ b/src/tools/miri/Cargo.lock @@ -26,6 +26,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + [[package]] name = "anyhow" version = "1.0.71" @@ -159,6 +168,25 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "comma" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55b672471b4e9f9e95499ea597ff64941a309b2cdbffcc46f2cc5e2d971fd335" + +[[package]] +name = "console" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.45.0", +] + [[package]] name = "crossbeam-channel" version = "0.5.8" @@ -189,10 +217,16 @@ dependencies = [ ] [[package]] -name = "diff" -version = "0.1.13" +name = "distance" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" +checksum = "6d9d8664cf849d7d0f3114a3a387d2f5e4303176d746d5a951aaddc66dfe9240" + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "env_logger" @@ -282,6 +316,19 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +[[package]] +name = "indicatif" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + [[package]] name = "instant" version = "0.1.12" @@ -463,6 +510,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + [[package]] name = "object" version = "0.30.3" @@ -484,6 +537,15 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +[[package]] +name = "pad" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ad9b889f1b12e0b9ee24db044b5129150d5eada288edc800f789928dc8c0e3" +dependencies = [ + "unicode-width", +] + [[package]] name = "parking_lot" version = "0.11.2" @@ -524,12 +586,28 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +[[package]] +name = "portable-atomic" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b" + [[package]] name = "ppv-lite86" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "prettydiff" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ff1fec61082821f8236cf6c0c14e8172b62ce8a72a0eedc30d3b247bb68dc11" +dependencies = [ + "ansi_term", + "pad", +] + [[package]] name = "proc-macro2" version = "1.0.66" @@ -859,18 +937,22 @@ dependencies = [ [[package]] name = "ui_test" -version = "0.11.7" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c21899b59f53717dfad29e4f46e5b21a200a1b6888ab86532a07cfc8b48dd78c" +checksum = "33d15b71b50d95aeb687f68289543b9cabdbec7afc277176ce9dfcf192c7035d" dependencies = [ + "anyhow", "bstr", "cargo-platform", "cargo_metadata", "color-eyre", "colored", + "comma", "crossbeam-channel", - "diff", + "distance", + "indicatif", "lazy_static", + "prettydiff", "regex", "rustc_version", "rustfix", @@ -885,6 +967,12 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +[[package]] +name = "unicode-width" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" + [[package]] name = "valuable" version = "0.1.0" diff --git a/src/tools/miri/Cargo.toml b/src/tools/miri/Cargo.toml index 2ae6f922e3a..86ba460bb86 100644 --- a/src/tools/miri/Cargo.toml +++ b/src/tools/miri/Cargo.toml @@ -36,7 +36,7 @@ libloading = "0.7" [dev-dependencies] colored = "2" -ui_test = "0.11.7" +ui_test = "0.14" rustc_version = "0.4" # Features chosen to match those required by env_logger, to avoid rebuilds regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] } diff --git a/src/tools/miri/tests/compiletest.rs b/src/tools/miri/tests/compiletest.rs index 78dd3df01ec..f3ea43c0413 100644 --- a/src/tools/miri/tests/compiletest.rs +++ b/src/tools/miri/tests/compiletest.rs @@ -97,7 +97,7 @@ fn test_config(target: &str, path: &str, mode: Mode, with_dependencies: bool) -> output_conflict_handling, out_dir: PathBuf::from(std::env::var_os("CARGO_TARGET_DIR").unwrap()).join("ui"), edition: Some("2021".into()), - ..Config::rustc(path.into()) + ..Config::rustc(path) }; let use_std = env::var_os("MIRI_NO_STD").is_none(); @@ -123,49 +123,19 @@ fn run_tests(mode: Mode, path: &str, target: &str, with_dependencies: bool) -> R let config = test_config(target, path, mode, with_dependencies); // Handle command-line arguments. - let mut after_dashdash = false; - let mut quiet = false; - let filters = std::env::args() - .skip(1) - .filter(|arg| { - if after_dashdash { - // Just propagate everything. - return true; - } - match &**arg { - "--quiet" => { - quiet = true; - false - } - "--" => { - after_dashdash = true; - false - } - s if s.starts_with('-') => { - panic!("unknown compiletest flag `{s}`"); - } - _ => true, - } - }) - .collect::>(); + let args = ui_test::Args::test(); + let quiet = args.quiet; eprintln!(" Compiler: {}", config.program.display()); ui_test::run_tests_generic( - config, + vec![config], + std::thread::available_parallelism().unwrap(), + args, // The files we're actually interested in (all `.rs` files). - |path| { - path.extension().is_some_and(|ext| ext == "rs") - && (filters.is_empty() - || filters.iter().any(|f| path.display().to_string().contains(f))) - }, + ui_test::default_file_filter, // This could be used to overwrite the `Config` on a per-test basis. - |_, _| None, + |_, _| {}, ( - if quiet { - Box::::default() - as Box - } else { - Box::new(status_emitter::Text) - }, + if quiet { status_emitter::Text::quiet() } else { status_emitter::Text::verbose() }, status_emitter::Gha:: { name: format!("{mode:?} {path} ({target})"), }, @@ -269,11 +239,16 @@ fn main() -> Result<()> { ui(Mode::Pass, "tests/pass", &target, WithoutDependencies)?; ui(Mode::Pass, "tests/pass-dep", &target, WithDependencies)?; ui(Mode::Panic, "tests/panic", &target, WithDependencies)?; - ui(Mode::Fail { require_patterns: true }, "tests/fail", &target, WithDependencies)?; + ui( + Mode::Fail { require_patterns: true, rustfix: false }, + "tests/fail", + &target, + WithDependencies, + )?; if cfg!(target_os = "linux") { ui(Mode::Pass, "tests/extern-so/pass", &target, WithoutDependencies)?; ui( - Mode::Fail { require_patterns: true }, + Mode::Fail { require_patterns: true, rustfix: false }, "tests/extern-so/fail", &target, WithoutDependencies, @@ -285,11 +260,13 @@ fn main() -> Result<()> { fn run_dep_mode(target: String, mut args: impl Iterator) -> Result<()> { let path = args.next().expect("./miri run-dep must be followed by a file name"); - let mut config = test_config(&target, "", Mode::Yolo, /* with dependencies */ true); + let mut config = + test_config(&target, "", Mode::Yolo { rustfix: false }, /* with dependencies */ true); config.program.args.clear(); // We want to give the user full control over flags - config.build_dependencies_and_link_them()?; + let dep_args = config.build_dependencies()?; let mut cmd = config.program.build(&config.out_dir); + cmd.args(dep_args); cmd.arg(path); From c69e0c2a9bb652ea425da3546159a19255f11381 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 3 Aug 2023 18:45:04 +0000 Subject: [PATCH 02/13] Move `fail` tests that need dependencies into their own folder, so that wasm tests don't build dependencies --- src/tools/miri/tests/compiletest.rs | 6 ++++++ .../concurrency/libc_pthread_create_main_terminate.rs | 0 .../concurrency/libc_pthread_create_main_terminate.stderr | 0 .../concurrency/libc_pthread_create_too_few_args.rs | 0 .../concurrency/libc_pthread_create_too_few_args.stderr | 0 .../concurrency/libc_pthread_create_too_many_args.rs | 0 .../concurrency/libc_pthread_create_too_many_args.stderr | 0 .../concurrency/libc_pthread_join_detached.rs | 0 .../concurrency/libc_pthread_join_detached.stderr | 0 .../concurrency/libc_pthread_join_joined.rs | 0 .../concurrency/libc_pthread_join_joined.stderr | 0 .../concurrency/libc_pthread_join_main.rs | 0 .../concurrency/libc_pthread_join_main.stderr | 0 .../concurrency/libc_pthread_join_multiple.rs | 0 .../concurrency/libc_pthread_join_multiple.stderr | 0 .../concurrency/libc_pthread_join_self.rs | 0 .../concurrency/libc_pthread_join_self.stderr | 0 .../{fail => fail-dep}/concurrency/unwind_top_of_stack.rs | 0 .../concurrency/unwind_top_of_stack.stderr | 0 .../miri/tests/{fail => fail-dep}/shims/fs/close_stdout.rs | 0 .../tests/{fail => fail-dep}/shims/fs/close_stdout.stderr | 0 .../tests/{fail => fail-dep}/shims/fs/isolated_stdin.rs | 0 .../tests/{fail => fail-dep}/shims/fs/isolated_stdin.stderr | 0 .../{fail => fail-dep}/shims/fs/mkstemp_immutable_arg.rs | 0 .../shims/fs/mkstemp_immutable_arg.stderr | 0 .../tests/{fail => fail-dep}/shims/fs/read_from_stdout.rs | 0 .../{fail => fail-dep}/shims/fs/read_from_stdout.stderr | 0 .../shims/fs/unix_open_missing_required_mode.rs | 0 .../shims/fs/unix_open_missing_required_mode.stderr | 0 .../tests/{fail => fail-dep}/shims/fs/write_to_stdin.rs | 0 .../tests/{fail => fail-dep}/shims/fs/write_to_stdin.stderr | 0 .../miri/tests/{fail => fail-dep}/shims/memchr_null.rs | 0 .../miri/tests/{fail => fail-dep}/shims/memchr_null.stderr | 0 .../miri/tests/{fail => fail-dep}/shims/memcmp_null.rs | 0 .../miri/tests/{fail => fail-dep}/shims/memcmp_null.stderr | 0 .../miri/tests/{fail => fail-dep}/shims/memcmp_zero.rs | 0 .../miri/tests/{fail => fail-dep}/shims/memcmp_zero.stderr | 0 .../miri/tests/{fail => fail-dep}/shims/memcpy_zero.rs | 0 .../miri/tests/{fail => fail-dep}/shims/memcpy_zero.stderr | 0 .../miri/tests/{fail => fail-dep}/shims/memrchr_null.rs | 0 .../miri/tests/{fail => fail-dep}/shims/memrchr_null.stderr | 0 .../tests/{fail => fail-dep}/shims/mmap_invalid_dealloc.rs | 0 .../{fail => fail-dep}/shims/mmap_invalid_dealloc.stderr | 0 .../tests/{fail => fail-dep}/shims/mmap_use_after_munmap.rs | 0 .../{fail => fail-dep}/shims/mmap_use_after_munmap.stderr | 0 src/tools/miri/tests/{fail => fail-dep}/shims/munmap.rs | 0 src/tools/miri/tests/{fail => fail-dep}/shims/munmap.stderr | 0 .../miri/tests/{fail => fail-dep}/shims/munmap_partial.rs | 0 .../tests/{fail => fail-dep}/shims/munmap_partial.stderr | 0 .../shims/sync/libc_pthread_cond_double_destroy.rs | 0 .../shims/sync/libc_pthread_cond_double_destroy.stderr | 0 .../shims/sync/libc_pthread_condattr_double_destroy.rs | 0 .../shims/sync/libc_pthread_condattr_double_destroy.stderr | 0 .../shims/sync/libc_pthread_mutex_NULL_deadlock.rs | 0 .../shims/sync/libc_pthread_mutex_NULL_deadlock.stderr | 0 .../shims/sync/libc_pthread_mutex_deadlock.rs | 0 .../shims/sync/libc_pthread_mutex_deadlock.stderr | 0 .../shims/sync/libc_pthread_mutex_default_deadlock.rs | 0 .../shims/sync/libc_pthread_mutex_default_deadlock.stderr | 0 .../shims/sync/libc_pthread_mutex_destroy_locked.rs | 0 .../shims/sync/libc_pthread_mutex_destroy_locked.stderr | 0 .../shims/sync/libc_pthread_mutex_double_destroy.rs | 0 .../shims/sync/libc_pthread_mutex_double_destroy.stderr | 0 .../shims/sync/libc_pthread_mutex_normal_deadlock.rs | 0 .../shims/sync/libc_pthread_mutex_normal_deadlock.stderr | 0 .../shims/sync/libc_pthread_mutex_normal_unlock_unlocked.rs | 0 .../sync/libc_pthread_mutex_normal_unlock_unlocked.stderr | 0 .../shims/sync/libc_pthread_mutex_wrong_owner.rs | 0 .../shims/sync/libc_pthread_mutex_wrong_owner.stderr | 0 .../shims/sync/libc_pthread_mutexattr_double_destroy.rs | 0 .../shims/sync/libc_pthread_mutexattr_double_destroy.stderr | 0 .../shims/sync/libc_pthread_rwlock_destroy_read_locked.rs | 0 .../sync/libc_pthread_rwlock_destroy_read_locked.stderr | 0 .../shims/sync/libc_pthread_rwlock_destroy_write_locked.rs | 0 .../sync/libc_pthread_rwlock_destroy_write_locked.stderr | 0 .../shims/sync/libc_pthread_rwlock_double_destroy.rs | 0 .../shims/sync/libc_pthread_rwlock_double_destroy.stderr | 0 ...libc_pthread_rwlock_read_write_deadlock_single_thread.rs | 0 ..._pthread_rwlock_read_write_deadlock_single_thread.stderr | 0 .../shims/sync/libc_pthread_rwlock_read_wrong_owner.rs | 0 .../shims/sync/libc_pthread_rwlock_read_wrong_owner.stderr | 0 .../shims/sync/libc_pthread_rwlock_unlock_unlocked.rs | 0 .../shims/sync/libc_pthread_rwlock_unlock_unlocked.stderr | 0 .../shims/sync/libc_pthread_rwlock_write_read_deadlock.rs | 0 .../sync/libc_pthread_rwlock_write_read_deadlock.stderr | 0 ...libc_pthread_rwlock_write_read_deadlock_single_thread.rs | 0 ..._pthread_rwlock_write_read_deadlock_single_thread.stderr | 0 .../shims/sync/libc_pthread_rwlock_write_write_deadlock.rs | 0 .../sync/libc_pthread_rwlock_write_write_deadlock.stderr | 0 ...ibc_pthread_rwlock_write_write_deadlock_single_thread.rs | 0 ...pthread_rwlock_write_write_deadlock_single_thread.stderr | 0 .../shims/sync/libc_pthread_rwlock_write_wrong_owner.rs | 0 .../shims/sync/libc_pthread_rwlock_write_wrong_owner.stderr | 0 src/tools/miri/tests/{fail => fail-dep}/tokio/sleep.rs | 0 src/tools/miri/tests/{fail => fail-dep}/tokio/sleep.stderr | 0 .../{fail => fail-dep}/unsupported_incomplete_function.rs | 0 .../unsupported_incomplete_function.stderr | 0 97 files changed, 6 insertions(+) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/libc_pthread_create_main_terminate.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/libc_pthread_create_main_terminate.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/libc_pthread_create_too_few_args.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/libc_pthread_create_too_few_args.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/libc_pthread_create_too_many_args.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/libc_pthread_create_too_many_args.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/libc_pthread_join_detached.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/libc_pthread_join_detached.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/libc_pthread_join_joined.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/libc_pthread_join_joined.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/libc_pthread_join_main.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/libc_pthread_join_main.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/libc_pthread_join_multiple.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/libc_pthread_join_multiple.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/libc_pthread_join_self.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/libc_pthread_join_self.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/unwind_top_of_stack.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/concurrency/unwind_top_of_stack.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/fs/close_stdout.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/fs/close_stdout.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/fs/isolated_stdin.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/fs/isolated_stdin.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/fs/mkstemp_immutable_arg.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/fs/mkstemp_immutable_arg.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/fs/read_from_stdout.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/fs/read_from_stdout.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/fs/unix_open_missing_required_mode.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/fs/unix_open_missing_required_mode.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/fs/write_to_stdin.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/fs/write_to_stdin.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/memchr_null.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/memchr_null.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/memcmp_null.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/memcmp_null.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/memcmp_zero.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/memcmp_zero.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/memcpy_zero.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/memcpy_zero.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/memrchr_null.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/memrchr_null.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/mmap_invalid_dealloc.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/mmap_invalid_dealloc.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/mmap_use_after_munmap.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/mmap_use_after_munmap.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/munmap.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/munmap.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/munmap_partial.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/munmap_partial.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_cond_double_destroy.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_cond_double_destroy.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_condattr_double_destroy.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_condattr_double_destroy.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutex_NULL_deadlock.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutex_NULL_deadlock.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutex_deadlock.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutex_deadlock.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutex_default_deadlock.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutex_default_deadlock.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutex_destroy_locked.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutex_destroy_locked.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutex_double_destroy.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutex_double_destroy.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutex_normal_deadlock.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutex_normal_deadlock.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutex_wrong_owner.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutex_wrong_owner.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutexattr_double_destroy.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_mutexattr_double_destroy.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_destroy_read_locked.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_destroy_read_locked.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_destroy_write_locked.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_destroy_write_locked.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_double_destroy.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_double_destroy.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_read_wrong_owner.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_read_wrong_owner.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_unlock_unlocked.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_unlock_unlocked.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_write_read_deadlock.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_write_read_deadlock.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_write_write_deadlock.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_write_write_deadlock.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_write_wrong_owner.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/shims/sync/libc_pthread_rwlock_write_wrong_owner.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/tokio/sleep.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/tokio/sleep.stderr (100%) rename src/tools/miri/tests/{fail => fail-dep}/unsupported_incomplete_function.rs (100%) rename src/tools/miri/tests/{fail => fail-dep}/unsupported_incomplete_function.stderr (100%) diff --git a/src/tools/miri/tests/compiletest.rs b/src/tools/miri/tests/compiletest.rs index f3ea43c0413..d84f943a6f9 100644 --- a/src/tools/miri/tests/compiletest.rs +++ b/src/tools/miri/tests/compiletest.rs @@ -243,6 +243,12 @@ fn main() -> Result<()> { Mode::Fail { require_patterns: true, rustfix: false }, "tests/fail", &target, + WithoutDependencies, + )?; + ui( + Mode::Fail { require_patterns: true, rustfix: false }, + "tests/fail-dep", + &target, WithDependencies, )?; if cfg!(target_os = "linux") { diff --git a/src/tools/miri/tests/fail/concurrency/libc_pthread_create_main_terminate.rs b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_main_terminate.rs similarity index 100% rename from src/tools/miri/tests/fail/concurrency/libc_pthread_create_main_terminate.rs rename to src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_main_terminate.rs diff --git a/src/tools/miri/tests/fail/concurrency/libc_pthread_create_main_terminate.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_main_terminate.stderr similarity index 100% rename from src/tools/miri/tests/fail/concurrency/libc_pthread_create_main_terminate.stderr rename to src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_main_terminate.stderr diff --git a/src/tools/miri/tests/fail/concurrency/libc_pthread_create_too_few_args.rs b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.rs similarity index 100% rename from src/tools/miri/tests/fail/concurrency/libc_pthread_create_too_few_args.rs rename to src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.rs diff --git a/src/tools/miri/tests/fail/concurrency/libc_pthread_create_too_few_args.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.stderr similarity index 100% rename from src/tools/miri/tests/fail/concurrency/libc_pthread_create_too_few_args.stderr rename to src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.stderr diff --git a/src/tools/miri/tests/fail/concurrency/libc_pthread_create_too_many_args.rs b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.rs similarity index 100% rename from src/tools/miri/tests/fail/concurrency/libc_pthread_create_too_many_args.rs rename to src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.rs diff --git a/src/tools/miri/tests/fail/concurrency/libc_pthread_create_too_many_args.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.stderr similarity index 100% rename from src/tools/miri/tests/fail/concurrency/libc_pthread_create_too_many_args.stderr rename to src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.stderr diff --git a/src/tools/miri/tests/fail/concurrency/libc_pthread_join_detached.rs b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_detached.rs similarity index 100% rename from src/tools/miri/tests/fail/concurrency/libc_pthread_join_detached.rs rename to src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_detached.rs diff --git a/src/tools/miri/tests/fail/concurrency/libc_pthread_join_detached.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr similarity index 100% rename from src/tools/miri/tests/fail/concurrency/libc_pthread_join_detached.stderr rename to src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr diff --git a/src/tools/miri/tests/fail/concurrency/libc_pthread_join_joined.rs b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_joined.rs similarity index 100% rename from src/tools/miri/tests/fail/concurrency/libc_pthread_join_joined.rs rename to src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_joined.rs diff --git a/src/tools/miri/tests/fail/concurrency/libc_pthread_join_joined.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_joined.stderr similarity index 100% rename from src/tools/miri/tests/fail/concurrency/libc_pthread_join_joined.stderr rename to src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_joined.stderr diff --git a/src/tools/miri/tests/fail/concurrency/libc_pthread_join_main.rs b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.rs similarity index 100% rename from src/tools/miri/tests/fail/concurrency/libc_pthread_join_main.rs rename to src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.rs diff --git a/src/tools/miri/tests/fail/concurrency/libc_pthread_join_main.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr similarity index 100% rename from src/tools/miri/tests/fail/concurrency/libc_pthread_join_main.stderr rename to src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr diff --git a/src/tools/miri/tests/fail/concurrency/libc_pthread_join_multiple.rs b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.rs similarity index 100% rename from src/tools/miri/tests/fail/concurrency/libc_pthread_join_multiple.rs rename to src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.rs diff --git a/src/tools/miri/tests/fail/concurrency/libc_pthread_join_multiple.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr similarity index 100% rename from src/tools/miri/tests/fail/concurrency/libc_pthread_join_multiple.stderr rename to src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr diff --git a/src/tools/miri/tests/fail/concurrency/libc_pthread_join_self.rs b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.rs similarity index 100% rename from src/tools/miri/tests/fail/concurrency/libc_pthread_join_self.rs rename to src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.rs diff --git a/src/tools/miri/tests/fail/concurrency/libc_pthread_join_self.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr similarity index 100% rename from src/tools/miri/tests/fail/concurrency/libc_pthread_join_self.stderr rename to src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr diff --git a/src/tools/miri/tests/fail/concurrency/unwind_top_of_stack.rs b/src/tools/miri/tests/fail-dep/concurrency/unwind_top_of_stack.rs similarity index 100% rename from src/tools/miri/tests/fail/concurrency/unwind_top_of_stack.rs rename to src/tools/miri/tests/fail-dep/concurrency/unwind_top_of_stack.rs diff --git a/src/tools/miri/tests/fail/concurrency/unwind_top_of_stack.stderr b/src/tools/miri/tests/fail-dep/concurrency/unwind_top_of_stack.stderr similarity index 100% rename from src/tools/miri/tests/fail/concurrency/unwind_top_of_stack.stderr rename to src/tools/miri/tests/fail-dep/concurrency/unwind_top_of_stack.stderr diff --git a/src/tools/miri/tests/fail/shims/fs/close_stdout.rs b/src/tools/miri/tests/fail-dep/shims/fs/close_stdout.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/fs/close_stdout.rs rename to src/tools/miri/tests/fail-dep/shims/fs/close_stdout.rs diff --git a/src/tools/miri/tests/fail/shims/fs/close_stdout.stderr b/src/tools/miri/tests/fail-dep/shims/fs/close_stdout.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/fs/close_stdout.stderr rename to src/tools/miri/tests/fail-dep/shims/fs/close_stdout.stderr diff --git a/src/tools/miri/tests/fail/shims/fs/isolated_stdin.rs b/src/tools/miri/tests/fail-dep/shims/fs/isolated_stdin.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/fs/isolated_stdin.rs rename to src/tools/miri/tests/fail-dep/shims/fs/isolated_stdin.rs diff --git a/src/tools/miri/tests/fail/shims/fs/isolated_stdin.stderr b/src/tools/miri/tests/fail-dep/shims/fs/isolated_stdin.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/fs/isolated_stdin.stderr rename to src/tools/miri/tests/fail-dep/shims/fs/isolated_stdin.stderr diff --git a/src/tools/miri/tests/fail/shims/fs/mkstemp_immutable_arg.rs b/src/tools/miri/tests/fail-dep/shims/fs/mkstemp_immutable_arg.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/fs/mkstemp_immutable_arg.rs rename to src/tools/miri/tests/fail-dep/shims/fs/mkstemp_immutable_arg.rs diff --git a/src/tools/miri/tests/fail/shims/fs/mkstemp_immutable_arg.stderr b/src/tools/miri/tests/fail-dep/shims/fs/mkstemp_immutable_arg.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/fs/mkstemp_immutable_arg.stderr rename to src/tools/miri/tests/fail-dep/shims/fs/mkstemp_immutable_arg.stderr diff --git a/src/tools/miri/tests/fail/shims/fs/read_from_stdout.rs b/src/tools/miri/tests/fail-dep/shims/fs/read_from_stdout.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/fs/read_from_stdout.rs rename to src/tools/miri/tests/fail-dep/shims/fs/read_from_stdout.rs diff --git a/src/tools/miri/tests/fail/shims/fs/read_from_stdout.stderr b/src/tools/miri/tests/fail-dep/shims/fs/read_from_stdout.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/fs/read_from_stdout.stderr rename to src/tools/miri/tests/fail-dep/shims/fs/read_from_stdout.stderr diff --git a/src/tools/miri/tests/fail/shims/fs/unix_open_missing_required_mode.rs b/src/tools/miri/tests/fail-dep/shims/fs/unix_open_missing_required_mode.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/fs/unix_open_missing_required_mode.rs rename to src/tools/miri/tests/fail-dep/shims/fs/unix_open_missing_required_mode.rs diff --git a/src/tools/miri/tests/fail/shims/fs/unix_open_missing_required_mode.stderr b/src/tools/miri/tests/fail-dep/shims/fs/unix_open_missing_required_mode.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/fs/unix_open_missing_required_mode.stderr rename to src/tools/miri/tests/fail-dep/shims/fs/unix_open_missing_required_mode.stderr diff --git a/src/tools/miri/tests/fail/shims/fs/write_to_stdin.rs b/src/tools/miri/tests/fail-dep/shims/fs/write_to_stdin.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/fs/write_to_stdin.rs rename to src/tools/miri/tests/fail-dep/shims/fs/write_to_stdin.rs diff --git a/src/tools/miri/tests/fail/shims/fs/write_to_stdin.stderr b/src/tools/miri/tests/fail-dep/shims/fs/write_to_stdin.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/fs/write_to_stdin.stderr rename to src/tools/miri/tests/fail-dep/shims/fs/write_to_stdin.stderr diff --git a/src/tools/miri/tests/fail/shims/memchr_null.rs b/src/tools/miri/tests/fail-dep/shims/memchr_null.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/memchr_null.rs rename to src/tools/miri/tests/fail-dep/shims/memchr_null.rs diff --git a/src/tools/miri/tests/fail/shims/memchr_null.stderr b/src/tools/miri/tests/fail-dep/shims/memchr_null.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/memchr_null.stderr rename to src/tools/miri/tests/fail-dep/shims/memchr_null.stderr diff --git a/src/tools/miri/tests/fail/shims/memcmp_null.rs b/src/tools/miri/tests/fail-dep/shims/memcmp_null.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/memcmp_null.rs rename to src/tools/miri/tests/fail-dep/shims/memcmp_null.rs diff --git a/src/tools/miri/tests/fail/shims/memcmp_null.stderr b/src/tools/miri/tests/fail-dep/shims/memcmp_null.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/memcmp_null.stderr rename to src/tools/miri/tests/fail-dep/shims/memcmp_null.stderr diff --git a/src/tools/miri/tests/fail/shims/memcmp_zero.rs b/src/tools/miri/tests/fail-dep/shims/memcmp_zero.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/memcmp_zero.rs rename to src/tools/miri/tests/fail-dep/shims/memcmp_zero.rs diff --git a/src/tools/miri/tests/fail/shims/memcmp_zero.stderr b/src/tools/miri/tests/fail-dep/shims/memcmp_zero.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/memcmp_zero.stderr rename to src/tools/miri/tests/fail-dep/shims/memcmp_zero.stderr diff --git a/src/tools/miri/tests/fail/shims/memcpy_zero.rs b/src/tools/miri/tests/fail-dep/shims/memcpy_zero.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/memcpy_zero.rs rename to src/tools/miri/tests/fail-dep/shims/memcpy_zero.rs diff --git a/src/tools/miri/tests/fail/shims/memcpy_zero.stderr b/src/tools/miri/tests/fail-dep/shims/memcpy_zero.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/memcpy_zero.stderr rename to src/tools/miri/tests/fail-dep/shims/memcpy_zero.stderr diff --git a/src/tools/miri/tests/fail/shims/memrchr_null.rs b/src/tools/miri/tests/fail-dep/shims/memrchr_null.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/memrchr_null.rs rename to src/tools/miri/tests/fail-dep/shims/memrchr_null.rs diff --git a/src/tools/miri/tests/fail/shims/memrchr_null.stderr b/src/tools/miri/tests/fail-dep/shims/memrchr_null.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/memrchr_null.stderr rename to src/tools/miri/tests/fail-dep/shims/memrchr_null.stderr diff --git a/src/tools/miri/tests/fail/shims/mmap_invalid_dealloc.rs b/src/tools/miri/tests/fail-dep/shims/mmap_invalid_dealloc.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/mmap_invalid_dealloc.rs rename to src/tools/miri/tests/fail-dep/shims/mmap_invalid_dealloc.rs diff --git a/src/tools/miri/tests/fail/shims/mmap_invalid_dealloc.stderr b/src/tools/miri/tests/fail-dep/shims/mmap_invalid_dealloc.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/mmap_invalid_dealloc.stderr rename to src/tools/miri/tests/fail-dep/shims/mmap_invalid_dealloc.stderr diff --git a/src/tools/miri/tests/fail/shims/mmap_use_after_munmap.rs b/src/tools/miri/tests/fail-dep/shims/mmap_use_after_munmap.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/mmap_use_after_munmap.rs rename to src/tools/miri/tests/fail-dep/shims/mmap_use_after_munmap.rs diff --git a/src/tools/miri/tests/fail/shims/mmap_use_after_munmap.stderr b/src/tools/miri/tests/fail-dep/shims/mmap_use_after_munmap.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/mmap_use_after_munmap.stderr rename to src/tools/miri/tests/fail-dep/shims/mmap_use_after_munmap.stderr diff --git a/src/tools/miri/tests/fail/shims/munmap.rs b/src/tools/miri/tests/fail-dep/shims/munmap.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/munmap.rs rename to src/tools/miri/tests/fail-dep/shims/munmap.rs diff --git a/src/tools/miri/tests/fail/shims/munmap.stderr b/src/tools/miri/tests/fail-dep/shims/munmap.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/munmap.stderr rename to src/tools/miri/tests/fail-dep/shims/munmap.stderr diff --git a/src/tools/miri/tests/fail/shims/munmap_partial.rs b/src/tools/miri/tests/fail-dep/shims/munmap_partial.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/munmap_partial.rs rename to src/tools/miri/tests/fail-dep/shims/munmap_partial.rs diff --git a/src/tools/miri/tests/fail/shims/munmap_partial.stderr b/src/tools/miri/tests/fail-dep/shims/munmap_partial.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/munmap_partial.stderr rename to src/tools/miri/tests/fail-dep/shims/munmap_partial.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_cond_double_destroy.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_cond_double_destroy.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_cond_double_destroy.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_cond_double_destroy.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_cond_double_destroy.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_cond_double_destroy.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_cond_double_destroy.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_cond_double_destroy.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_condattr_double_destroy.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_condattr_double_destroy.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_condattr_double_destroy.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_condattr_double_destroy.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_condattr_double_destroy.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_condattr_double_destroy.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_condattr_double_destroy.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_condattr_double_destroy.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_NULL_deadlock.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_NULL_deadlock.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_NULL_deadlock.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_NULL_deadlock.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_NULL_deadlock.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_NULL_deadlock.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_NULL_deadlock.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_NULL_deadlock.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_deadlock.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_deadlock.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_deadlock.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_deadlock.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_deadlock.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_deadlock.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_deadlock.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_deadlock.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_default_deadlock.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_default_deadlock.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_default_deadlock.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_default_deadlock.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_default_deadlock.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_default_deadlock.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_default_deadlock.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_default_deadlock.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_destroy_locked.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_destroy_locked.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_destroy_locked.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_destroy_locked.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_destroy_locked.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_destroy_locked.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_destroy_locked.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_destroy_locked.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_double_destroy.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_double_destroy.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_double_destroy.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_double_destroy.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_double_destroy.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_double_destroy.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_double_destroy.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_double_destroy.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_normal_deadlock.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_normal_deadlock.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_normal_deadlock.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_normal_deadlock.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_normal_deadlock.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_normal_deadlock.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_normal_deadlock.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_normal_deadlock.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_wrong_owner.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_wrong_owner.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_wrong_owner.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_wrong_owner.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_wrong_owner.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_wrong_owner.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutex_wrong_owner.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutex_wrong_owner.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutexattr_double_destroy.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutexattr_double_destroy.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutexattr_double_destroy.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutexattr_double_destroy.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_mutexattr_double_destroy.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutexattr_double_destroy.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_mutexattr_double_destroy.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_mutexattr_double_destroy.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_destroy_read_locked.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_destroy_read_locked.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_destroy_read_locked.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_destroy_read_locked.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_destroy_read_locked.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_destroy_read_locked.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_destroy_read_locked.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_destroy_read_locked.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_destroy_write_locked.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_destroy_write_locked.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_destroy_write_locked.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_destroy_write_locked.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_destroy_write_locked.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_destroy_write_locked.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_destroy_write_locked.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_destroy_write_locked.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_double_destroy.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_double_destroy.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_double_destroy.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_double_destroy.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_double_destroy.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_double_destroy.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_double_destroy.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_double_destroy.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_read_wrong_owner.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_read_wrong_owner.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_read_wrong_owner.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_read_wrong_owner.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_read_wrong_owner.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_read_wrong_owner.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_read_wrong_owner.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_read_wrong_owner.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_unlock_unlocked.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_unlock_unlocked.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_unlock_unlocked.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_unlock_unlocked.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_unlock_unlocked.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_unlock_unlocked.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_unlock_unlocked.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_unlock_unlocked.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_read_deadlock.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_read_deadlock.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_read_deadlock.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_read_deadlock.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_write_deadlock.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_write_deadlock.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_write_deadlock.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_write_deadlock.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_wrong_owner.rs b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_wrong_owner.rs similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_wrong_owner.rs rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_wrong_owner.rs diff --git a/src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_wrong_owner.stderr b/src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_wrong_owner.stderr similarity index 100% rename from src/tools/miri/tests/fail/shims/sync/libc_pthread_rwlock_write_wrong_owner.stderr rename to src/tools/miri/tests/fail-dep/shims/sync/libc_pthread_rwlock_write_wrong_owner.stderr diff --git a/src/tools/miri/tests/fail/tokio/sleep.rs b/src/tools/miri/tests/fail-dep/tokio/sleep.rs similarity index 100% rename from src/tools/miri/tests/fail/tokio/sleep.rs rename to src/tools/miri/tests/fail-dep/tokio/sleep.rs diff --git a/src/tools/miri/tests/fail/tokio/sleep.stderr b/src/tools/miri/tests/fail-dep/tokio/sleep.stderr similarity index 100% rename from src/tools/miri/tests/fail/tokio/sleep.stderr rename to src/tools/miri/tests/fail-dep/tokio/sleep.stderr diff --git a/src/tools/miri/tests/fail/unsupported_incomplete_function.rs b/src/tools/miri/tests/fail-dep/unsupported_incomplete_function.rs similarity index 100% rename from src/tools/miri/tests/fail/unsupported_incomplete_function.rs rename to src/tools/miri/tests/fail-dep/unsupported_incomplete_function.rs diff --git a/src/tools/miri/tests/fail/unsupported_incomplete_function.stderr b/src/tools/miri/tests/fail-dep/unsupported_incomplete_function.stderr similarity index 100% rename from src/tools/miri/tests/fail/unsupported_incomplete_function.stderr rename to src/tools/miri/tests/fail-dep/unsupported_incomplete_function.stderr From 0d5f51c290070335efa228c301d7ed5412a248ed Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Fri, 4 Aug 2023 11:22:06 +0000 Subject: [PATCH 03/13] Bump ui_test crate --- src/tools/miri/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/miri/Cargo.toml b/src/tools/miri/Cargo.toml index 86ba460bb86..fa03be87596 100644 --- a/src/tools/miri/Cargo.toml +++ b/src/tools/miri/Cargo.toml @@ -36,7 +36,7 @@ libloading = "0.7" [dev-dependencies] colored = "2" -ui_test = "0.14" +ui_test = "0.14.1" rustc_version = "0.4" # Features chosen to match those required by env_logger, to avoid rebuilds regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] } From e7063679414915d6eb70905b53723a3c21f3a141 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Fri, 4 Aug 2023 11:26:55 +0000 Subject: [PATCH 04/13] Allow limiting the number of threads running in parallel --- src/tools/miri/tests/compiletest.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tools/miri/tests/compiletest.rs b/src/tools/miri/tests/compiletest.rs index d84f943a6f9..13415a409d6 100644 --- a/src/tools/miri/tests/compiletest.rs +++ b/src/tools/miri/tests/compiletest.rs @@ -1,6 +1,7 @@ use colored::*; use regex::bytes::Regex; use std::ffi::OsString; +use std::num::NonZeroUsize; use std::path::{Path, PathBuf}; use std::{env, process::Command}; use ui_test::{color_eyre::Result, Config, Match, Mode, OutputConflictHandling}; @@ -128,7 +129,10 @@ fn run_tests(mode: Mode, path: &str, target: &str, with_dependencies: bool) -> R eprintln!(" Compiler: {}", config.program.display()); ui_test::run_tests_generic( vec![config], - std::thread::available_parallelism().unwrap(), + std::env::var("MIRI_TEST_THREADS").map_or_else( + |_| std::thread::available_parallelism().unwrap(), + |threads| NonZeroUsize::new(threads.parse().unwrap()).unwrap(), + ), args, // The files we're actually interested in (all `.rs` files). ui_test::default_file_filter, From 9f4e7c69456d56d1ec5ae18a82b816135e0dcdf4 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 8 Aug 2023 07:23:16 +0000 Subject: [PATCH 05/13] Bump ui_test crate --- src/tools/miri/Cargo.lock | 38 ++++++++++--- src/tools/miri/Cargo.toml | 2 +- src/tools/miri/tests/compiletest.rs | 56 ++++++++++--------- .../pass/backtrace/backtrace-api-v0.stdout | 2 +- .../pass/backtrace/backtrace-api-v1.stdout | 2 +- 5 files changed, 61 insertions(+), 39 deletions(-) diff --git a/src/tools/miri/Cargo.lock b/src/tools/miri/Cargo.lock index f0a145767b3..d236e4bbcb4 100644 --- a/src/tools/miri/Cargo.lock +++ b/src/tools/miri/Cargo.lock @@ -26,6 +26,16 @@ dependencies = [ "memchr", ] +[[package]] +name = "annotate-snippets" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3b9d411ecbaf79885c6df4d75fff75858d5995ff25385657a28af47e82f9c36" +dependencies = [ + "unicode-width", + "yansi-term", +] + [[package]] name = "ansi_term" version = "0.12.1" @@ -216,12 +226,6 @@ dependencies = [ "windows-sys 0.45.0", ] -[[package]] -name = "distance" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9d8664cf849d7d0f3114a3a387d2f5e4303176d746d5a951aaddc66dfe9240" - [[package]] name = "encode_unicode" version = "0.3.6" @@ -372,6 +376,12 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +[[package]] +name = "levenshtein" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" + [[package]] name = "libc" version = "0.2.148" @@ -937,10 +947,11 @@ dependencies = [ [[package]] name = "ui_test" -version = "0.14.2" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d15b71b50d95aeb687f68289543b9cabdbec7afc277176ce9dfcf192c7035d" +checksum = "accffe020b57a6dd50014d457b5842c5a2ca73cd84f07d86d0a19c460a6509ae" dependencies = [ + "annotate-snippets", "anyhow", "bstr", "cargo-platform", @@ -949,9 +960,9 @@ dependencies = [ "colored", "comma", "crossbeam-channel", - "distance", "indicatif", "lazy_static", + "levenshtein", "prettydiff", "regex", "rustc_version", @@ -1147,3 +1158,12 @@ name = "windows_x86_64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "yansi-term" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5c30ade05e61656247b2e334a031dfd0cc466fadef865bdcdea8d537951bf1" +dependencies = [ + "winapi", +] diff --git a/src/tools/miri/Cargo.toml b/src/tools/miri/Cargo.toml index fa03be87596..0df2c160e2f 100644 --- a/src/tools/miri/Cargo.toml +++ b/src/tools/miri/Cargo.toml @@ -36,7 +36,7 @@ libloading = "0.7" [dev-dependencies] colored = "2" -ui_test = "0.14.1" +ui_test = "0.21.1" rustc_version = "0.4" # Features chosen to match those required by env_logger, to avoid rebuilds regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] } diff --git a/src/tools/miri/tests/compiletest.rs b/src/tools/miri/tests/compiletest.rs index 13415a409d6..2a817172bc1 100644 --- a/src/tools/miri/tests/compiletest.rs +++ b/src/tools/miri/tests/compiletest.rs @@ -5,7 +5,7 @@ use std::num::NonZeroUsize; use std::path::{Path, PathBuf}; use std::{env, process::Command}; use ui_test::{color_eyre::Result, Config, Match, Mode, OutputConflictHandling}; -use ui_test::{status_emitter, CommandBuilder}; +use ui_test::{status_emitter, CommandBuilder, Format, RustfixMode}; fn miri_path() -> PathBuf { PathBuf::from(option_env!("MIRI").unwrap_or(env!("CARGO_BIN_EXE_miri"))) @@ -79,25 +79,17 @@ fn test_config(target: &str, path: &str, mode: Mode, with_dependencies: bool) -> program.args.push(flag); } - let bless = env::var_os("RUSTC_BLESS").is_some_and(|v| v != "0"); - let skip_ui_checks = env::var_os("MIRI_SKIP_UI_CHECKS").is_some(); - - let output_conflict_handling = match (bless, skip_ui_checks) { - (false, false) => OutputConflictHandling::Error("./miri test --bless".into()), - (true, false) => OutputConflictHandling::Bless, - (false, true) => OutputConflictHandling::Ignore, - (true, true) => panic!("cannot use RUSTC_BLESS and MIRI_SKIP_UI_CHECKS at the same time"), - }; - let mut config = Config { target: Some(target.to_owned()), stderr_filters: STDERR.clone(), stdout_filters: STDOUT.clone(), mode, program, - output_conflict_handling, out_dir: PathBuf::from(std::env::var_os("CARGO_TARGET_DIR").unwrap()).join("ui"), edition: Some("2021".into()), + threads: std::env::var("MIRI_TEST_THREADS") + .ok() + .map(|threads| NonZeroUsize::new(threads.parse().unwrap()).unwrap()), ..Config::rustc(path) }; @@ -121,25 +113,31 @@ fn test_config(target: &str, path: &str, mode: Mode, with_dependencies: bool) -> } fn run_tests(mode: Mode, path: &str, target: &str, with_dependencies: bool) -> Result<()> { - let config = test_config(target, path, mode, with_dependencies); + let mut config = test_config(target, path, mode, with_dependencies); // Handle command-line arguments. - let args = ui_test::Args::test(); - let quiet = args.quiet; + let args = ui_test::Args::test()?; + let default_bless = env::var_os("RUSTC_BLESS").is_some_and(|v| v != "0"); + config.with_args(&args, default_bless); + if let OutputConflictHandling::Error(msg) = &mut config.output_conflict_handling { + *msg = "./miri test --bless".into(); + } + if env::var_os("MIRI_SKIP_UI_CHECKS").is_some() { + assert!(!default_bless, "cannot use RUSTC_BLESS and MIRI_SKIP_UI_CHECKS at the same time"); + config.output_conflict_handling = OutputConflictHandling::Ignore; + } eprintln!(" Compiler: {}", config.program.display()); ui_test::run_tests_generic( vec![config], - std::env::var("MIRI_TEST_THREADS").map_or_else( - |_| std::thread::available_parallelism().unwrap(), - |threads| NonZeroUsize::new(threads.parse().unwrap()).unwrap(), - ), - args, // The files we're actually interested in (all `.rs` files). ui_test::default_file_filter, // This could be used to overwrite the `Config` on a per-test basis. - |_, _| {}, + |_, _, _| {}, ( - if quiet { status_emitter::Text::quiet() } else { status_emitter::Text::verbose() }, + match args.format { + Format::Terse => status_emitter::Text::quiet(), + Format::Pretty => status_emitter::Text::verbose(), + }, status_emitter::Gha:: { name: format!("{mode:?} {path} ({target})"), }, @@ -244,13 +242,13 @@ fn main() -> Result<()> { ui(Mode::Pass, "tests/pass-dep", &target, WithDependencies)?; ui(Mode::Panic, "tests/panic", &target, WithDependencies)?; ui( - Mode::Fail { require_patterns: true, rustfix: false }, + Mode::Fail { require_patterns: true, rustfix: RustfixMode::Disabled }, "tests/fail", &target, WithoutDependencies, )?; ui( - Mode::Fail { require_patterns: true, rustfix: false }, + Mode::Fail { require_patterns: true, rustfix: RustfixMode::Disabled }, "tests/fail-dep", &target, WithDependencies, @@ -258,7 +256,7 @@ fn main() -> Result<()> { if cfg!(target_os = "linux") { ui(Mode::Pass, "tests/extern-so/pass", &target, WithoutDependencies)?; ui( - Mode::Fail { require_patterns: true, rustfix: false }, + Mode::Fail { require_patterns: true, rustfix: RustfixMode::Disabled }, "tests/extern-so/fail", &target, WithoutDependencies, @@ -270,8 +268,12 @@ fn main() -> Result<()> { fn run_dep_mode(target: String, mut args: impl Iterator) -> Result<()> { let path = args.next().expect("./miri run-dep must be followed by a file name"); - let mut config = - test_config(&target, "", Mode::Yolo { rustfix: false }, /* with dependencies */ true); + let mut config = test_config( + &target, + "", + Mode::Yolo { rustfix: RustfixMode::Disabled }, + /* with dependencies */ true, + ); config.program.args.clear(); // We want to give the user full control over flags let dep_args = config.build_dependencies()?; diff --git a/src/tools/miri/tests/pass/backtrace/backtrace-api-v0.stdout b/src/tools/miri/tests/pass/backtrace/backtrace-api-v0.stdout index 2fe31dd0e6b..c9cab268168 100644 --- a/src/tools/miri/tests/pass/backtrace/backtrace-api-v0.stdout +++ b/src/tools/miri/tests/pass/backtrace/backtrace-api-v0.stdout @@ -1,5 +1,5 @@ $DIR/backtrace-api-v0.rs:24:14 (func_d) $DIR/backtrace-api-v0.rs:20:5 (func_c) -$DIR/backtrace-api-v0.rs:9:5 (func_b) +$DIR/backtrace-api-v0.rs:9:5 (func_b::) $DIR/backtrace-api-v0.rs:5:5 (func_a) $DIR/backtrace-api-v0.rs:29:18 (main) diff --git a/src/tools/miri/tests/pass/backtrace/backtrace-api-v1.stdout b/src/tools/miri/tests/pass/backtrace/backtrace-api-v1.stdout index 0d2ae3b516a..e145c167e88 100644 --- a/src/tools/miri/tests/pass/backtrace/backtrace-api-v1.stdout +++ b/src/tools/miri/tests/pass/backtrace/backtrace-api-v1.stdout @@ -1,5 +1,5 @@ $DIR/backtrace-api-v1.rs:27:9 (func_d) $DIR/backtrace-api-v1.rs:20:5 (func_c) -$DIR/backtrace-api-v1.rs:9:5 (func_b) +$DIR/backtrace-api-v1.rs:9:5 (func_b::) $DIR/backtrace-api-v1.rs:5:5 (func_a) $DIR/backtrace-api-v1.rs:34:18 (main) From 5f440dd0696cf54feb560601c7bc383e49511f1a Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Sun, 24 Sep 2023 12:44:54 -0400 Subject: [PATCH 06/13] GC the Stacked Borrows allocation history --- src/tools/miri/bench-cargo-miri/invalidate/Cargo.lock | 7 +++++++ src/tools/miri/bench-cargo-miri/invalidate/Cargo.toml | 8 ++++++++ src/tools/miri/bench-cargo-miri/invalidate/src/main.rs | 4 ++++ .../src/borrow_tracker/stacked_borrows/diagnostics.rs | 7 +++++++ src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs | 1 + 5 files changed, 27 insertions(+) create mode 100644 src/tools/miri/bench-cargo-miri/invalidate/Cargo.lock create mode 100644 src/tools/miri/bench-cargo-miri/invalidate/Cargo.toml create mode 100644 src/tools/miri/bench-cargo-miri/invalidate/src/main.rs diff --git a/src/tools/miri/bench-cargo-miri/invalidate/Cargo.lock b/src/tools/miri/bench-cargo-miri/invalidate/Cargo.lock new file mode 100644 index 00000000000..7bf23225ea5 --- /dev/null +++ b/src/tools/miri/bench-cargo-miri/invalidate/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "invalidate" +version = "0.1.0" diff --git a/src/tools/miri/bench-cargo-miri/invalidate/Cargo.toml b/src/tools/miri/bench-cargo-miri/invalidate/Cargo.toml new file mode 100644 index 00000000000..14cf0882f0b --- /dev/null +++ b/src/tools/miri/bench-cargo-miri/invalidate/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "invalidate" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/src/tools/miri/bench-cargo-miri/invalidate/src/main.rs b/src/tools/miri/bench-cargo-miri/invalidate/src/main.rs new file mode 100644 index 00000000000..fa8deb851c3 --- /dev/null +++ b/src/tools/miri/bench-cargo-miri/invalidate/src/main.rs @@ -0,0 +1,4 @@ +fn main() { + // The end of the range is just chosen to make the benchmark run for a few seconds. + for _ in 0..200_000 {} +} diff --git a/src/tools/miri/src/borrow_tracker/stacked_borrows/diagnostics.rs b/src/tools/miri/src/borrow_tracker/stacked_borrows/diagnostics.rs index 9b0f13dd62c..1ef30cb9fad 100644 --- a/src/tools/miri/src/borrow_tracker/stacked_borrows/diagnostics.rs +++ b/src/tools/miri/src/borrow_tracker/stacked_borrows/diagnostics.rs @@ -1,6 +1,7 @@ use smallvec::SmallVec; use std::fmt; +use rustc_data_structures::fx::FxHashSet; use rustc_middle::mir::interpret::{alloc_range, AllocId, AllocRange, InterpError}; use rustc_span::{Span, SpanData}; use rustc_target::abi::Size; @@ -233,6 +234,12 @@ impl AllocHistory { protectors: SmallVec::new(), } } + + pub fn retain(&mut self, live_tags: &FxHashSet) { + self.invalidations.retain(|event| live_tags.contains(&event.tag)); + self.creations.retain(|event| live_tags.contains(&event.retag.new_tag)); + self.protectors.retain(|event| live_tags.contains(&event.tag)); + } } impl<'history, 'ecx, 'mir, 'tcx> DiagnosticCx<'history, 'ecx, 'mir, 'tcx> { diff --git a/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs b/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs index a54bd32cd40..e670dcef330 100644 --- a/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs +++ b/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs @@ -456,6 +456,7 @@ impl Stacks { stack.retain(live_tags); } } + self.history.retain(live_tags); self.modified_since_last_gc = false; } } From 1ec85a84413c527449ea1772b3f2c2f77b9be3d0 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Mon, 25 Sep 2023 10:31:05 +0000 Subject: [PATCH 07/13] Document new env var --- src/tools/miri/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/miri/README.md b/src/tools/miri/README.md index f6a023181d8..6127eada222 100644 --- a/src/tools/miri/README.md +++ b/src/tools/miri/README.md @@ -478,6 +478,8 @@ Moreover, Miri recognizes some environment variables: * `MIRI_TEST_TARGET` (recognized by the test suite and the `./miri` script) indicates which target architecture to test against. `miri` and `cargo miri` accept the `--target` flag for the same purpose. +* `MIRI_TEST_THREADS` (recognized by the test suite): set the number of threads to use for running tests. + By default the number of cores is used. * `MIRI_NO_STD` (recognized by `cargo miri` and the test suite) makes sure that the target's sysroot is built without libstd. This allows testing and running no_std programs. * `RUSTC_BLESS` (recognized by the test suite and `cargo-miri-test/run-test.py`): overwrite all From 71aea48fc6e918922b069eb3346f54a33d9d7542 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Mon, 25 Sep 2023 10:32:24 +0000 Subject: [PATCH 08/13] Explain single element vector --- src/tools/miri/tests/compiletest.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/miri/tests/compiletest.rs b/src/tools/miri/tests/compiletest.rs index 2a817172bc1..fe799216f0e 100644 --- a/src/tools/miri/tests/compiletest.rs +++ b/src/tools/miri/tests/compiletest.rs @@ -128,6 +128,8 @@ fn run_tests(mode: Mode, path: &str, target: &str, with_dependencies: bool) -> R } eprintln!(" Compiler: {}", config.program.display()); ui_test::run_tests_generic( + // Only run one test suite. In the future we can add all test suites to one `Vec` and run + // them all at once, making best use of systems with high parallelism. vec![config], // The files we're actually interested in (all `.rs` files). ui_test::default_file_filter, From ee30aaf7ea5ac3db40cd6da4172e214c5dbd9ef0 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 25 Sep 2023 13:38:26 +0200 Subject: [PATCH 09/13] fix normalization in backtrace-api tests also remove a normalization rule that doesn't seem to apply --- src/tools/miri/tests/compiletest.rs | 4 +--- .../miri/tests/pass/backtrace/backtrace-api-v0.rs | 2 ++ .../tests/pass/backtrace/backtrace-api-v0.stderr | 15 ++++++++++++++- .../miri/tests/pass/backtrace/backtrace-api-v1.rs | 2 ++ .../tests/pass/backtrace/backtrace-api-v1.stderr | 15 ++++++++++++++- 5 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/tools/miri/tests/compiletest.rs b/src/tools/miri/tests/compiletest.rs index fe799216f0e..035846f0ef9 100644 --- a/src/tools/miri/tests/compiletest.rs +++ b/src/tools/miri/tests/compiletest.rs @@ -179,8 +179,6 @@ regexes! { r" +at (.*\.rs)" => " at $1", // erase generics in backtraces "([0-9]+: .*)::<.*>" => "$1", - // erase addresses in backtraces - "([0-9]+: ) +0x[0-9a-f]+ - (.*)" => "$1$2", // erase long hexadecimals r"0x[0-9a-fA-F]+[0-9a-fA-F]{2,2}" => "$$HEX", // erase specific alignments @@ -192,7 +190,7 @@ regexes! { // Windows file paths r"\\" => "/", // erase Rust stdlib path - "[^ `]*/(rust[^/]*|checkout)/library/" => "RUSTLIB/", + "[^ \n`]*/(rust[^/]*|checkout)/library/" => "RUSTLIB/", // erase platform file paths "sys/[a-z]+/" => "sys/PLATFORM/", // erase paths into the crate registry diff --git a/src/tools/miri/tests/pass/backtrace/backtrace-api-v0.rs b/src/tools/miri/tests/pass/backtrace/backtrace-api-v0.rs index 5cd12959ca4..8d3173da400 100644 --- a/src/tools/miri/tests/pass/backtrace/backtrace-api-v0.rs +++ b/src/tools/miri/tests/pass/backtrace/backtrace-api-v0.rs @@ -41,6 +41,8 @@ fn main() { eprintln!("{}", out); // Print the 'main' frame (and everything before it) to stdout, skipping // the printing of internal (and possibly fragile) libstd frames. + // Stdout is less normalized so we see more, but it also means we can print less + // as platform differences would lead to test suite failures. if !seen_main { println!("{}", out); seen_main = name == "main"; diff --git a/src/tools/miri/tests/pass/backtrace/backtrace-api-v0.stderr b/src/tools/miri/tests/pass/backtrace/backtrace-api-v0.stderr index ee556b3e4a0..bc24d6de734 100644 --- a/src/tools/miri/tests/pass/backtrace/backtrace-api-v0.stderr +++ b/src/tools/miri/tests/pass/backtrace/backtrace-api-v0.stderr @@ -2,4 +2,17 @@ $DIR/backtrace-api-v0.rs:LL:CC (func_d) $DIR/backtrace-api-v0.rs:LL:CC (func_c) $DIR/backtrace-api-v0.rs:LL:CC (func_b) $DIR/backtrace-api-v0.rs:LL:CC (func_a) -$DIR/backtrace-api-v0.rs:LL:CC RUSTLIB/core/src/ops/function.rs:LL:CC (>::call_once - RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC (std::sys_common::backtrace::__rust_begin_short_backtrace) +$DIR/backtrace-api-v0.rs:LL:CC (main) +RUSTLIB/core/src/ops/function.rs:LL:CC (>::call_once - shim(fn())) +RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC (std::sys_common::backtrace::__rust_begin_short_backtrace) +RUSTLIB/std/src/rt.rs:LL:CC (std::rt::lang_start::{closure#0}) +RUSTLIB/core/src/ops/function.rs:LL:CC (std::ops::function::impls::call_once) +RUSTLIB/std/src/panicking.rs:LL:CC (std::panicking::r#try::do_call) +RUSTLIB/std/src/panicking.rs:LL:CC (std::panicking::r#try) +RUSTLIB/std/src/panic.rs:LL:CC (std::panic::catch_unwind) +RUSTLIB/std/src/rt.rs:LL:CC (std::rt::lang_start_internal::{closure#2}) +RUSTLIB/std/src/panicking.rs:LL:CC (std::panicking::r#try::do_call) +RUSTLIB/std/src/panicking.rs:LL:CC (std::panicking::r#try) +RUSTLIB/std/src/panic.rs:LL:CC (std::panic::catch_unwind) +RUSTLIB/std/src/rt.rs:LL:CC (std::rt::lang_start_internal) +RUSTLIB/std/src/rt.rs:LL:CC (std::rt::lang_start) diff --git a/src/tools/miri/tests/pass/backtrace/backtrace-api-v1.rs b/src/tools/miri/tests/pass/backtrace/backtrace-api-v1.rs index 1e35574b39b..ad05271ca51 100644 --- a/src/tools/miri/tests/pass/backtrace/backtrace-api-v1.rs +++ b/src/tools/miri/tests/pass/backtrace/backtrace-api-v1.rs @@ -54,6 +54,8 @@ fn main() { eprintln!("{}", out); // Print the 'main' frame (and everything before it) to stdout, skipping // the printing of internal (and possibly fragile) libstd frames. + // Stdout is less normalized so we see more, but it also means we can print less + // as platform differences would lead to test suite failures. if !seen_main { println!("{}", out); seen_main = name == "main"; diff --git a/src/tools/miri/tests/pass/backtrace/backtrace-api-v1.stderr b/src/tools/miri/tests/pass/backtrace/backtrace-api-v1.stderr index 7dc281af31d..246e54becd8 100644 --- a/src/tools/miri/tests/pass/backtrace/backtrace-api-v1.stderr +++ b/src/tools/miri/tests/pass/backtrace/backtrace-api-v1.stderr @@ -2,4 +2,17 @@ $DIR/backtrace-api-v1.rs:LL:CC (func_d) $DIR/backtrace-api-v1.rs:LL:CC (func_c) $DIR/backtrace-api-v1.rs:LL:CC (func_b) $DIR/backtrace-api-v1.rs:LL:CC (func_a) -$DIR/backtrace-api-v1.rs:LL:CC RUSTLIB/core/src/ops/function.rs:LL:CC (>::call_once - RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC (std::sys_common::backtrace::__rust_begin_short_backtrace) +$DIR/backtrace-api-v1.rs:LL:CC (main) +RUSTLIB/core/src/ops/function.rs:LL:CC (>::call_once - shim(fn())) +RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC (std::sys_common::backtrace::__rust_begin_short_backtrace) +RUSTLIB/std/src/rt.rs:LL:CC (std::rt::lang_start::{closure#0}) +RUSTLIB/core/src/ops/function.rs:LL:CC (std::ops::function::impls::call_once) +RUSTLIB/std/src/panicking.rs:LL:CC (std::panicking::r#try::do_call) +RUSTLIB/std/src/panicking.rs:LL:CC (std::panicking::r#try) +RUSTLIB/std/src/panic.rs:LL:CC (std::panic::catch_unwind) +RUSTLIB/std/src/rt.rs:LL:CC (std::rt::lang_start_internal::{closure#2}) +RUSTLIB/std/src/panicking.rs:LL:CC (std::panicking::r#try::do_call) +RUSTLIB/std/src/panicking.rs:LL:CC (std::panicking::r#try) +RUSTLIB/std/src/panic.rs:LL:CC (std::panic::catch_unwind) +RUSTLIB/std/src/rt.rs:LL:CC (std::rt::lang_start_internal) +RUSTLIB/std/src/rt.rs:LL:CC (std::rt::lang_start) From fc0d833f6fb9876c367bb738927525102e5761a7 Mon Sep 17 00:00:00 2001 From: The Miri Conjob Bot Date: Wed, 27 Sep 2023 05:38:37 +0000 Subject: [PATCH 10/13] Preparing for merge from rustc --- src/tools/miri/rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version index 458bba9a616..3f1babf5323 100644 --- a/src/tools/miri/rust-version +++ b/src/tools/miri/rust-version @@ -1 +1 @@ -42ca6e4e5760a548a6fa858482de6d237f6fb3b8 +d206f2c0857eb879877f27508139dd62a40294c3 From c8a44b1eaf5aed5cf8e57340f1ac56c9bad08acf Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 27 Sep 2023 08:50:16 +0200 Subject: [PATCH 11/13] clippy --- src/tools/miri/cargo-miri/src/phases.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/miri/cargo-miri/src/phases.rs b/src/tools/miri/cargo-miri/src/phases.rs index 80ce6325582..d655df6d994 100644 --- a/src/tools/miri/cargo-miri/src/phases.rs +++ b/src/tools/miri/cargo-miri/src/phases.rs @@ -10,7 +10,7 @@ use rustc_version::VersionMeta; use crate::{setup::*, util::*}; -const CARGO_MIRI_HELP: &str = r#"Runs binary crates and tests in Miri +const CARGO_MIRI_HELP: &str = r"Runs binary crates and tests in Miri Usage: cargo miri [subcommand] [...] [--] [...] @@ -31,7 +31,7 @@ Examples: This will print the path to the generated sysroot (and nothing else) on stdout. stderr will still contain progress information about how the build is doing. -"#; +"; fn show_help() { println!("{CARGO_MIRI_HELP}"); From 3b091cb5044ecc956a87993870276311a0e15340 Mon Sep 17 00:00:00 2001 From: The Miri Conjob Bot Date: Thu, 28 Sep 2023 05:11:51 +0000 Subject: [PATCH 12/13] Preparing for merge from rustc --- src/tools/miri/rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version index 3f1babf5323..07dd52ce941 100644 --- a/src/tools/miri/rust-version +++ b/src/tools/miri/rust-version @@ -1 +1 @@ -d206f2c0857eb879877f27508139dd62a40294c3 +2ba4eb2d49e774b5fbc2a06258ac7b0f60b92b7e From e0f4ab84a7e27e6449252ed416ceeb2fbb0fbbbe Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 28 Sep 2023 16:42:07 +0200 Subject: [PATCH 13/13] update lockfile --- Cargo.lock | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 014e14e5399..2ba0a9b895c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2419,7 +2419,7 @@ dependencies = [ "rustc_version", "serde", "smallvec", - "ui_test 0.11.7", + "ui_test 0.21.2", ] [[package]] @@ -5621,18 +5621,23 @@ checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" [[package]] name = "ui_test" -version = "0.11.7" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c21899b59f53717dfad29e4f46e5b21a200a1b6888ab86532a07cfc8b48dd78c" +checksum = "bfd8fb9b15c8332cf51bfc2dc4830063b2446a9c9d732421b56f2478024a3971" dependencies = [ + "annotate-snippets", + "anyhow", "bstr", "cargo-platform", "cargo_metadata", "color-eyre", "colored", + "comma", "crossbeam-channel", - "diff", + "indicatif", "lazy_static", + "levenshtein", + "prettydiff", "regex", "rustc_version", "rustfix", @@ -5643,9 +5648,9 @@ dependencies = [ [[package]] name = "ui_test" -version = "0.20.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfd8fb9b15c8332cf51bfc2dc4830063b2446a9c9d732421b56f2478024a3971" +checksum = "aaf4bf7c184b8dfc7a4d3b90df789b1eb992ee42811cd115f32a7a1eb781058d" dependencies = [ "annotate-snippets", "anyhow",