Skip to content

Commit b1b4dbd

Browse files
committed
Flesh out sections about crashes tests and update mentions of glacier
1 parent 476328a commit b1b4dbd

File tree

3 files changed

+25
-11
lines changed

3 files changed

+25
-11
lines changed

src/fuzzing.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,30 @@ To build a corpus, you may want to use:
7474
- The rustc/rust-analyzer/clippy test suites (or even source code) --- though avoid
7575
tests that are already known to cause failures, which often begin with comments
7676
like `// failure-status: 101` or `// known-bug: #NNN`.
77-
- The already-fixed ICEs in [Glacier][glacier] --- though avoid the unfixed
78-
ones in `ices/`!
77+
- The already-fixed ICEs in the archived [Glacier][glacier] repository --- though
78+
avoid the unfixed ones in `ices/`!
79+
80+
[glacier]: https://github.com/rust-lang/glacier
7981

8082
## Extra credit
8183

8284
Here are a few things you can do to help the Rust project after filing an ICE.
8385

84-
- [Bisect][bisect] the bug to figure out when it was introduced
86+
- [Bisect][bisect] the bug to figure out when it was introduced.
87+
If you find the regressing PR / commit, you can mark the issue with the label
88+
`S-has-bisection`. If not, consider applying `E-needs-bisection` instead.
8589
- Fix "distractions": problems with the test case that don't contribute to
8690
triggering the ICE, such as syntax errors or borrow-checking errors
87-
- Minimize the test case (see below)
88-
- Add the minimal test case to [Glacier][glacier]
91+
- Minimize the test case (see below). If successful, you can label the
92+
issue with `S-has-mcve`. Otherwise, you can apply `E-needs-mcve`.
93+
- Add the minimal test case to the rust-lang/rust repo as a [crashes test].
94+
While you're at it, consider including other "untracked" crashes in your PR.
95+
Please don't forget to mark your issue with `S-bug-has-test` afterwards.
96+
97+
See also [applying and removing labels][labeling].
8998

9099
[bisect]: https://rust-lang.github.io/cargo-bisect-rustc/
100+
[labeling]: https://forge.rust-lang.org/release/issue-triaging.html#applying-and-removing-labels
91101

92102
## Minimization
93103

@@ -143,7 +153,6 @@ ICEs that require debug assertions to reproduce should be tagged
143153
- [tree-splicer][tree-splicer] generates new source files by combining existing
144154
ones while maintaining correct syntax
145155

146-
[glacier]: https://github.com/rust-lang/glacier
147156
[fuzz-rustc]: https://github.com/dwrensha/fuzz-rustc
148157
[icemaker]: https://github.com/matthiaskrgr/icemaker/
149158
[tree-splicer]: https://github.com/langston-barrett/tree-splicer/

src/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ filtering the search to areas you're interested in. For example:
8989
Not all important or beginner work has issue labels.
9090
See below for how to find work that isn't labelled.
9191

92-
[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+
92+
[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+
9393
[Triage]: ./contributing.md#issue-triage
9494

9595
### Recurring work

src/tests/compiletest.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ only running the main `coverage` suite.
546546

547547
[`tests/crashes`] serve as a collection of tests that are expected to cause the
548548
compiler to ICE, panic or crash in some other way, so that accidental fixes are
549-
tracked. This was formally done at <https://github.com/rust-lang/glacier> but
549+
tracked. Formerly, this was done at <https://github.com/rust-lang/glacier> but
550550
doing it inside the rust-lang/rust testsuite is more convenient.
551551

552552
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
560560
$ COMPILETEST_VERBOSE_CRASHES=1 ./x test tests/crashes/999999.rs --stage 1
561561
```
562562

563-
When adding crashes from <https://github.com/rust-lang/rust/issues>, the issue
564-
number should be noted in the file name (`12345.rs` should suffice) and also
565-
inside the file include a `//@ known-bug: #4321` directive.
563+
Anyone can add ["untracked" crashes] from the issue tracker. It's strongly
564+
recommended to include test cases from several issues in a single PR.
565+
When you do so, each issue number should be noted in the file name (`12345.rs`
566+
should suffice) and also inside the file by means of a `//@ known-bug: #12345`
567+
directive. Please [label][labeling] the relevant issues with `S-bug-has-test`
568+
afterwards.
566569

567570
If you happen to fix one of the crashes, please move it to a fitting
568571
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 `//@
585588
known-bug` directive inside the test file.
586589

587590
[`tests/crashes`]: https://github.com/rust-lang/rust/tree/master/tests/crashes
591+
["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
592+
[labeling]: https://forge.rust-lang.org/release/issue-triaging.html#applying-and-removing-labels
588593

589594
## Building auxiliary crates
590595

0 commit comments

Comments
 (0)