Skip to content

Commit f6ae3cb

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 a0f57d8 + 4dabcc3 commit f6ae3cb

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

Diff for: src/tools/miri/Cargo.lock

+28-53
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,19 @@ dependencies = [
3939

4040
[[package]]
4141
name = "annotate-snippets"
42-
version = "0.9.2"
42+
version = "0.11.4"
4343
source = "registry+https://github.com/rust-lang/crates.io-index"
44-
checksum = "ccaf7e9dfbb6ab22c82e473cd1a8a7bd313c19a5b7e40970f3d89ef5a5c9e81e"
44+
checksum = "24e35ed54e5ea7997c14ed4c70ba043478db1112e98263b3b035907aa197d991"
4545
dependencies = [
46+
"anstyle",
4647
"unicode-width",
47-
"yansi-term",
4848
]
4949

5050
[[package]]
51-
name = "ansi_term"
52-
version = "0.12.1"
51+
name = "anstyle"
52+
version = "1.0.8"
5353
source = "registry+https://github.com/rust-lang/crates.io-index"
54-
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
55-
dependencies = [
56-
"winapi",
57-
]
54+
checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
5855

5956
[[package]]
6057
name = "anyhow"
@@ -126,9 +123,9 @@ dependencies = [
126123

127124
[[package]]
128125
name = "cargo_metadata"
129-
version = "0.15.4"
126+
version = "0.18.1"
130127
source = "registry+https://github.com/rust-lang/crates.io-index"
131-
checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a"
128+
checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037"
132129
dependencies = [
133130
"camino",
134131
"cargo-platform",
@@ -737,11 +734,11 @@ dependencies = [
737734

738735
[[package]]
739736
name = "prettydiff"
740-
version = "0.6.4"
737+
version = "0.7.0"
741738
source = "registry+https://github.com/rust-lang/crates.io-index"
742-
checksum = "8ff1fec61082821f8236cf6c0c14e8172b62ce8a72a0eedc30d3b247bb68dc11"
739+
checksum = "abec3fb083c10660b3854367697da94c674e9e82aa7511014dc958beeb7215e9"
743740
dependencies = [
744-
"ansi_term",
741+
"owo-colors",
745742
"pad",
746743
]
747744

@@ -865,14 +862,14 @@ dependencies = [
865862

866863
[[package]]
867864
name = "rustfix"
868-
version = "0.6.1"
865+
version = "0.8.5"
869866
source = "registry+https://github.com/rust-lang/crates.io-index"
870-
checksum = "ecd2853d9e26988467753bd9912c3a126f642d05d229a4b53f5752ee36c56481"
867+
checksum = "70f5b7fc8060f4f8373f9381a630304b42e1183535d9beb1d3f596b236c9106a"
871868
dependencies = [
872-
"anyhow",
873-
"log",
874869
"serde",
875870
"serde_json",
871+
"thiserror",
872+
"tracing",
876873
]
877874

878875
[[package]]
@@ -962,6 +959,16 @@ version = "1.13.2"
962959
source = "registry+https://github.com/rust-lang/crates.io-index"
963960
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
964961

962+
[[package]]
963+
name = "spanned"
964+
version = "0.3.0"
965+
source = "registry+https://github.com/rust-lang/crates.io-index"
966+
checksum = "86af297923fbcfd107c20a189a6e9c872160df71a7190ae4a7a6c5dce4b2feb6"
967+
dependencies = [
968+
"bstr",
969+
"color-eyre",
970+
]
971+
965972
[[package]]
966973
name = "syn"
967974
version = "2.0.72"
@@ -1065,9 +1072,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
10651072

10661073
[[package]]
10671074
name = "ui_test"
1068-
version = "0.21.2"
1075+
version = "0.26.5"
10691076
source = "registry+https://github.com/rust-lang/crates.io-index"
1070-
checksum = "aaf4bf7c184b8dfc7a4d3b90df789b1eb992ee42811cd115f32a7a1eb781058d"
1077+
checksum = "32ee4c40e5a5f9fa6864ff976473e5d6a6e9884b6ce68b40690d9f87e1994c83"
10711078
dependencies = [
10721079
"annotate-snippets",
10731080
"anyhow",
@@ -1079,15 +1086,14 @@ dependencies = [
10791086
"comma",
10801087
"crossbeam-channel",
10811088
"indicatif",
1082-
"lazy_static",
10831089
"levenshtein",
10841090
"prettydiff",
10851091
"regex",
10861092
"rustc_version",
10871093
"rustfix",
10881094
"serde",
10891095
"serde_json",
1090-
"tempfile",
1096+
"spanned",
10911097
]
10921098

10931099
[[package]]
@@ -1120,28 +1126,6 @@ version = "0.11.0+wasi-snapshot-preview1"
11201126
source = "registry+https://github.com/rust-lang/crates.io-index"
11211127
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
11221128

1123-
[[package]]
1124-
name = "winapi"
1125-
version = "0.3.9"
1126-
source = "registry+https://github.com/rust-lang/crates.io-index"
1127-
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
1128-
dependencies = [
1129-
"winapi-i686-pc-windows-gnu",
1130-
"winapi-x86_64-pc-windows-gnu",
1131-
]
1132-
1133-
[[package]]
1134-
name = "winapi-i686-pc-windows-gnu"
1135-
version = "0.4.0"
1136-
source = "registry+https://github.com/rust-lang/crates.io-index"
1137-
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
1138-
1139-
[[package]]
1140-
name = "winapi-x86_64-pc-windows-gnu"
1141-
version = "0.4.0"
1142-
source = "registry+https://github.com/rust-lang/crates.io-index"
1143-
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1144-
11451129
[[package]]
11461130
name = "windows-sys"
11471131
version = "0.48.0"
@@ -1281,15 +1265,6 @@ version = "0.52.6"
12811265
source = "registry+https://github.com/rust-lang/crates.io-index"
12821266
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
12831267

1284-
[[package]]
1285-
name = "yansi-term"
1286-
version = "0.1.2"
1287-
source = "registry+https://github.com/rust-lang/crates.io-index"
1288-
checksum = "fe5c30ade05e61656247b2e334a031dfd0cc466fadef865bdcdea8d537951bf1"
1289-
dependencies = [
1290-
"winapi",
1291-
]
1292-
12931268
[[package]]
12941269
name = "zerocopy"
12951270
version = "0.7.35"

Diff for: src/tools/miri/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"

Diff for: src/tools/miri/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());

Diff for: src/tools/miri/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

Diff for: src/tools/miri/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

Diff for: src/tools/miri/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

Diff for: src/tools/miri/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

Diff for: src/tools/miri/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

Diff for: src/tools/miri/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

Diff for: src/tools/miri/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

Diff for: src/tools/miri/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

Diff for: src/tools/miri/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

Diff for: src/tools/miri/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

Diff for: src/tools/miri/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
| ^^^^^^^

Diff for: src/tools/miri/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

Diff for: src/tools/miri/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
| ^^^^^^^

Diff for: src/tools/miri/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

Diff for: src/tools/miri/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

Diff for: src/tools/miri/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.

Diff for: src/tools/miri/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.

Diff for: src/tools/miri/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.

Diff for: src/tools/miri/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)