Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ui test to 0.26 #3866

Merged
merged 4 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
81 changes: 28 additions & 53 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ windows-sys = { version = "0.52", features = [

[dev-dependencies]
colored = "2"
ui_test = "0.21.1"
ui_test = "0.26.5"
rustc_version = "0.4"
regex = "1.5.5"
tempfile = "3"
Expand Down
10 changes: 7 additions & 3 deletions miri-script/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,13 @@ impl Command {
// More flags that we will pass before `flags`
// (because `flags` may contain `--`).
let mut early_flags = Vec::<OsString>::new();
if let Some(target) = &target {
early_flags.push("--target".into());
early_flags.push(target.into());

// In `dep` mode, the target is already passed via `MIRI_TEST_TARGET`
if !dep {
if let Some(target) = &target {
early_flags.push("--target".into());
early_flags.push(target.into());
}
}
early_flags.push("--edition".into());
early_flags.push(edition.as_deref().unwrap_or("2021").into());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ only-target-darwin
//@only-target: darwin

use std::cell::UnsafeCell;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error: abnormal termination: called os_unfair_lock_assert_not_owner on an os_unfair_lock owned by the current thread
--> $DIR/apple_os_unfair_lock_assert_not_owner.rs:LL:CC
--> 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
|
= note: BACKTRACE:
= note: inside `main` at $DIR/apple_os_unfair_lock_assert_not_owner.rs:LL:CC
= note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.rs:LL:CC

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ only-target-darwin
//@only-target: darwin

use std::cell::UnsafeCell;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error: abnormal termination: called os_unfair_lock_assert_owner on an os_unfair_lock not owned by the current thread
--> $DIR/apple_os_unfair_lock_assert_owner.rs:LL:CC
--> 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
|
= note: BACKTRACE:
= note: inside `main` at $DIR/apple_os_unfair_lock_assert_owner.rs:LL:CC
= note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.rs:LL:CC

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ only-target-darwin
//@only-target: darwin

use std::cell::UnsafeCell;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error: abnormal termination: attempted to lock an os_unfair_lock that is already locked by the current thread
--> $DIR/apple_os_unfair_lock_reentrant.rs:LL:CC
--> 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
|
= note: BACKTRACE:
= note: inside `main` at $DIR/apple_os_unfair_lock_reentrant.rs:LL:CC
= note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.rs:LL:CC

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

Expand Down
2 changes: 1 addition & 1 deletion tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ only-target-darwin
//@only-target: darwin

use std::cell::UnsafeCell;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error: abnormal termination: attempted to unlock an os_unfair_lock not owned by the current thread
--> $DIR/apple_os_unfair_lock_unowned.rs:LL:CC
--> 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
|
= note: BACKTRACE:
= note: inside `main` at $DIR/apple_os_unfair_lock_unowned.rs:LL:CC
= note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.rs:LL:CC

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ignore-target-windows: No pthreads on Windows
//@ignore-target: windows # No pthreads on Windows

/// Test that destroying a pthread_cond twice fails, even without a check for number validity

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory
--> $DIR/libc_pthread_cond_double_destroy.rs:LL:CC
--> tests/fail-dep/concurrency/libc_pthread_cond_double_destroy.rs:LL:CC
|
LL | libc::pthread_cond_destroy(cond.as_mut_ptr());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
|
= 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
= note: BACKTRACE:
= note: inside `main` at $DIR/libc_pthread_cond_double_destroy.rs:LL:CC
= note: inside `main` at tests/fail-dep/concurrency/libc_pthread_cond_double_destroy.rs:LL:CC

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

Expand Down
6 changes: 3 additions & 3 deletions tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
error: Undefined Behavior: pthread_cond_t can't be moved after first use
--> $DIR/libc_pthread_cond_move.rs:LL:CC
--> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
|
LL | libc::pthread_cond_destroy(cond2.as_mut_ptr());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pthread_cond_t can't be moved after first use
|
= 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
= note: BACKTRACE:
= note: inside `check` at $DIR/libc_pthread_cond_move.rs:LL:CC
= note: inside `check` at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
note: inside `main`
--> $DIR/libc_pthread_cond_move.rs:LL:CC
--> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
|
LL | check()
| ^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion tests/fail-dep/concurrency/libc_pthread_cond_move.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@revisions: static_initializer init
//@ignore-target-windows: No pthreads on Windows
//@ignore-target: windows # No pthreads on Windows

/// Test that moving a pthread_cond between uses fails.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
error: Undefined Behavior: pthread_cond_t can't be moved after first use
--> $DIR/libc_pthread_cond_move.rs:LL:CC
--> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
|
LL | libc::pthread_cond_destroy(&mut cond2 as *mut _);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pthread_cond_t can't be moved after first use
|
= 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
= note: BACKTRACE:
= note: inside `check` at $DIR/libc_pthread_cond_move.rs:LL:CC
= note: inside `check` at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
note: inside `main`
--> $DIR/libc_pthread_cond_move.rs:LL:CC
--> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
|
LL | check()
| ^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ignore-target-windows: No pthreads on Windows
//@ignore-target-apple: Our macOS condattr don't have any fields so we do not notice this.
//@ignore-target: windows # No pthreads on Windows
//@ignore-target: apple # Our macOS condattr don't have any fields so we do not notice this.

/// Test that destroying a pthread_condattr twice fails, even without a check for number validity

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory
--> $DIR/libc_pthread_condattr_double_destroy.rs:LL:CC
--> tests/fail-dep/concurrency/libc_pthread_condattr_double_destroy.rs:LL:CC
|
LL | libc::pthread_condattr_destroy(attr.as_mut_ptr());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
|
= 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
= note: BACKTRACE:
= note: inside `main` at $DIR/libc_pthread_condattr_double_destroy.rs:LL:CC
= note: inside `main` at tests/fail-dep/concurrency/libc_pthread_condattr_double_destroy.rs:LL:CC

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ignore-target-windows: No pthreads on Windows
//@ignore-target: windows # No pthreads on Windows
//@error-in-other-file: the main thread terminated without waiting for all remaining threads

// Check that we terminate the program when the main thread terminates.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ignore-target-windows: No pthreads on Windows
//@ignore-target: windows # No pthreads on Windows
//~^ERROR: calling a function with more arguments than it expected

//! The thread function must have exactly one argument.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ignore-target-windows: No pthreads on Windows
//@ignore-target: windows # No pthreads on Windows
//~^ERROR: calling a function with fewer arguments than it requires

//! The thread function must have exactly one argument.
Expand Down
2 changes: 1 addition & 1 deletion tests/fail-dep/concurrency/libc_pthread_join_detached.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ignore-target-windows: No pthreads on Windows
//@ignore-target: windows # No pthreads on Windows

// Joining a detached thread is undefined behavior.

Expand Down
Loading