Skip to content

Add more tests for the parallel rustc #145384

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ywxt
Copy link
Contributor

@ywxt ywxt commented Aug 14, 2025

At the moment, the parallel frontend test cases are severely lacking. Althought some reported issues have been resolved, they haven't been added into the tests.

This PR arranges the resolved ICE issues and adds tests for them.

Whether it is worthwhile to add a separate test suite for the paralel frontend still requires futher discussion. But we are trying coveraging issues being resolved through capability of the existing UI test suite.

Discussion: Zulip

Related issues:

cc @jieyouxu

@rustbot
Copy link
Collaborator

rustbot commented Aug 14, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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 Aug 14, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 14, 2025

Some changes occurred in src/tools/compiletest

cc @jieyouxu

Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if the tests could have slightly more descriptive names, though I appreciate that might be tricky.

@@ -2749,7 +2749,7 @@ impl<'test> TestCx<'test> {
// Wrapper tools set by `runner` might provide extra output on failure,
// for example a WebAssembly runtime might print the stack trace of an
// `unreachable` instruction by default.
let compare_output_by_lines = self.config.runner.is_some();
let compare_output_by_lines = self.props.parallel_front_end || self.config.runner.is_some();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is the only thing that parallel_front_end enables, maybe exposing //@ compare-output-by-lines would be better?

Copy link
Member

@jieyouxu jieyouxu Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that might be better, it's more direct in telling the test reader what the behavior is.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Some nits

@@ -2749,7 +2749,7 @@ impl<'test> TestCx<'test> {
// Wrapper tools set by `runner` might provide extra output on failure,
// for example a WebAssembly runtime might print the stack trace of an
// `unreachable` instruction by default.
let compare_output_by_lines = self.config.runner.is_some();
let compare_output_by_lines = self.props.parallel_front_end || self.config.runner.is_some();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem: please document this directive and what it does in rustc-dev-guide.

@@ -2749,7 +2749,7 @@ impl<'test> TestCx<'test> {
// Wrapper tools set by `runner` might provide extra output on failure,
// for example a WebAssembly runtime might print the stack trace of an
// `unreachable` instruction by default.
let compare_output_by_lines = self.config.runner.is_some();
let compare_output_by_lines = self.props.parallel_front_end || self.config.runner.is_some();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark: note that this has two potential issues:

  1. This can mask genuine bugs, where a symptom may be diagnostics reordering.
  2. The parallel front-end tests are still potential flaky.

I don't love (2) too much, but I recognize the pragmatic need for having some test coverage, so I don't want to block this.

My reservation is primarily that these tests can potentially fail someone else's PR, or a rollup, and can be rather confusing.

Copy link
Member

@jieyouxu jieyouxu Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark: this is one of those that we do not know if it was genuinely fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I remove it ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep it for now, will need to disable it if it's not actually fixed

@davidtwco
Copy link
Member

Will re-assign to @jieyouxu, feel free to r=davidtwco,jieyouxu when you're happy with these changes

r? @jieyouxu

@rustbot rustbot assigned jieyouxu and unassigned davidtwco Aug 14, 2025
@jieyouxu
Copy link
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 14, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 14, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the A-rustc-dev-guide Area: rustc-dev-guide label Aug 15, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 15, 2025

The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes.

cc @BoxyUwU, @jieyouxu, @Kobzol, @tshepang

@ywxt
Copy link
Contributor Author

ywxt commented Aug 15, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 15, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jieyouxu
Copy link
Member

@bors r+ rollup=never (parallel rustc tests)

@bors
Copy link
Collaborator

bors commented Aug 15, 2025

📌 Commit 36ab1bf has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 15, 2025
@SparrowLii
Copy link
Member

How long time does a rollup-never PR need to be merged? I wonder if it is strucked

@jieyouxu
Copy link
Member

jieyouxu commented Aug 21, 2025

The queue was particularly backed up this week (partly due to outages and bors troubles), but this PR is in reasonably close position to tip of queue.

bors added a commit that referenced this pull request Aug 21, 2025
Add more tests for the parallel rustc

At the moment, the parallel frontend test cases are severely lacking. Althought some reported issues have been resolved, they haven't been added into the tests.

This PR arranges the resolved ICE issues and adds tests for them.

Whether it is worthwhile to add a separate test suite for the paralel frontend still requires futher discussion. But we are trying coveraging issues being resolved through capability of the existing UI test suite.

Discussion: [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/233931-t-compiler.2Fmajor-changes/topic/Proposal.20for.20a.20dedicated.20test.20suite.20for.20t.E2.80.A6.20compiler-team.23906)

Related issues:
- #120760
- #124423 fixed by #140358
- #127971 fxied by #140358
- #120601 fixed by #127311

cc `@jieyouxu`
@bors
Copy link
Collaborator

bors commented Aug 21, 2025

⌛ Testing commit 36ab1bf with merge 4cd914a...

@bors
Copy link
Collaborator

bors commented Aug 21, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 21, 2025
@ywxt
Copy link
Contributor Author

ywxt commented Aug 22, 2025

Do the machines get offline?

@jieyouxu
Copy link
Member

GitHub Actions had an incident last night (a different one), https://www.githubstatus.com/incidents/c7kq3ctclddp

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 22, 2025
bors added a commit that referenced this pull request Aug 22, 2025
Add more tests for the parallel rustc

At the moment, the parallel frontend test cases are severely lacking. Althought some reported issues have been resolved, they haven't been added into the tests.

This PR arranges the resolved ICE issues and adds tests for them.

Whether it is worthwhile to add a separate test suite for the paralel frontend still requires futher discussion. But we are trying coveraging issues being resolved through capability of the existing UI test suite.

Discussion: [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/233931-t-compiler.2Fmajor-changes/topic/Proposal.20for.20a.20dedicated.20test.20suite.20for.20t.E2.80.A6.20compiler-team.23906)

Related issues:
- #120760
- #124423 fixed by #140358
- #127971 fxied by #140358
- #120601 fixed by #127311

cc `@jieyouxu`
@bors
Copy link
Collaborator

bors commented Aug 22, 2025

⌛ Testing commit 36ab1bf with merge bdc19a9...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-aux failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Collaborator

bors commented Aug 22, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 22, 2025
@ywxt
Copy link
Contributor Author

ywxt commented Aug 22, 2025

failed in library/std/src/thread/mod.rs , I guess this is unrelated to this PR?

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-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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
None yet
Development

Successfully merging this pull request may close these issues.

7 participants