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

compiletest: what does --pass (pass mode) actually intend to do? #131990

Closed
jieyouxu opened this issue Oct 21, 2024 · 4 comments
Closed

compiletest: what does --pass (pass mode) actually intend to do? #131990

jieyouxu opened this issue Oct 21, 2024 · 4 comments
Labels
A-compiletest Area: The compiletest test runner A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools C-discussion Category: Discussion or questions that doesn't represent real issues. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jieyouxu
Copy link
Member

Apparently compiletest has a --pass flag which allows setting "pass mode" but it's unclear what that is intended to do. AFAIK, many tests don't account for this at all, and //@ ignore-pass is apparently a directive which is used liberally. CI doesn't seem to have fanatastic coverage for --pass configurations either. It might also be a specific thing for a subset of test suites. And also, how does the current implementation compare to the intended behavior / use case.

See https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.E2.9C.94.20CI-only.20failure.20in.20new.20test/near/477973621 for some discussions.

@jieyouxu jieyouxu added A-compiletest Area: The compiletest test runner A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug. E-needs-investigation Call for partcipation: This issues needs some investigation to determine current status T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 21, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 21, 2024
@jieyouxu jieyouxu added C-discussion Category: Discussion or questions that doesn't represent real issues. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 21, 2024
@Zalathar
Copy link
Contributor

Zalathar commented Oct 21, 2024

For archaeological reference, --pass and //@ ignore-pass appear to have been added in #61755.

There also appears to be some motivation briefly mentioned in the associated #61778.

@jieyouxu
Copy link
Member Author

jieyouxu commented Oct 21, 2024

That PR itself is builtin upon #61778.
EDIT: ah, I found important context:

#61755 will provide a way to run the tests with any mode, e.g. bump check-pass tests to run-pass to satisfy especially suspicious people, and be able to make sure that codegen doesn't breaks in some entirely unexpected way.

Also in #61755:

On my machine, ./x.py -i test src/test/run-pass --stage 1 --pass check takes 38 seconds whereas it takes 2 min 7 seconds without --pass check.

@jieyouxu jieyouxu removed the C-bug Category: This is a bug. label Oct 21, 2024
@jieyouxu
Copy link
Member Author

TL;DR: pass mode seems to be a mechanism to allow someone to forcefully modify how deep into the compilation or test running pipeline (check vs build vs run) the tests will be evaluated at. //@ ignore-pass is the opt-out, and this seems to be used as an escape hatch because PR CI I think uses --pass=check to force downgrade some ui tests to run them at a lower test running pipeline to save CI time?

@ehuss
Copy link
Contributor

ehuss commented Oct 21, 2024

In practice, I think --pass=check is the only mode override used. If you are not doing codegen work, it makes the ui tests much faster. (At least, that's how I documented it.) I'm not sure how useful the other modes are.

@jieyouxu jieyouxu removed the E-needs-investigation Call for partcipation: This issues needs some investigation to determine current status label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools C-discussion Category: Discussion or questions that doesn't represent real issues. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
Development

No branches or pull requests

4 participants