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

Merged
merged 2 commits into from
Aug 24, 2025
Merged

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

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?

@jieyouxu
Copy link
Member

Yeah, however that test failing is a bit suspicious, I'll open an issue to track it.

@jieyouxu
Copy link
Member

@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 24, 2025
@bors
Copy link
Collaborator

bors commented Aug 24, 2025

⌛ Testing commit 36ab1bf with merge 41a79f1...

@bors
Copy link
Collaborator

bors commented Aug 24, 2025

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing 41a79f1 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 24, 2025
@bors bors merged commit 41a79f1 into rust-lang:master Aug 24, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 24, 2025
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 93edf9f (parent) -> 41a79f1 (this PR)

Test differences

Show 14 test diffs

Stage 1

  • [ui] tests/ui/parallel-rustc/cycle_crash-issue-135870.rs: [missing] -> pass (J1)
  • [ui] tests/ui/parallel-rustc/cycle_crash.rs: pass -> [missing] (J1)
  • [ui] tests/ui/parallel-rustc/ty-variance-issue-124423.rs: [missing] -> pass (J1)
  • [ui] tests/ui/parallel-rustc/ty-variance-issue-127971.rs: [missing] -> pass (J1)
  • [ui] tests/ui/parallel-rustc/undefined-function-issue-120760.rs: [missing] -> pass (J1)
  • [ui] tests/ui/parallel-rustc/unexpected-type-issue-120601.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/parallel-rustc/cycle_crash-issue-135870.rs: [missing] -> pass (J0)
  • [ui] tests/ui/parallel-rustc/cycle_crash.rs: pass -> [missing] (J0)
  • [ui] tests/ui/parallel-rustc/ty-variance-issue-124423.rs: [missing] -> pass (J0)
  • [ui] tests/ui/parallel-rustc/ty-variance-issue-127971.rs: [missing] -> pass (J0)
  • [ui] tests/ui/parallel-rustc/undefined-function-issue-120760.rs: [missing] -> pass (J0)
  • [ui] tests/ui/parallel-rustc/unexpected-type-issue-120601.rs: [missing] -> pass (J0)

Additionally, 2 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 41a79f1862aa6b81bac674598e275e80e9f09eb9 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-apple-various: 4043.7s -> 5897.5s (45.8%)
  2. dist-x86_64-apple: 6896.8s -> 8097.7s (17.4%)
  3. pr-check-1: 1612.4s -> 1353.1s (-16.1%)
  4. i686-gnu-2: 6348.7s -> 5492.5s (-13.5%)
  5. x86_64-gnu-llvm-19: 2800.5s -> 2425.1s (-13.4%)
  6. dist-loongarch64-linux: 6244.5s -> 7049.7s (12.9%)
  7. x86_64-gnu-stable: 7649.4s -> 6815.5s (-10.9%)
  8. x86_64-rust-for-linux: 2855.4s -> 2575.5s (-9.8%)
  9. i686-gnu-nopt-1: 8190.2s -> 7404.0s (-9.6%)
  10. x86_64-gnu-miri: 5090.9s -> 4628.2s (-9.1%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (41a79f1): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -5.5%, secondary -3.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-5.5% [-5.5%, -5.5%] 1
Improvements ✅
(secondary)
-3.2% [-3.2%, -3.2%] 1
All ❌✅ (primary) -5.5% [-5.5%, -5.5%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 468.299s -> 468.201s (-0.02%)
Artifact size: 378.33 MiB -> 378.32 MiB (-0.00%)

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 merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

8 participants