Merge pull request #2413 from fmease/glacier-no-crashes-tests-yes

Flesh out sections about crashes tests and update mentions of glacier
This commit is contained in:
León Orell Valerian Liehr 2025-05-26 13:55:14 +02:00 committed by GitHub
commit ceae66b762
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 26 additions and 11 deletions

View File

@ -74,20 +74,31 @@ To build a corpus, you may want to use:
- The rustc/rust-analyzer/clippy test suites (or even source code) --- though avoid - The rustc/rust-analyzer/clippy test suites (or even source code) --- though avoid
tests that are already known to cause failures, which often begin with comments tests that are already known to cause failures, which often begin with comments
like `// failure-status: 101` or `// known-bug: #NNN`. like `// failure-status: 101` or `// known-bug: #NNN`.
- The already-fixed ICEs in [Glacier][glacier] --- though avoid the unfixed - The already-fixed ICEs in the archived [Glacier][glacier] repository --- though
ones in `ices/`! avoid the unfixed ones in `ices/`!
[glacier]: https://github.com/rust-lang/glacier
## Extra credit ## Extra credit
Here are a few things you can do to help the Rust project after filing an ICE. Here are a few things you can do to help the Rust project after filing an ICE.
- [Bisect][bisect] the bug to figure out when it was introduced - [Bisect][bisect] the bug to figure out when it was introduced.
If you find the regressing PR / commit, you can mark the issue with the label
`S-has-bisection`. If not, consider applying `E-needs-bisection` instead.
- Fix "distractions": problems with the test case that don't contribute to - Fix "distractions": problems with the test case that don't contribute to
triggering the ICE, such as syntax errors or borrow-checking errors triggering the ICE, such as syntax errors or borrow-checking errors
- Minimize the test case (see below) - Minimize the test case (see below). If successful, you can label the
- Add the minimal test case to [Glacier][glacier] issue with `S-has-mcve`. Otherwise, you can apply `E-needs-mcve`.
- Add the minimal test case to the rust-lang/rust repo as a [crashes test].
While you're at it, consider including other "untracked" crashes in your PR.
Please don't forget to mark your issue with `S-bug-has-test` afterwards.
See also [applying and removing labels][labeling].
[bisect]: https://rust-lang.github.io/cargo-bisect-rustc/ [bisect]: https://rust-lang.github.io/cargo-bisect-rustc/
[crashes test]: tests/compiletest.html#crashes-tests
[labeling]: https://forge.rust-lang.org/release/issue-triaging.html#applying-and-removing-labels
## Minimization ## Minimization
@ -143,7 +154,6 @@ ICEs that require debug assertions to reproduce should be tagged
- [tree-splicer][tree-splicer] generates new source files by combining existing - [tree-splicer][tree-splicer] generates new source files by combining existing
ones while maintaining correct syntax ones while maintaining correct syntax
[glacier]: https://github.com/rust-lang/glacier
[fuzz-rustc]: https://github.com/dwrensha/fuzz-rustc [fuzz-rustc]: https://github.com/dwrensha/fuzz-rustc
[icemaker]: https://github.com/matthiaskrgr/icemaker/ [icemaker]: https://github.com/matthiaskrgr/icemaker/
[tree-splicer]: https://github.com/langston-barrett/tree-splicer/ [tree-splicer]: https://github.com/langston-barrett/tree-splicer/

View File

@ -89,7 +89,7 @@ filtering the search to areas you're interested in. For example:
Not all important or beginner work has issue labels. Not all important or beginner work has issue labels.
See below for how to find work that isn't labelled. See below for how to find work that isn't labelled.
[help-wanted-search]: https://github.com/issues?q=is%3Aopen+is%3Aissue+org%3Arust-lang+no%3Aassignee+label%3AE-easy%2C%22good+first+issue%22%2Cgood-first-issue%2CE-medium%2CEasy%2CE-help-wanted%2CE-mentor+-label%3AS-blocked+-linked:pr+ [help-wanted-search]: https://github.com/issues?q=is%3Aopen+is%3Aissue+org%3Arust-lang+no%3Aassignee+label%3AE-easy%2C%22good+first+issue%22%2Cgood-first-issue%2CE-medium%2CEasy%2CE-help-wanted%2CE-mentor+-label%3AS-blocked+-linked%3Apr+
[Triage]: ./contributing.md#issue-triage [Triage]: ./contributing.md#issue-triage
### Recurring work ### Recurring work

View File

@ -546,7 +546,7 @@ only running the main `coverage` suite.
[`tests/crashes`] serve as a collection of tests that are expected to cause the [`tests/crashes`] serve as a collection of tests that are expected to cause the
compiler to ICE, panic or crash in some other way, so that accidental fixes are compiler to ICE, panic or crash in some other way, so that accidental fixes are
tracked. This was formally done at <https://github.com/rust-lang/glacier> but tracked. Formerly, this was done at <https://github.com/rust-lang/glacier> but
doing it inside the rust-lang/rust testsuite is more convenient. doing it inside the rust-lang/rust testsuite is more convenient.
It is imperative that a test in the suite causes rustc to ICE, panic, or It is imperative that a test in the suite causes rustc to ICE, panic, or
@ -560,9 +560,12 @@ If you want to see verbose stdout/stderr, you need to set
$ COMPILETEST_VERBOSE_CRASHES=1 ./x test tests/crashes/999999.rs --stage 1 $ COMPILETEST_VERBOSE_CRASHES=1 ./x test tests/crashes/999999.rs --stage 1
``` ```
When adding crashes from <https://github.com/rust-lang/rust/issues>, the issue Anyone can add ["untracked" crashes] from the issue tracker. It's strongly
number should be noted in the file name (`12345.rs` should suffice) and also recommended to include test cases from several issues in a single PR.
inside the file include a `//@ known-bug: #4321` directive. When you do so, each issue number should be noted in the file name (`12345.rs`
should suffice) and also inside the file by means of a `//@ known-bug: #12345`
directive. Please [label][labeling] the relevant issues with `S-bug-has-test`
afterwards.
If you happen to fix one of the crashes, please move it to a fitting If you happen to fix one of the crashes, please move it to a fitting
subdirectory in `tests/ui` and give it a meaningful name. Please add a doc subdirectory in `tests/ui` and give it a meaningful name. Please add a doc
@ -585,6 +588,8 @@ a subset first. The issue numbers can be found in the file name or the `//@
known-bug` directive inside the test file. known-bug` directive inside the test file.
[`tests/crashes`]: https://github.com/rust-lang/rust/tree/master/tests/crashes [`tests/crashes`]: https://github.com/rust-lang/rust/tree/master/tests/crashes
["untracked" crashes]: https://github.com/rust-lang/rust/issues?q=is%3Aissue+state%3Aopen+label%3AI-ICE%2CI-crash+label%3AT-compiler+label%3AS-has-mcve+-label%3AS-bug-has-test
[labeling]: https://forge.rust-lang.org/release/issue-triaging.html#applying-and-removing-labels
## Building auxiliary crates ## Building auxiliary crates