Closed
Labels
A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.E-tediousCall for participation: An issue involves lots of work and is better handled as many small tasks.Call for participation: An issue involves lots of work and is better handled as many small tasks.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
EDIT(@jieyouxu): I personally find just moving the tests to be not super useful. Consider also improving these tests in the process -- see #133895.
NOTE: see #73494 (comment) for mentoring instructions.
Looking at https://github.com/rust-lang/rust/tree/master/src/test/ui, github truncates the list to just the first 1000 entries (of 1564 total entries).
This is especially frustrating since github also sorts by name, not by kind, and so its truncation is cutting off whole subdirectories from the view.
TODO:
- We should restructure the test suite so that no one directory has more than 1000 entries
- We should add code to tidy to ensure that future changes do not break the above invariant. (done by Check the number of entries in UI test on tidy #79959)
Reacted by Esteban Kuber, Aaron Hill, Nathan Corbyn, lcnr, Jubilee, jyn, Yuki Okushi, Jakub Beránek and İsmail Arılık
Reacted by Alik Aslanyan
Reacted by Henry Boisdequin
Metadata
Metadata
Assignees
Labels
A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.E-tediousCall for participation: An issue involves lots of work and is better handled as many small tasks.Call for participation: An issue involves lots of work and is better handled as many small tasks.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Activity
lcnr commentedon Jun 19, 2020
The same problem exists for https://github.com/rust-lang/rust/tree/master/src/test/ui/issues with 1,839 omitted entries.
That could be solved by adding using a directory every 10000 issue ids, i.e.
ui/issues/10000-19999,ui/issues/20000-29999and so onworkingjubilee commentedon Oct 19, 2020
Also see #76268: many of these are run pass tests that do not particularly need to be UI tests.
Havvy commentedon Nov 22, 2020
Is the compiler team okay with PRs that move tests into subdirectories?
Nadrieril commentedon Nov 25, 2020
That would technically work, but I'd much rather see some kind of thematic folders. I've been doing that for the bit of the compiler I'm hacking on, and it's been tremendously helpful to have most relevant tests be caught by
--test-args pattern. For that same reason I like having the corresponding run-pass/check-pass tests in the same folders too. I don't find the ui/non-ui distinction all that helpful when I'm trying to check if my latest changes broke anything.lcnr commentedon Nov 25, 2020
yeah, i agree that it would be better to group tests by what they are testing, but that's a lot of work and probably won't be done in the near future so imo it would be great to start by grouping them by issue id which is fairly easy and then continue sorting them afterwards
Auto merge of rust-lang#79776 - petrochenkov:mvtest, r=Mark-Simulacrum
petrochenkov commentedon Dec 7, 2020
A simple machine learning model could assist this task well.
Putting a test into one of N subdirectories is a typical classification task.
My knowledge in this area is outdated by about 10 years, but here's one suggested solution
src/test/uiroot andsrc/test/ui/issuesare classified, high confidence tests are moved, low confidence tests are left for manual classification.(We just need someone who will be able to implement this quickly, that is probably any ML student.)
petrochenkov commentedon Dec 7, 2020
cc @Eh2406 on the previous comment.
Eh2406 commentedon Dec 7, 2020
Not an ML student, nor familiar with the compiler. Was I who you meant to ping?
Code coverage results for each test would probably make for great features, if we can get it to work. (Did this test run this line of code.)
I'd guess that a simple pca decomposition of that can bring it to a workable number of dimensions, and a k-means can make some clusters. (Keep it low teck until we prove we need more.) But someone with NLP experience may know more about what the best tools are these days.
petrochenkov commentedon Dec 7, 2020
(@Eh2406 I just remember you've been talking about being familiar with statistics, not suggesting you to actually implement this.)
matklad commentedon Dec 7, 2020
Seems like there's a bunch of discussion here and on #79718. I feel rather strongly about this topic, but I also don't have a large stake here, as I don't work with rust-lang/rust test suite on a daily basis.
So I've tried creating a summary document here:
https://hackmd.io/@matklad/Hypu-hosv/edit
Rollup merge of rust-lang#79959 - JohnTitor:tidy-entries, r=petrochenkov
49 remaining items
petrochenkov commentedon Jan 30, 2024
I don't think simply reducing this number is a goal.
The
classifuitool is working pretty well, and @c410-f3r has already moved hundreds of tests to "semantically appropriate" subdirectories using it.This is just some work that needs to happen in the background, not even intensively, just consistently.
Unrolled build for rust-lang#120439
c410-f3r commentedon Jan 31, 2024
Time to get back to this topic. Hope it ends this year 🤞
jieyouxu commentedon Mar 12, 2025
Triage: I personally find just moving the tests to be not super useful. Consider also improving these tests in the process -- see #133895.
Rollup merge of rust-lang#138471 - spencer3035:move-ui-test-1ofn, r=j…
Unrolled build for rust-lang#138471
Rollup merge of rust-lang#138639 - spencer3035:clean-ui-tests-2-of-n,…
Unrolled build for rust-lang#138639
Rollup merge of rust-lang#139889 - spencer3035:clean-ui-tests-3-of-n,…
Unrolled build for rust-lang#139889
Rollup merge of rust-lang#139995 - spencer3035:clean-ui-tests-4-of-n,…
Unrolled build for rust-lang#139995
jieyouxu commentedon Jul 19, 2025
Triage: I'm going to close this issue re. moving tests out of
tests/ui/(top-level) as completed as of #143908. Now, the top-leveltests/ui/folder should only have sub-directories and not individual tests for organization.We'll track further subdirectory adjustments, and breaking up
tests/ui/issues/in #133895 instead.