Skip to content

Commit 137b65c

Browse files
committed
std: update miri tests
1 parent 232ab5a commit 137b65c

11 files changed

+28
-28
lines changed

src/tools/miri/tests/compiletest.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,13 @@ regexes! {
185185
// erase thread caller ids
186186
r"call [0-9]+" => "call ID",
187187
// erase platform module paths
188-
"sys::[a-z]+::" => "sys::PLATFORM::",
188+
"sys::pal::[a-z]+::" => "sys::pal::PLATFORM::",
189189
// Windows file paths
190190
r"\\" => "/",
191191
// erase Rust stdlib path
192192
"[^ \n`]*/(rust[^/]*|checkout)/library/" => "RUSTLIB/",
193193
// erase platform file paths
194-
"sys/[a-z]+/" => "sys/PLATFORM/",
194+
"sys/pal/[a-z]+/" => "sys/pal/PLATFORM/",
195195
// erase paths into the crate registry
196196
r"[^ ]*/\.?cargo/registry/.*/(.*\.rs)" => "CARGO_REGISTRY/.../$1",
197197
}

src/tools/miri/tests/fail/alloc/global_system_mixup.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: Undefined Behavior: deallocating ALLOC, which is Rust heap memory, using PLATFORM heap deallocation operation
2-
--> RUSTLIB/std/src/sys/PLATFORM/alloc.rs:LL:CC
2+
--> RUSTLIB/std/src/sys/pal/PLATFORM/alloc.rs:LL:CC
33
|
44
LL | FREE();
55
| ^ deallocating ALLOC, which is Rust heap memory, using PLATFORM heap deallocation operation
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
99
= note: BACKTRACE:
10-
= note: inside `std::sys::PLATFORM::alloc::<impl std::alloc::GlobalAlloc for std::alloc::System>::dealloc` at RUSTLIB/std/src/sys/PLATFORM/alloc.rs:LL:CC
10+
= note: inside `std::sys::pal::PLATFORM::alloc::<impl std::alloc::GlobalAlloc for std::alloc::System>::dealloc` at RUSTLIB/std/src/sys/pal/PLATFORM/alloc.rs:LL:CC
1111
= note: inside `<std::alloc::System as std::alloc::Allocator>::deallocate` at RUSTLIB/std/src/alloc.rs:LL:CC
1212
note: inside `main`
1313
--> $DIR/global_system_mixup.rs:LL:CC

src/tools/miri/tests/fail/concurrency/windows_join_detached.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: Undefined Behavior: trying to join a detached thread
2-
--> RUSTLIB/std/src/sys/PLATFORM/thread.rs:LL:CC
2+
--> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC
33
|
44
LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(), c::INFINITE) };
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join a detached thread
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
99
= note: BACKTRACE:
10-
= note: inside `std::sys::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/PLATFORM/thread.rs:LL:CC
10+
= note: inside `std::sys::pal::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC
1111
= note: inside `std::thread::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC
1212
= note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC
1313
note: inside `main`

src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ panic in a function that cannot unwind
66
stack backtrace:
77
thread caused non-unwinding panic. aborting.
88
error: abnormal termination: the program aborted execution
9-
--> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
9+
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1010
|
1111
LL | ABORT();
1212
| ^ the program aborted execution
1313
|
14-
= note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
14+
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1515
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
1616
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
1717
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC

src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ panic in a function that cannot unwind
66
stack backtrace:
77
thread caused non-unwinding panic. aborting.
88
error: abnormal termination: the program aborted execution
9-
--> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
9+
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1010
|
1111
LL | ABORT();
1212
| ^ the program aborted execution
1313
|
14-
= note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
14+
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1515
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
1616
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
1717
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC

src/tools/miri/tests/fail/intrinsics/uninit_uninhabited_type.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ aborted execution: attempted to instantiate uninhabited type `!`
33
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
44
thread caused non-unwinding panic. aborting.
55
error: abnormal termination: the program aborted execution
6-
--> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
6+
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
77
|
88
LL | ABORT();
99
| ^ the program aborted execution
1010
|
11-
= note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
11+
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1212
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
1313
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
1414
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC

src/tools/miri/tests/fail/intrinsics/zero_fn_ptr.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ aborted execution: attempted to zero-initialize type `fn()`, which is invalid
33
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
44
thread caused non-unwinding panic. aborting.
55
error: abnormal termination: the program aborted execution
6-
--> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
6+
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
77
|
88
LL | ABORT();
99
| ^ the program aborted execution
1010
|
11-
= note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
11+
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1212
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
1313
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
1414
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC

src/tools/miri/tests/fail/panic/double_panic.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ thread 'main' panicked at RUSTLIB/core/src/panicking.rs:LL:CC:
88
panic in a destructor during cleanup
99
thread caused non-unwinding panic. aborting.
1010
error: abnormal termination: the program aborted execution
11-
--> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
11+
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1212
|
1313
LL | ABORT();
1414
| ^ the program aborted execution
1515
|
16-
= note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
16+
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1717
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
1818
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
1919
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC

src/tools/miri/tests/fail/shims/fs/isolated_file.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
error: unsupported operation: `open` not available when isolation is enabled
2-
--> RUSTLIB/std/src/sys/PLATFORM/fs.rs:LL:CC
2+
--> RUSTLIB/std/src/sys/pal/PLATFORM/fs.rs:LL:CC
33
|
44
LL | let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode as c_int) })?;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `open` not available when isolation is enabled
66
|
77
= help: pass the flag `-Zmiri-disable-isolation` to disable isolation;
88
= help: or pass `-Zmiri-isolation-error=warn` to configure Miri to return an error code from isolated operations (if supported for that operation) and continue with a warning
99
= note: BACKTRACE:
10-
= note: inside closure at RUSTLIB/std/src/sys/PLATFORM/fs.rs:LL:CC
11-
= note: inside `std::sys::PLATFORM::cvt_r::<i32, {closure@std::sys::PLATFORM::fs::File::open_c::{closure#0}}>` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
12-
= note: inside `std::sys::PLATFORM::fs::File::open_c` at RUSTLIB/std/src/sys/PLATFORM/fs.rs:LL:CC
13-
= note: inside closure at RUSTLIB/std/src/sys/PLATFORM/fs.rs:LL:CC
14-
= note: inside `std::sys::PLATFORM::small_c_string::run_with_cstr::<std::sys::PLATFORM::fs::File, {closure@std::sys::PLATFORM::fs::File::open::{closure#0}}>` at RUSTLIB/std/src/sys/PLATFORM/small_c_string.rs:LL:CC
15-
= note: inside `std::sys::PLATFORM::small_c_string::run_path_with_cstr::<std::sys::PLATFORM::fs::File, {closure@std::sys::PLATFORM::fs::File::open::{closure#0}}>` at RUSTLIB/std/src/sys/PLATFORM/small_c_string.rs:LL:CC
16-
= note: inside `std::sys::PLATFORM::fs::File::open` at RUSTLIB/std/src/sys/PLATFORM/fs.rs:LL:CC
10+
= note: inside closure at RUSTLIB/std/src/sys/pal/PLATFORM/fs.rs:LL:CC
11+
= note: inside `std::sys::pal::PLATFORM::cvt_r::<i32, {closure@std::sys::pal::PLATFORM::fs::File::open_c::{closure#0}}>` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
12+
= note: inside `std::sys::pal::PLATFORM::fs::File::open_c` at RUSTLIB/std/src/sys/pal/PLATFORM/fs.rs:LL:CC
13+
= note: inside closure at RUSTLIB/std/src/sys/pal/PLATFORM/fs.rs:LL:CC
14+
= note: inside `std::sys::pal::PLATFORM::small_c_string::run_with_cstr::<std::sys::pal::PLATFORM::fs::File, {closure@std::sys::pal::PLATFORM::fs::File::open::{closure#0}}>` at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC
15+
= note: inside `std::sys::pal::PLATFORM::small_c_string::run_path_with_cstr::<std::sys::pal::PLATFORM::fs::File, {closure@std::sys::pal::PLATFORM::fs::File::open::{closure#0}}>` at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC
16+
= note: inside `std::sys::pal::PLATFORM::fs::File::open` at RUSTLIB/std/src/sys/pal/PLATFORM/fs.rs:LL:CC
1717
= note: inside `std::fs::OpenOptions::_open` at RUSTLIB/std/src/fs.rs:LL:CC
1818
= note: inside `std::fs::OpenOptions::open::<&std::path::Path>` at RUSTLIB/std/src/fs.rs:LL:CC
1919
= note: inside `std::fs::File::open::<&str>` at RUSTLIB/std/src/fs.rs:LL:CC

src/tools/miri/tests/fail/terminate-terminator.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ panic in a function that cannot unwind
88
stack backtrace:
99
thread caused non-unwinding panic. aborting.
1010
error: abnormal termination: the program aborted execution
11-
--> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
11+
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1212
|
1313
LL | ABORT();
1414
| ^ the program aborted execution
1515
|
16-
= note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
16+
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1717
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
1818
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
1919
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC

src/tools/miri/tests/fail/unwind-action-terminate.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ panic in a function that cannot unwind
66
stack backtrace:
77
thread caused non-unwinding panic. aborting.
88
error: abnormal termination: the program aborted execution
9-
--> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
9+
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1010
|
1111
LL | ABORT();
1212
| ^ the program aborted execution
1313
|
14-
= note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
14+
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
1515
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
1616
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
1717
= note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC

0 commit comments

Comments
 (0)