Skip to content

Commit 8db469d

Browse files
committed
update tests
1 parent df64a22 commit 8db469d

File tree

43 files changed

+74
-78
lines changed

Some content is hidden

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

43 files changed

+74
-78
lines changed

src/tools/compiletest/src/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2415,7 +2415,7 @@ impl<'test> TestCx<'test> {
24152415

24162416
// Normalize thread IDs in panic messages
24172417
normalized = static_regex!(r"thread '(?P<name>.*?)' \(0x[[:xdigit:]]+\) panicked")
2418-
.replace_all(&normalized, "thread '$name' (tid) panicked")
2418+
.replace_all(&normalized, "thread '$name' ($$TID) panicked")
24192419
.into_owned();
24202420

24212421
normalized = normalized.replace("\t", "\\t"); // makes tabs visible

tests/run-make/libtest-json/output-default.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{ "type": "test", "event": "started", "name": "a" }
33
{ "type": "test", "name": "a", "event": "ok" }
44
{ "type": "test", "event": "started", "name": "b" }
5-
{ "type": "test", "name": "b", "event": "failed", "stdout": "\nthread 'b' panicked at f.rs:9:5:\nassertion failed: false\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
5+
{ "type": "test", "name": "b", "event": "failed", "stdout": "\nthread 'b' (0x60e72b) panicked at f.rs:9:5:\nassertion failed: false\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
66
{ "type": "test", "event": "started", "name": "c" }
77
{ "type": "test", "name": "c", "event": "ok" }
88
{ "type": "test", "event": "started", "name": "d" }

tests/run-make/libtest-json/output-stdout-success.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
{ "type": "test", "event": "started", "name": "a" }
33
{ "type": "test", "name": "a", "event": "ok", "stdout": "print from successful test\n" }
44
{ "type": "test", "event": "started", "name": "b" }
5-
{ "type": "test", "name": "b", "event": "failed", "stdout": "\nthread 'b' panicked at f.rs:9:5:\nassertion failed: false\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
5+
{ "type": "test", "name": "b", "event": "failed", "stdout": "\nthread 'b' (0x60e72f) panicked at f.rs:9:5:\nassertion failed: false\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
66
{ "type": "test", "event": "started", "name": "c" }
7-
{ "type": "test", "name": "c", "event": "ok", "stdout": "\nthread 'c' panicked at f.rs:15:5:\nassertion failed: false\n" }
7+
{ "type": "test", "name": "c", "event": "ok", "stdout": "\nthread 'c' (0x60e730) panicked at f.rs:15:5:\nassertion failed: false\n" }
88
{ "type": "test", "event": "started", "name": "d" }
99
{ "type": "test", "name": "d", "event": "ignored", "message": "msg" }
1010
{ "type": "suite", "event": "failed", "passed": 2, "failed": 1, "ignored": 1, "measured": 0, "filtered_out": 0, "exec_time": "$EXEC_TIME" }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite name="test" package="test" id="0" errors="0" failures="1" tests="4" skipped="1" ><testcase classname="unknown" name="a" time="$TIME"/><testcase classname="unknown" name="b" time="$TIME"><failure type="assert"/><system-out><![CDATA[print from failing test]]>&#xA;&#xA;<![CDATA[thread 'b' panicked at f.rs:10:5:]]>&#xA;<![CDATA[assertion failed: false]]>&#xA;<![CDATA[note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace]]>&#xA;<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="c" time="$TIME"/><system-out/><system-err/></testsuite></testsuites>
1+
<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite name="test" package="test" id="0" errors="0" failures="1" tests="4" skipped="1" ><testcase classname="unknown" name="a" time="$TIME"/><testcase classname="unknown" name="b" time="$TIME"><failure type="assert"/><system-out><![CDATA[print from failing test]]>&#xA;&#xA;<![CDATA[thread 'b' (0x60e75b) panicked at f.rs:10:5:]]>&#xA;<![CDATA[assertion failed: false]]>&#xA;<![CDATA[note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace]]>&#xA;<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="c" time="$TIME"/><system-out/><system-err/></testsuite></testsuites>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite name="test" package="test" id="0" errors="0" failures="1" tests="4" skipped="1" ><testcase classname="unknown" name="a" time="$TIME"><system-out><![CDATA[print from successful test]]>&#xA;<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="b" time="$TIME"><failure type="assert"/><system-out><![CDATA[print from failing test]]>&#xA;&#xA;<![CDATA[thread 'b' panicked at f.rs:10:5:]]>&#xA;<![CDATA[assertion failed: false]]>&#xA;<![CDATA[note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace]]>&#xA;<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="c" time="$TIME"><system-out><![CDATA[]]>&#xA;<![CDATA[thread 'c' panicked at f.rs:16:5:]]>&#xA;<![CDATA[assertion failed: false]]>&#xA;<![CDATA[]]></system-out></testcase><system-out/><system-err/></testsuite></testsuites>
1+
<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite name="test" package="test" id="0" errors="0" failures="1" tests="4" skipped="1" ><testcase classname="unknown" name="a" time="$TIME"><system-out><![CDATA[print from successful test]]>&#xA;<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="b" time="$TIME"><failure type="assert"/><system-out><![CDATA[print from failing test]]>&#xA;&#xA;<![CDATA[thread 'b' (0x60e762) panicked at f.rs:10:5:]]>&#xA;<![CDATA[assertion failed: false]]>&#xA;<![CDATA[note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace]]>&#xA;<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="c" time="$TIME"><system-out><![CDATA[]]>&#xA;<![CDATA[thread 'c' (0x60e763) panicked at f.rs:16:5:]]>&#xA;<![CDATA[assertion failed: false]]>&#xA;<![CDATA[]]></system-out></testcase><system-out/><system-err/></testsuite></testsuites>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11

22
running 1 test
3-
test $DIR/edition-2024-error-output.rs - (line 13) ... FAILED
3+
test $DIR/edition-2024-error-output.rs - (line 12) ... FAILED
44

55
failures:
66

7-
---- $DIR/edition-2024-error-output.rs - (line 13) stdout ----
7+
---- $DIR/edition-2024-error-output.rs - (line 12) stdout ----
88
Test executable failed (exit status: 101).
99

1010
stderr:
1111

12-
thread 'main' (tid) panicked at $TMP:6:1:
12+
thread 'main' ($TID) panicked at $TMP:6:1:
1313
assertion `left == right` failed
1414
left: 4
1515
right: 5
@@ -18,7 +18,7 @@ note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
1818

1919

2020
failures:
21-
$DIR/edition-2024-error-output.rs - (line 13)
21+
$DIR/edition-2024-error-output.rs - (line 12)
2222

2323
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
2424

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

22
running 2 tests
3-
test $DIR/failed-doctest-output.rs - OtherStruct (line 26) ... FAILED
4-
test $DIR/failed-doctest-output.rs - SomeStruct (line 16) ... FAILED
3+
test $DIR/failed-doctest-output.rs - OtherStruct (line 25) ... FAILED
4+
test $DIR/failed-doctest-output.rs - SomeStruct (line 15) ... FAILED
55

66
failures:
77

8-
---- $DIR/failed-doctest-output.rs - OtherStruct (line 26) stdout ----
8+
---- $DIR/failed-doctest-output.rs - OtherStruct (line 25) stdout ----
99
error[E0425]: cannot find value `no` in this scope
10-
--> $DIR/failed-doctest-output.rs:27:1
10+
--> $DIR/failed-doctest-output.rs:26:1
1111
|
1212
LL | no
1313
| ^^ not found in this scope
@@ -16,7 +16,7 @@ error: aborting due to 1 previous error
1616

1717
For more information about this error, try `rustc --explain E0425`.
1818
Couldn't compile the test.
19-
---- $DIR/failed-doctest-output.rs - SomeStruct (line 16) stdout ----
19+
---- $DIR/failed-doctest-output.rs - SomeStruct (line 15) stdout ----
2020
Test executable failed (exit status: 101).
2121

2222
stdout:
@@ -27,15 +27,15 @@ stderr:
2727
stderr 1
2828
stderr 2
2929

30-
thread 'main' (tid) panicked at $DIR/failed-doctest-output.rs:7:1:
30+
thread 'main' ($TID) panicked at $DIR/failed-doctest-output.rs:7:1:
3131
oh no
3232
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
3333

3434

3535

3636
failures:
37-
$DIR/failed-doctest-output.rs - OtherStruct (line 26)
38-
$DIR/failed-doctest-output.rs - SomeStruct (line 16)
37+
$DIR/failed-doctest-output.rs - OtherStruct (line 25)
38+
$DIR/failed-doctest-output.rs - SomeStruct (line 15)
3939

4040
test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
4141

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11

22
running 3 tests
3-
test $DIR/stdout-and-stderr.rs - (line 16) ... FAILED
4-
test $DIR/stdout-and-stderr.rs - (line 21) ... FAILED
5-
test $DIR/stdout-and-stderr.rs - (line 25) ... FAILED
3+
test $DIR/stdout-and-stderr.rs - (line 15) ... FAILED
4+
test $DIR/stdout-and-stderr.rs - (line 20) ... FAILED
5+
test $DIR/stdout-and-stderr.rs - (line 24) ... FAILED
66

77
failures:
88

9-
---- $DIR/stdout-and-stderr.rs - (line 16) stdout ----
9+
---- $DIR/stdout-and-stderr.rs - (line 15) stdout ----
1010
Test executable failed (exit status: 101).
1111

1212
stdout:
1313
######## from a DOC TEST ########
1414

1515
stderr:
1616

17-
thread 'main' (tid) panicked at $TMP:7:1:
17+
thread 'main' ($TID) panicked at $TMP:7:1:
1818
assertion `left == right` failed
1919
left: "doc"
2020
right: "test"
2121
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2222

2323

24-
---- $DIR/stdout-and-stderr.rs - (line 21) stdout ----
24+
---- $DIR/stdout-and-stderr.rs - (line 20) stdout ----
2525
Test executable failed (exit status: 101).
2626

2727
stderr:
2828

29-
thread 'main' (tid) panicked at $TMP:15:1:
29+
thread 'main' ($TID) panicked at $TMP:15:1:
3030
assertion `left == right` failed
3131
left: "doc"
3232
right: "test"
3333
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
3434

3535

36-
---- $DIR/stdout-and-stderr.rs - (line 25) stdout ----
36+
---- $DIR/stdout-and-stderr.rs - (line 24) stdout ----
3737
Test executable failed (exit status: 1).
3838

3939

4040
failures:
41-
$DIR/stdout-and-stderr.rs - (line 16)
42-
$DIR/stdout-and-stderr.rs - (line 21)
43-
$DIR/stdout-and-stderr.rs - (line 25)
41+
$DIR/stdout-and-stderr.rs - (line 15)
42+
$DIR/stdout-and-stderr.rs - (line 20)
43+
$DIR/stdout-and-stderr.rs - (line 24)
4444

4545
test result: FAILED. 0 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
4646

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11

22
running 1 test
3-
test remapped_path/remap-path-prefix-failed-doctest-output.rs - SomeStruct (line 12) ... FAILED
3+
test remapped_path/remap-path-prefix-failed-doctest-output.rs - SomeStruct (line 11) ... FAILED
44

55
failures:
66

7-
---- remapped_path/remap-path-prefix-failed-doctest-output.rs - SomeStruct (line 12) stdout ----
7+
---- remapped_path/remap-path-prefix-failed-doctest-output.rs - SomeStruct (line 11) stdout ----
88
Test executable failed (exit status: 101).
99

1010
stderr:
1111

12-
thread 'main' (0x5119f2) panicked at remapped_path/remap-path-prefix-failed-doctest-output.rs:3:1:
12+
thread 'main' ($TID) panicked at remapped_path/remap-path-prefix-failed-doctest-output.rs:3:1:
1313
oh no
1414
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
1515

1616

1717

1818
failures:
19-
remapped_path/remap-path-prefix-failed-doctest-output.rs - SomeStruct (line 12)
19+
remapped_path/remap-path-prefix-failed-doctest-output.rs - SomeStruct (line 11)
2020

2121
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
2222

tests/ui/backtrace/synchronized-panic-handler.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//@ exec-env:RUST_BACKTRACE=0
55
//@ needs-threads
66
//@ needs-unwind
7-
87
use std::thread;
98
const PANIC_MESSAGE: &str = "oops oh no woe is me";
109

0 commit comments

Comments
 (0)