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

Support x test --stage 1 ui-fulldeps #110478

Merged
merged 1 commit into from
Apr 18, 2023
Merged

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Apr 18, 2023

@Nilstrieb had an excellent idea the other day: the same way that rustdoc is able to load rustc_driver from the sysroot, ui-fulldeps tests should also be able to load it from the sysroot. That allows us to run fulldeps tests with stage1, without having to fully rebuild the compiler twice. It does unfortunately have the downside that we're building the tests with the bootstrap compiler, not the in-tree sources, but since most of the fulldeps tests are for the API of the compiler, that seems ok.

I think it's possible to extend this to run-make-fulldeps, but I've run out of energy for tonight.

  • Move plugin tests into a subdirectory.

    Plugins are loaded at runtime with dlopen and so require the ABI of the running compile to match the ABI of the compiler linked with rustc_driver. As a result they can't be supported in stage 1 and have to use // ignore-stage1.

  • Remove ignore-stage1 from most non-plugin tests

  • Ignore diagnostic tests in stage 1. Even though this requires a stage 2 build to load rustc_driver, it's primarily testing the error message that the running compiler emits when the diagnostic struct is malformed.

  • Pass -Zforce-unstable-if-unmarked in stage1, not just stage2. That allows running hash-stable-is-unstable in stage1, since it now suggests adding rustc_private to enable loading the crates.

  • Add libLLVM.so to the stage0 target sysroot, to allow fulldeps tests that act as custom drivers to load it at runtime.

  • Pass --sysroot stage0-sysroot in compiletest so that we use the correct version of std.

  • Move a few lint tests from ui-fulldeps to ui

    These had an aux-build:lint-group-plugin-test.rs that they never actually loaded with feature(plugin) nor tested. I removed the unused aux-build and they pass fine with stage 1.

Fixes #75905.

Nils had an excellent idea the other day: the same way that rustdoc is
able to load `rustc_driver` from the sysroot, ui-fulldeps tests should
also be able to load it from the sysroot. That allows us to run fulldeps
tests with stage1, without having to fully rebuild the compiler twice.
It does unfortunately have the downside that we're running the tests on
the *bootstrap* compiler, not the in-tree sources, but since most of the
fulldeps tests are for the *API* of the compiler, that seems ok.

I think it's possible to extend this to `run-make-fulldeps`, but I've
run out of energy for tonight.

- Move `plugin` tests into a subdirectory.

  Plugins are loaded at runtime with `dlopen` and so require the ABI of
  the running compile to match the ABI of the compiler linked with
  `rustc_driver`. As a result they can't be supported in stage 1 and have
  to use `// ignore-stage1`.

- Remove `ignore-stage1` from most non-plugin tests

- Ignore diagnostic tests in stage 1. Even though this requires a stage
  2 build to load rustc_driver, it's primarily testing the error message
  that the *running* compiler emits when the diagnostic struct is malformed.

- Pass `-Zforce-unstable-if-unmarked` in stage1, not just stage2. That
  allows running `hash-stable-is-unstable` in stage1, since it now
  suggests adding `rustc_private` to enable loading the crates.

- Add libLLVM.so to the stage0 target sysroot, to allow fulldeps tests
  that act as custom drivers to load it at runtime.

- Pass `--sysroot stage0-sysroot` in compiletest so that we use the
  correct version of std.
@rustbot
Copy link
Collaborator

rustbot commented Apr 18, 2023

r? @albertlarsan68

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added 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 Apr 18, 2023
@albertlarsan68
Copy link
Member

@bors r+ rollup=iffy
Is stage1 tested in CI?

@bors
Copy link
Contributor

bors commented Apr 18, 2023

📌 Commit d6af602 has been approved by albertlarsan68

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 Apr 18, 2023
@bors
Copy link
Contributor

bors commented Apr 18, 2023

⌛ Testing commit d6af602 with merge ba5dc55d0ba22c4faa5db8648961e53261aed43a...

@bors
Copy link
Contributor

bors commented Apr 18, 2023

💔 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 Apr 18, 2023
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

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

@albertlarsan68
Copy link
Member

@bors retry seems supurious

curl: (6) Could not resolve host: ci-mirrors.rust-lang.org

@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 Apr 18, 2023
@bors
Copy link
Contributor

bors commented Apr 18, 2023

⌛ Testing commit d6af602 with merge de96f3d...

@jyn514
Copy link
Member Author

jyn514 commented Apr 18, 2023

Is stage1 tested in CI?

Yes, since recently :) see src/ci/docker/host-x86_64/x86_64-gnu-llvm-14-stage1/.

@bors
Copy link
Contributor

bors commented Apr 18, 2023

☀️ Test successful - checks-actions
Approved by: albertlarsan68
Pushing de96f3d to master...

1 similar comment
@bors
Copy link
Contributor

bors commented Apr 18, 2023

☀️ Test successful - checks-actions
Approved by: albertlarsan68
Pushing de96f3d to master...

@bors bors added merged-by-bors This PR was explicitly merged by bors. labels Apr 18, 2023
@bors bors merged commit de96f3d into rust-lang:master Apr 18, 2023
11 checks passed
@rustbot rustbot added this to the 1.71.0 milestone Apr 18, 2023
@jyn514 jyn514 deleted the stage1-fulldeps branch April 18, 2023 14:14
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (de96f3d): 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

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
7.4% [7.4%, 7.4%] 1
Regressions ❌
(secondary)
1.7% [1.7%, 1.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.4% [-3.4%, -3.4%] 1
All ❌✅ (primary) 7.4% [7.4%, 7.4%] 1

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
6.0% [3.6%, 10.3%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 1, 2023
…an68

Update location of `auxiliary/lint-plugin-test.rs`

**PR Summary**:
PR updates the location of  `auxiliary/lint-plugin-test.rs` file which was moved in PR rust-lang#110478.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 1, 2023
Rollup merge of rust-lang#116299 - emmanuel-ferdman:wip, r=albertlarsan68

Update location of `auxiliary/lint-plugin-test.rs`

**PR Summary**:
PR updates the location of  `auxiliary/lint-plugin-test.rs` file which was moved in PR rust-lang#110478.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

./x.py test silently ignores some of ui-fulldeps test and fails on one test
6 participants