tidy: skip the file, not the whole directory, in tests_revision_unpaired_stdout_stderr - #160349
Open
lazureykis wants to merge 2 commits into
Open
tidy: skip the file, not the whole directory, in tests_revision_unpaired_stdout_stderr#160349lazureykis wants to merge 2 commits into
tests_revision_unpaired_stdout_stderr#160349lazureykis wants to merge 2 commits into
Conversation
These 39 .stderr files across 28 tests are named after revisions the tests do not declare, so compiletest never reads them. Most were left behind when a test's revisions were renamed or removed -- for example the seven tests/ui/dyn-compatibility/*.curr.stderr files, orphaned by the dyn compatibility rename in 57b5d3a. They are invisible to tidy today because the tests_revision_unpaired_stdout_stderr check does not actually run; the next commit fixes that. Removing them first keeps x test tidy passing at every commit.
…dout_stderr Two match arms used return where continue was meant. Both are inside a per-sibling loop that is itself inside the closure passed to walk_dir, and walk_dir invokes that closure once per directory -- so return abandoned the whole directory instead of moving on to the next file. files_under_inspection is a sorted BTreeSet and nearly every tests/ui directory holds an ordinary two-component foo.stderr, which hits the second arm early, so in practice the check exited almost every directory before reaching a file worth flagging. It has been inert since f11713b. The other three guards in the same loop already use continue, and the comment on the first arm says skip, i.e. skip this file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tests_revision_unpaired_stdout_stderrhas not been checking anything sincef11713be75dd.Two arms use
returnwherecontinuewas meant:They sit in a per-sibling loop inside the closure
walk_dircalls once per directory, soreturnabandons the directory instead of skipping the file. Nearly everytests/uidirectory holds an ordinaryfoo.stderrthat hits the second arm early, so the check exits before reaching anything worth flagging. The loop's other three guards already usecontinue.Switching the keywords surfaces 39 stale output files across 28 tests, each named after a revision its test does not declare — e.g.
async_gen_fn.rsdeclarese2015 mid e2024but carries.e2018,.e2021and.none. The first commit removes them and the second fixes the control flow, sox test tidypasses at every commit.x test tests/ui: 21626 passed, 0 failed.r? bootstrap