Skip to content
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

Add known-bug header. #1311

Merged
merged 2 commits into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/tests/headers.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ found in [`header.rs`] from the compiletest source.
* [`revisions`](compiletest.md#revisions) — compile multiple times
* [`forbid-output`](compiletest.md#incremental-tests) — incremental cfail rejects output pattern
* [`should-ice`](compiletest.md#incremental-tests) — incremental cfail should ICE
* [`known-bug`](ui.md#known-bugs) — indicates that the test is
for a known bug that has not yet been fixed
* [Assembly](compiletest.md#assembly-tests) headers
* `assembly-output` — the type of assembly output to check

Expand Down
15 changes: 15 additions & 0 deletions src/tests/ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,21 @@ The `ignore-pass` header can be used to ignore the `--pass` CLI flag if the
test won't work properly with that override.


## Known bugs

The `known-bug` header may be used for tests that demonstrate a known bug that
has not yet been fixed.
Adding tests for known bugs is helpful for several reasons:

1. Maintains a functional test that can be conveniently reused when the bug is fixed.
2. Provides a sentinel that will fail if the bug is incidentally fixed.
This can alert the developer so they know that the associated issue has
been fixed and can possibly be closed.
ehuss marked this conversation as resolved.
Show resolved Hide resolved

Do not include [error annotations](#error-annotations) in a test with `known-bug`.
Otherwise, the test should include the normal headers and stdout/stderr files.
ehuss marked this conversation as resolved.
Show resolved Hide resolved


## Test organization

When deciding where to place a test file, please try to find a subdirectory
Expand Down