Skip to content

Commit 22d9817

Browse files
committed
Auto merge of #3866 - rust-lang:ui_test_26_1, r=oli-obk
Bump ui test to 0.26 lots of issues fixed and various improvements 🤞 that it works this time around
2 parents d6d1d37 + 059dbb7 commit 22d9817

File tree

710 files changed

+1901
-2005
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

710 files changed

+1901
-2005
lines changed

Cargo.lock

+28-53
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ windows-sys = { version = "0.52", features = [
4949

5050
[dev-dependencies]
5151
colored = "2"
52-
ui_test = "0.21.1"
52+
ui_test = "0.26.5"
5353
rustc_version = "0.4"
5454
regex = "1.5.5"
5555
tempfile = "3"

miri-script/src/commands.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,13 @@ impl Command {
503503
// More flags that we will pass before `flags`
504504
// (because `flags` may contain `--`).
505505
let mut early_flags = Vec::<OsString>::new();
506-
if let Some(target) = &target {
507-
early_flags.push("--target".into());
508-
early_flags.push(target.into());
506+
507+
// In `dep` mode, the target is already passed via `MIRI_TEST_TARGET`
508+
if !dep {
509+
if let Some(target) = &target {
510+
early_flags.push("--target".into());
511+
early_flags.push(target.into());
512+
}
509513
}
510514
early_flags.push("--edition".into());
511515
early_flags.push(edition.as_deref().unwrap_or("2021").into());

tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ only-target-darwin
1+
//@only-target: darwin
22

33
use std::cell::UnsafeCell;
44

tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: abnormal termination: called os_unfair_lock_assert_not_owner on an os_unfair_lock owned by the current thread
2-
--> $DIR/apple_os_unfair_lock_assert_not_owner.rs:LL:CC
2+
--> tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.rs:LL:CC
33
|
44
LL | libc::os_unfair_lock_assert_not_owner(lock.get());
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ called os_unfair_lock_assert_not_owner on an os_unfair_lock owned by the current thread
66
|
77
= note: BACKTRACE:
8-
= note: inside `main` at $DIR/apple_os_unfair_lock_assert_not_owner.rs:LL:CC
8+
= note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.rs:LL:CC
99

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

tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ only-target-darwin
1+
//@only-target: darwin
22

33
use std::cell::UnsafeCell;
44

tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: abnormal termination: called os_unfair_lock_assert_owner on an os_unfair_lock not owned by the current thread
2-
--> $DIR/apple_os_unfair_lock_assert_owner.rs:LL:CC
2+
--> tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.rs:LL:CC
33
|
44
LL | libc::os_unfair_lock_assert_owner(lock.get());
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ called os_unfair_lock_assert_owner on an os_unfair_lock not owned by the current thread
66
|
77
= note: BACKTRACE:
8-
= note: inside `main` at $DIR/apple_os_unfair_lock_assert_owner.rs:LL:CC
8+
= note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.rs:LL:CC
99

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

tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ only-target-darwin
1+
//@only-target: darwin
22

33
use std::cell::UnsafeCell;
44

tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: abnormal termination: attempted to lock an os_unfair_lock that is already locked by the current thread
2-
--> $DIR/apple_os_unfair_lock_reentrant.rs:LL:CC
2+
--> tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.rs:LL:CC
33
|
44
LL | libc::os_unfair_lock_lock(lock.get());
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to lock an os_unfair_lock that is already locked by the current thread
66
|
77
= note: BACKTRACE:
8-
= note: inside `main` at $DIR/apple_os_unfair_lock_reentrant.rs:LL:CC
8+
= note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.rs:LL:CC
99

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

tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ only-target-darwin
1+
//@only-target: darwin
22

33
use std::cell::UnsafeCell;
44

tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: abnormal termination: attempted to unlock an os_unfair_lock not owned by the current thread
2-
--> $DIR/apple_os_unfair_lock_unowned.rs:LL:CC
2+
--> tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.rs:LL:CC
33
|
44
LL | libc::os_unfair_lock_unlock(lock.get());
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to unlock an os_unfair_lock not owned by the current thread
66
|
77
= note: BACKTRACE:
8-
= note: inside `main` at $DIR/apple_os_unfair_lock_unowned.rs:LL:CC
8+
= note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.rs:LL:CC
99

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

tests/fail-dep/concurrency/libc_pthread_cond_double_destroy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ignore-target-windows: No pthreads on Windows
1+
//@ignore-target: windows # No pthreads on Windows
22

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

tests/fail-dep/concurrency/libc_pthread_cond_double_destroy.stderr

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

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

tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
error: Undefined Behavior: pthread_cond_t can't be moved after first use
2-
--> $DIR/libc_pthread_cond_move.rs:LL:CC
2+
--> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
33
|
44
LL | libc::pthread_cond_destroy(cond2.as_mut_ptr());
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pthread_cond_t can't be moved after first use
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 `check` at $DIR/libc_pthread_cond_move.rs:LL:CC
10+
= note: inside `check` at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
1111
note: inside `main`
12-
--> $DIR/libc_pthread_cond_move.rs:LL:CC
12+
--> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
1313
|
1414
LL | check()
1515
| ^^^^^^^

tests/fail-dep/concurrency/libc_pthread_cond_move.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@revisions: static_initializer init
2-
//@ignore-target-windows: No pthreads on Windows
2+
//@ignore-target: windows # No pthreads on Windows
33

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

tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
error: Undefined Behavior: pthread_cond_t can't be moved after first use
2-
--> $DIR/libc_pthread_cond_move.rs:LL:CC
2+
--> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
33
|
44
LL | libc::pthread_cond_destroy(&mut cond2 as *mut _);
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pthread_cond_t can't be moved after first use
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 `check` at $DIR/libc_pthread_cond_move.rs:LL:CC
10+
= note: inside `check` at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
1111
note: inside `main`
12-
--> $DIR/libc_pthread_cond_move.rs:LL:CC
12+
--> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
1313
|
1414
LL | check()
1515
| ^^^^^^^

tests/fail-dep/concurrency/libc_pthread_condattr_double_destroy.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//@ignore-target-windows: No pthreads on Windows
2-
//@ignore-target-apple: Our macOS condattr don't have any fields so we do not notice this.
1+
//@ignore-target: windows # No pthreads on Windows
2+
//@ignore-target: apple # Our macOS condattr don't have any fields so we do not notice this.
33

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

tests/fail-dep/concurrency/libc_pthread_condattr_double_destroy.stderr

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

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

tests/fail-dep/concurrency/libc_pthread_create_main_terminate.rs

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

44
// Check that we terminate the program when the main thread terminates.

tests/fail-dep/concurrency/libc_pthread_create_too_few_args.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ignore-target-windows: No pthreads on Windows
1+
//@ignore-target: windows # No pthreads on Windows
22
//~^ERROR: calling a function with more arguments than it expected
33

44
//! The thread function must have exactly one argument.

tests/fail-dep/concurrency/libc_pthread_create_too_many_args.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ignore-target-windows: No pthreads on Windows
1+
//@ignore-target: windows # No pthreads on Windows
22
//~^ERROR: calling a function with fewer arguments than it requires
33

44
//! The thread function must have exactly one argument.

tests/fail-dep/concurrency/libc_pthread_join_detached.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ignore-target-windows: No pthreads on Windows
1+
//@ignore-target: windows # No pthreads on Windows
22

33
// Joining a detached thread is undefined behavior.
44

0 commit comments

Comments
 (0)