From 3281f025933c42c5c865d2d6c3d3d18a8c7246fa Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 7 Jun 2025 12:14:08 +0200 Subject: [PATCH] bless non-Linux tests --- .../apple_os_unfair_lock_assert_not_owner.stderr | 2 +- .../concurrency/apple_os_unfair_lock_assert_owner.stderr | 2 +- .../concurrency/apple_os_unfair_lock_move_deadlock.stderr | 4 ++-- .../concurrency/apple_os_unfair_lock_reentrant.stderr | 2 +- .../concurrency/apple_os_unfair_lock_unowned.stderr | 2 +- .../fail-dep/concurrency/windows_join_detached.stderr | 2 +- .../miri/tests/fail-dep/concurrency/windows_join_main.rs | 2 +- .../tests/fail-dep/concurrency/windows_join_main.stderr | 8 ++++---- .../miri/tests/fail-dep/concurrency/windows_join_self.rs | 2 +- .../tests/fail-dep/concurrency/windows_join_self.stderr | 8 ++++---- .../fail/concurrency/read_only_atomic_load_large.stderr | 4 +--- .../tests/fail/function_calls/target_feature_wasm.stderr | 2 +- 12 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.stderr b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.stderr index 3fd02d38aae4..27bee79177ed 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.stderr @@ -2,7 +2,7 @@ error: abnormal termination: called os_unfair_lock_assert_not_owner on an os_unf --> tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.rs:LL:CC | LL | libc::os_unfair_lock_assert_not_owner(lock.get()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ called os_unfair_lock_assert_not_owner on an os_unfair_lock owned by the current thread + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | = note: BACKTRACE: = note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.rs:LL:CC diff --git a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.stderr b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.stderr index 0b5dfe4ba61b..be53ee61c4cf 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.stderr @@ -2,7 +2,7 @@ error: abnormal termination: called os_unfair_lock_assert_owner on an os_unfair_ --> tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.rs:LL:CC | LL | libc::os_unfair_lock_assert_owner(lock.get()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ called os_unfair_lock_assert_owner on an os_unfair_lock not owned by the current thread + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | = note: BACKTRACE: = note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.rs:LL:CC diff --git a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_deadlock.stderr b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_deadlock.stderr index f043c7074f03..d00da6d6d9f0 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_deadlock.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_deadlock.stderr @@ -1,8 +1,8 @@ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> tests/fail-dep/concurrency/apple_os_unfair_lock_move_deadlock.rs:LL:CC | LL | unsafe { libc::os_unfair_lock_lock(lock.get()) }; - | ^ the evaluated program deadlocked + | ^ this thread got stuck here | = note: BACKTRACE: = note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_move_deadlock.rs:LL:CC diff --git a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.stderr b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.stderr index 3b02936b1f21..08696a9b261e 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.stderr @@ -2,7 +2,7 @@ error: abnormal termination: attempted to lock an os_unfair_lock that is already --> tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.rs:LL:CC | LL | libc::os_unfair_lock_lock(lock.get()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to lock an os_unfair_lock that is already locked by the current thread + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | = note: BACKTRACE: = note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.rs:LL:CC diff --git a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.stderr b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.stderr index 192e1cdc4752..aaeb73176bff 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.stderr @@ -2,7 +2,7 @@ error: abnormal termination: attempted to unlock an os_unfair_lock not owned by --> tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.rs:LL:CC | LL | libc::os_unfair_lock_unlock(lock.get()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to unlock an os_unfair_lock not owned by the current thread + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | = note: BACKTRACE: = note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.rs:LL:CC diff --git a/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr b/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr index 947d665b95a1..d8a3e058da93 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr @@ -2,7 +2,7 @@ error: Undefined Behavior: trying to join a detached thread --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC | LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(), c::INFINITE) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join a detached thread + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information diff --git a/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.rs b/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.rs index 2980d257a292..da549a8d117d 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.rs +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.rs @@ -18,7 +18,7 @@ const MAIN_THREAD: HANDLE = (2i32 << 29) as HANDLE; fn main() { thread::spawn(|| { unsafe { - assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0); //~ ERROR: deadlock: the evaluated program deadlocked + assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0); //~ ERROR: deadlock } }) .join() diff --git a/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr b/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr index 6540543d8da3..079f01c0e549 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr @@ -1,18 +1,18 @@ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> tests/fail-dep/concurrency/windows_join_main.rs:LL:CC | LL | assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program deadlocked + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this thread got stuck here | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at RUSTLIB/core/src/macros/mod.rs:LL:CC = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC | LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(), c::INFINITE) }; - | ^ the evaluated program deadlocked + | ^ this thread got stuck here | = note: BACKTRACE: = note: inside `std::sys::pal::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC diff --git a/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.rs b/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.rs index 85672ec860f5..db3615ad34ee 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.rs +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.rs @@ -14,7 +14,7 @@ fn main() { thread::spawn(|| { unsafe { let native = GetCurrentThread(); - assert_eq!(WaitForSingleObject(native, INFINITE), WAIT_OBJECT_0); //~ ERROR: deadlock: the evaluated program deadlocked + assert_eq!(WaitForSingleObject(native, INFINITE), WAIT_OBJECT_0); //~ ERROR: deadlock } }) .join() diff --git a/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr b/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr index 4e640296dbe4..70de94f56bac 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr @@ -1,17 +1,17 @@ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> tests/fail-dep/concurrency/windows_join_self.rs:LL:CC | LL | assert_eq!(WaitForSingleObject(native, INFINITE), WAIT_OBJECT_0); - | ^ the evaluated program deadlocked + | ^ this thread got stuck here | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/concurrency/windows_join_self.rs:LL:CC -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC | LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(), c::INFINITE) }; - | ^ the evaluated program deadlocked + | ^ this thread got stuck here | = note: BACKTRACE: = note: inside `std::sys::pal::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC diff --git a/src/tools/miri/tests/fail/concurrency/read_only_atomic_load_large.stderr b/src/tools/miri/tests/fail/concurrency/read_only_atomic_load_large.stderr index f4cec9879b7c..1fcc88f87356 100644 --- a/src/tools/miri/tests/fail/concurrency/read_only_atomic_load_large.stderr +++ b/src/tools/miri/tests/fail/concurrency/read_only_atomic_load_large.stderr @@ -4,9 +4,7 @@ error: Undefined Behavior: large atomic load operations cannot be performed on r --> tests/fail/concurrency/read_only_atomic_load_large.rs:LL:CC | LL | x.load(Ordering::Relaxed); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ large atomic load operations cannot be performed on read-only memory -these operations often have to be implemented using read-modify-write operations, which require writeable memory -see for more information + | ^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information diff --git a/src/tools/miri/tests/fail/function_calls/target_feature_wasm.stderr b/src/tools/miri/tests/fail/function_calls/target_feature_wasm.stderr index 9cc815465312..a89c59123450 100644 --- a/src/tools/miri/tests/fail/function_calls/target_feature_wasm.stderr +++ b/src/tools/miri/tests/fail/function_calls/target_feature_wasm.stderr @@ -2,7 +2,7 @@ error: abnormal termination: calling a function that requires unavailable target --> tests/fail/function_calls/target_feature_wasm.rs:LL:CC | LL | simd128_fn(); - | ^^^^^^^^^^^^ calling a function that requires unavailable target features: simd128 + | ^^^^^^^^^^^^ abnormal termination occurred here | = note: BACKTRACE: = note: inside `main` at tests/fail/function_calls/target_feature_wasm.rs:LL:CC