-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
compiletest ice tracking #122997
compiletest ice tracking #122997
Conversation
rustbot has assigned @compiler-errors. Use |
This comment has been minimized.
This comment has been minimized.
3453ba6
to
02a00fb
Compare
ce95351
to
7fdf1e3
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible also for you to implement a quick tidy check for all the tests/ui/crashes
tests to have a known-bug:
directive?
src/tools/compiletest/src/runtest.rs
Outdated
// if a test does not crash, consider it an error | ||
match proc_res.status.code() { | ||
Some(101) => (), | ||
_ => self.fatal("expected ICE"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate this message to tell the dev to give the test a better message and move it to tests/ui/something
?
Specifically, I don't want people to just copy over the 122909.rs
to tests/ui
when they go from fail -> pass.
tests/crashes/122909.rs
Outdated
@@ -0,0 +1,15 @@ | |||
//@ compile-flags: -Zpolymorphize=on -Zinline-mir=yes | |||
//@ known-bug: #12345 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//@ known-bug: #12345 | |
//@ known-bug: #122909 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
guys this is just a initial test to make sure that compile-flags
are working :D
Could the folder be called |
I don't think we should limit ourselves to only track "internal compiler errors" but also track stack overflows and llvm errors if possible, which is why I chose "crashes". |
This comment has been minimized.
This comment has been minimized.
@compiler-errors ^ :) |
Mhh, so current roablocks:
maybe I can wrap my head around some of that tomorrow |
a8e19ac
to
da8597f
Compare
src/tools/compiletest/src/runtest.rs
Outdated
// if a test does not crash, consider it an error | ||
match proc_res.status.code() { | ||
Some(101) => (), | ||
_ => self.fatal("expected ICE"), | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Soo it turns out that this is not very sufficient at detecting when rustc is killed by a signal for example due to stack overflow.
There is something like std::os::unix::process::ExitStatusExt
to get more information for cases like this, but it seems to be unix-only.
I think the best approach for now is to switch around the logic to only "deny" cases where exit status is 0 (no error) or 1 (compiler error) and accept everything else as ICE...?
if !proc_res.status.success() {
match proc_res.status.code() {
Some(1 | 0) => self.fatal(&format!("expected ICE")),
_ => (),
}
}
1c2eca9
to
de73263
Compare
Some changes occurred in src/tools/compiletest cc @jieyouxu |
r? @oli-obk |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
93c70a5
to
2ce487c
Compare
@bors r=oli-obk |
…-obk compiletest ice tracking see https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/where.20to.20mass-add.20known.20ices.20.2F.20merging.20glacier.20into.20rust/near/429082963 This will allow us to sunset most of https://github.com/rust-lang/glacier The rustc ices will be tracked directly inside the rust testsuite There are a couple of .sh tests remaining that I have not ported over yet. This adds `tests/crashes`, a file inside this directory MUST ice, otherwise it is considered test-fail. This will be used to track ICEs from glacier and the bugtracker. When someones pr accidentally fixes one of these ICEs, they can move the test from `crashes` into `ui` for example. I also added a new tidy lint that warns when a test inside `tests/crashes` does not have a `//@ known-bug: ` line the env var `COMPILETEST_VERBOSE_CRASHES` can be set to get exit code, stderr and stdout of a crash-test to aid debugging/adding tests.
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors retry |
☀️ Test successful - checks-actions |
Finished benchmarking commit (85b884b): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 677.058s -> 677.003s (-0.01%) |
// if a test does not crash, consider it an error | ||
if proc_res.status.success() || matches!(proc_res.status.code(), Some(1 | 0)) { | ||
self.fatal(&format!( | ||
"test no longer crashes/triggers ICE! Please give it a mearningful name, \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't mind me, I'm just passing by
"test no longer crashes/triggers ICE! Please give it a mearningful name, \ | |
"test no longer crashes/triggers ICE! Please give it a meaningful name, \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think oli already fixed this in a drive-by cleanup somewhere 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, did he? I just saw that in one of this PRs #126316 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember doing that, but it probably hasn't landed yet
see https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/where.20to.20mass-add.20known.20ices.20.2F.20merging.20glacier.20into.20rust/near/429082963
This will allow us to sunset most of https://github.com/rust-lang/glacier
The rustc ices will be tracked directly inside the rust testsuite
There are a couple of .sh tests remaining that I have not ported over yet.
This adds
tests/crashes
, a file inside this directory MUST ice, otherwise it is considered test-fail.This will be used to track ICEs from glacier and the bugtracker.
When someones pr accidentally fixes one of these ICEs, they can move the test from
crashes
intoui
for example.I also added a new tidy lint that warns when a test inside
tests/crashes
does not have a//@ known-bug:
linethe env var
COMPILETEST_VERBOSE_CRASHES
can be set to get exit code, stderr and stdout of a crash-test to aid debugging/adding tests.