-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Tracking Issue for ui test suite cleanups and maintenance #133895
Labels
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
E-medium
Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
E-tedious
Call for participation: An issue involves lots of work and is better handled as many small tasks.
S-tracking-forever
Status: Never to be closed.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
jieyouxu
added
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
E-medium
Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
E-tedious
Call for participation: An issue involves lots of work and is better handled as many small tasks.
S-tracking-forever
Status: Never to be closed.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Dec 5, 2024
jieyouxu
added
the
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
label
Dec 5, 2024
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this issue
Dec 7, 2024
…eyouxu Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs` Tests for the closely-related `-l` flag and `#[link(..)]` attribute are spread across a few different directories, and in some cases have ended up in a test directory intended for other linker-related functionality. This PR moves most of them into a single `tests/ui/link-native-libs` directory. --- Part of rust-lang#133895. r? jieyouxu
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this issue
Dec 8, 2024
…eyouxu Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs` Tests for the closely-related `-l` flag and `#[link(..)]` attribute are spread across a few different directories, and in some cases have ended up in a test directory intended for other linker-related functionality. This PR moves most of them into a single `tests/ui/link-native-libs` directory. --- Part of rust-lang#133895. r? jieyouxu
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this issue
Dec 8, 2024
…eyouxu Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs` Tests for the closely-related `-l` flag and `#[link(..)]` attribute are spread across a few different directories, and in some cases have ended up in a test directory intended for other linker-related functionality. This PR moves most of them into a single `tests/ui/link-native-libs` directory. --- Part of rust-lang#133895. r? jieyouxu
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Dec 8, 2024
Advent of `tests/ui` (misc cleanups and improvements) [2/N] Part of rust-lang#133895. Misc improvements to some ui tests immediately under `tests/ui/`. Best reviewed commit-by-commit. Please see individual commit messages for some further rationale and change summaries. r? compiler
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Dec 8, 2024
Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs` Tests for the closely-related `-l` flag and `#[link(..)]` attribute are spread across a few different directories, and in some cases have ended up in a test directory intended for other linker-related functionality. This PR moves most of them into a single `tests/ui/link-native-libs` directory. --- Part of rust-lang#133895. try-job: i686-mingw r? jieyouxu
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Dec 9, 2024
Rollup merge of rust-lang#134024 - jieyouxu:ui-cleanup-2, r=Nadrieril Advent of `tests/ui` (misc cleanups and improvements) [2/N] Part of rust-lang#133895. Misc improvements to some ui tests immediately under `tests/ui/`. Best reviewed commit-by-commit. Please see individual commit messages for some further rationale and change summaries. r? compiler
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Dec 9, 2024
…eyouxu Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs` Tests for the closely-related `-l` flag and `#[link(..)]` attribute are spread across a few different directories, and in some cases have ended up in a test directory intended for other linker-related functionality. This PR moves most of them into a single `tests/ui/link-native-libs` directory. --- Part of rust-lang#133895. try-job: i686-mingw r? jieyouxu
jieyouxu
added a commit
to jieyouxu/rust
that referenced
this issue
Dec 9, 2024
…eyouxu Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs` Tests for the closely-related `-l` flag and `#[link(..)]` attribute are spread across a few different directories, and in some cases have ended up in a test directory intended for other linker-related functionality. This PR moves most of them into a single `tests/ui/link-native-libs` directory. --- Part of rust-lang#133895. try-job: i686-mingw r? jieyouxu
jieyouxu
added a commit
to jieyouxu/rust
that referenced
this issue
Dec 9, 2024
…eyouxu Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs` Tests for the closely-related `-l` flag and `#[link(..)]` attribute are spread across a few different directories, and in some cases have ended up in a test directory intended for other linker-related functionality. This PR moves most of them into a single `tests/ui/link-native-libs` directory. --- Part of rust-lang#133895. try-job: i686-mingw r? jieyouxu
fmease
added a commit
to fmease/rust
that referenced
this issue
Dec 9, 2024
…eyouxu Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs` Tests for the closely-related `-l` flag and `#[link(..)]` attribute are spread across a few different directories, and in some cases have ended up in a test directory intended for other linker-related functionality. This PR moves most of them into a single `tests/ui/link-native-libs` directory. --- Part of rust-lang#133895. try-job: i686-mingw r? jieyouxu
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Dec 10, 2024
Rollup merge of rust-lang#133996 - Zalathar:ui-link-native-libs, r=jieyouxu Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs` Tests for the closely-related `-l` flag and `#[link(..)]` attribute are spread across a few different directories, and in some cases have ended up in a test directory intended for other linker-related functionality. This PR moves most of them into a single `tests/ui/link-native-libs` directory. --- Part of rust-lang#133895. try-job: i686-mingw r? jieyouxu
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Dec 13, 2024
Advent of `tests/ui` (misc cleanups and improvements) [1/N] Part of rust-lang#133895. Misc improvements to some ui tests immediately under `tests/ui/`. Best reviewed commit-by-commit. Thanks `@clubby789` for PR title suggestion 😸. r? compiler
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Dec 14, 2024
Rollup merge of rust-lang#133900 - jieyouxu:ui-cleanup-1, r=fmease Advent of `tests/ui` (misc cleanups and improvements) [1/N] Part of rust-lang#133895. Misc improvements to some ui tests immediately under `tests/ui/`. Best reviewed commit-by-commit. Thanks `@clubby789` for PR title suggestion 😸. r? compiler
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Dec 18, 2024
…errors Advent of `tests/ui` (misc cleanups and improvements) [3/N] Part of rust-lang#133895. Misc improvements to some ui tests immediately under `tests/ui/`. Best reviewed commit-by-commit. Each commit's commit message contains further elaboration and rationale for changes. r? compiler
jhpratt
added a commit
to jhpratt/rust
that referenced
this issue
Dec 19, 2024
…errors Advent of `tests/ui` (misc cleanups and improvements) [3/N] Part of rust-lang#133895. Misc improvements to some ui tests immediately under `tests/ui/`. Best reviewed commit-by-commit. Each commit's commit message contains further elaboration and rationale for changes. r? compiler
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Dec 19, 2024
Rollup merge of rust-lang#134418 - jieyouxu:ui-cleanup-3, r=compiler-errors Advent of `tests/ui` (misc cleanups and improvements) [3/N] Part of rust-lang#133895. Misc improvements to some ui tests immediately under `tests/ui/`. Best reviewed commit-by-commit. Each commit's commit message contains further elaboration and rationale for changes. r? compiler
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
E-medium
Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
E-tedious
Call for participation: An issue involves lots of work and is better handled as many small tasks.
S-tracking-forever
Status: Never to be closed.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This is a tracking issue for an initiative of improving ui test suite organization and ui test usability. This issue is not meant for general discussions, but is instead intended for tracking logistics of PRs. For specific matters, please discuss in the zulip thread https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Discussion.20for.20ui.20test.20suite.20improvements.
Context
The
ui
test suite (tests/ui/
) has a lot of tests. Often, many ui tests suffer from:tests/ui/
. Some ui tests fall into multiple categories, which is fine, but it may make sense to rehome an ui test if it's better organized under a different directory.Possible improvements
The guiding rationale for improving ui test usability is to:
rustfmt
the test as it will regress test coverage.See Best practices for writing tests in rustc-dev-guide for advice on how to make ui tests more useful. However, don't take the advice at face value -- they should be evaluated on a case-by-case basis. For instance, some subdirectory might contain a collection of specific regression tests related to issues, and in that case having tests be named just
issue-xxxxx.rs
isn't bad. On the contrary, a top-levelissue-xxxxx.rs
undertests/ui/
is not very informative.Example of things that might be done, but only if it makes sense on a case-by-case basis:
//! Issue: <https://github.com/rust-lang/rust/issues/374>.
or whatever useful relevant context.macro-empty-suggestion-span-123456.rs
.tests/ui/macro-empty-suggestion-span-123456.rs
->tests/ui/hir-typeck/suggestions/macro-empty-suggestion-span-123456.rs
(hypothetical, or some other better organization).Because these require discretion (changes are not always improvements!), this issue is labeled
E-medium
and not justE-easy
. Having "insider" compiler implementation knowledge helps a lot here.Example test doc comment
No fixed format, adapt as suitable for the test at hand. But an example:
Long-term plan
tests/ui
and place them into suitable subdirectories, improving the tests themselves along the way.tests/ui/
, and see if they need to be fusioned/fissioned/renamed or otherwise adjusted. Where suitable, we can also introduce some subdirectory-levelREADME.md
to document subdirectory intention/area.tests/ui/issues/
directory and rehome the tests properly.Implementation history
-l
and#[link(..)]
intotests/ui/link-native-libs
#133996tests/ui
(misc cleanups and improvements) [1/N] #133900tests/ui
(misc cleanups and improvements) [2/N] #134024tests/ui
(misc cleanups and improvements) [3/N] #134418Footnotes
not always problematic! Requires discretion. ↩
The text was updated successfully, but these errors were encountered: