Skip to content

intrinsic-test: run by default #159011

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
xonx4l:intrinsic-test-default
Jul 23, 2026
Merged

intrinsic-test: run by default #159011
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
xonx4l:intrinsic-test-default

Conversation

@xonx4l

@xonx4l xonx4l commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

View all comments

This PR makes intrinsic-test run by default in x test and raise sample-percentage to 100.

r? @Kobzol

@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) labels Jul 9, 2026
@rustbot

rustbot commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Kobzol is not on the review rotation at the moment.
They may take a while to respond.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Kobzol

Kobzol commented Jul 9, 2026

Copy link
Copy Markdown
Member

You'll have to rebless bootstrap tests, IIRC it was just cargo insta review in the bootstrap directory after running ./x test bootstrap. Then we can see the times on CI. How do the times differ for you locally?

@xonx4l

xonx4l commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

@Kobzol locally running ./x test --stage 2 library/stdarch/crates/intrinsic-test took 48m 25s . Which built the Stage 1 compiler, the standard library, the Stage 2 compiler and reached the execution phase of intrinsic-test but got error due to a cc version mismatch . Thank you!

@rust-log-analyzer

This comment has been minimized.

@Kobzol Kobzol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you! I still have yet to prepare my env to actually run this locally 🙈

View changes since this review

/// and a Rust Cargo workspace. Then runs `cargo test` on that workspace
/// which compiles both versions and compares their outputs on random inputs.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct IntrinsicTest {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's add a comment here that explains the required dependencies on the various OSes. For now, we should say that on x64, it requires a recent GCC (>15?), and the SDE emulator to run.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK, will add.

cmd.arg("--skip").arg(skip);
}
cmd.arg("--sample-percentage").arg("10");
cmd.arg("--sample-percentage").arg("100");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's do this in a separate PR, it seems that the tests are a lot slower with this sample rate.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok, makes sense . Thank you!

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

run.path("library/stdarch/crates/intrinsic-test")
}

fn is_default_step(_builder: &Builder<'_>) -> bool {

@Kobzol Kobzol Jul 14, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please also move test::IntrinsicTest to the very end in get_step_descriptions.

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK.

@xonx4l xonx4l changed the title intrinsic-test: run by default and raise sample-percentage to 100 intrinsic-test: run by default Jul 15, 2026
@rustbot

rustbot commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@xonx4l
xonx4l force-pushed the intrinsic-test-default branch from b0d38e6 to 86af606 Compare July 16, 2026 13:34
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@xonx4l
xonx4l force-pushed the intrinsic-test-default branch from 86af606 to 17eccd1 Compare July 16, 2026 13:47
@rust-log-analyzer

This comment has been minimized.

@xonx4l
xonx4l force-pushed the intrinsic-test-default branch from 17eccd1 to ad29218 Compare July 16, 2026 16:58
@rust-log-analyzer

This comment has been minimized.

pub change_id: Option<ChangeId>,
pub bypass_bootstrap_lock: bool,
pub ccache: Option<String>,
pub sde: Option<PathBuf>,

@Kobzol Kobzol Jul 16, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please also add a Info level entry to change_tracker.rs, notifying users of this new config option, introduced in #159011. Thanks!

View changes since the review

.config
.paths
.iter()
.any(|p| p.to_string_lossy().contains("intrinsic-test"));

@Kobzol Kobzol Jul 16, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think that we can do an exact match, because should_run will be changed to the intrinsic-test alias anyway.

I would also prefer if the build SDE presence and the explicit path checking was moved to make_run, since we already check the targets there.

View changes since the review

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot

rustbot commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Warning

If you are changing how CI LLVM is built or linked, make sure to bump
src/bootstrap/download-ci-llvm-stamp.

cc @jieyouxu

@rustbot rustbot added the A-CI Area: Our Github Actions CI label Jul 19, 2026
@xonx4l

xonx4l commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@Kobzol I'm a bit confused here different CI jobs (x86_64 , aarch64) seem to want different edits to the same snapshot, so blessing for one breaks the other. Could you help point me the right way? Thanks!

@rust-bors

This comment has been minimized.

@Kobzol

Kobzol commented Jul 22, 2026

Copy link
Copy Markdown
Member

Ah, this is annoying, the test machinery on non-x64/aarch64 Linux skips the test altogether, so it changes the diff. And we cannot just easily pin a specific target in tests, because then some of the steps will fail.

Ok, sorry, I will have to revert one of my previous advices. Let's move the check for x64/aarch64 from make_run to run:

fn run(self, builder: &Builder<'_>) {
    let host = self.host;
    if !host.contains("aarch64-unknown-linux") && !host.contains("x86_64-unknown-linux") {
        builder.info(&format!("Skipping intrinsic-test, as it is not available for {host}"));
        return;
    }

You can run the tests locally using ./x test bootstrap.

@xonx4l

xonx4l commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Hmm ok, got it . Thank you!

@xonx4l
xonx4l force-pushed the intrinsic-test-default branch from 77b5bf8 to 235647f Compare July 22, 2026 13:04
@rustbot

rustbot commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@xonx4l

xonx4l commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Ah, this is annoying, the test machinery on non-x64/aarch64 Linux skips the test altogether, so it changes the diff. And we cannot just easily pin a specific target in tests, because then some of the steps will fail.

Ok, sorry, I will have to revert one of my previous advices. Let's move the check for x64/aarch64 from make_run to run:

fn run(self, builder: &Builder<'_>) {
    let host = self.host;
    if !host.contains("aarch64-unknown-linux") && !host.contains("x86_64-unknown-linux") {
        builder.info(&format!("Skipping intrinsic-test, as it is not available for {host}"));
        return;
    }

You can run the tests locally using ./x test bootstrap.

@Kobzol Applied the change and ./x test bootstrap passes locally but --bless produces no snapshot changes at all. Thank you!

@Kobzol

Kobzol commented Jul 22, 2026

Copy link
Copy Markdown
Member

The target check still seems to be in make_run :) (let's push what you have, so I can check)

@rust-log-analyzer

This comment has been minimized.

@Kobzol

Kobzol commented Jul 23, 2026

Copy link
Copy Markdown
Member

Ah, I see what is the issue now. The test step is not represented in the blessed output at all. We are looking at the build step of the IntrinsicTest tool, and that only happens on x64 and aarch64. Let's just skip the whole step in tests. I pushed a fix.

@xonx4l

xonx4l commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

OK, Thank you!

@Kobzol

Kobzol commented Jul 23, 2026

Copy link
Copy Markdown
Member

@bors squash msg="Run intrinsic-test bootstrap step by default"

@rust-bors

This comment has been minimized.

Co-authored-by: Jakub Beránek <berykubik@gmail.com>
@rust-bors

rust-bors Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

🔨 15 commits were squashed into c19d4a0.

@rust-bors
rust-bors Bot force-pushed the intrinsic-test-default branch from 13ce81d to c19d4a0 Compare July 23, 2026 10:41
@Kobzol

Kobzol commented Jul 23, 2026

Copy link
Copy Markdown
Member

Let's try again :)

@bors r+

@rust-bors

rust-bors Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c19d4a0 has been approved by Kobzol

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 23, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 23, 2026
@rust-bors

rust-bors Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: Kobzol
Duration: 3h 16m 33s
Pushing 165cce8 to main...

@rust-bors
rust-bors Bot merged commit 165cce8 into rust-lang:main Jul 23, 2026
14 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 23, 2026
@github-actions

Copy link
Copy Markdown
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 390279b (parent) -> 165cce8 (this PR)

Test differences

Show 4 test diffs

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

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 165cce8d820b229af8f6a8226cf0b910b57600ff --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. x86_64-gnu-llvm-21-2: 1h 3m -> 1h 27m (+37.3%)
  2. i686-msvc-2: 1h 30m -> 2h 4m (+37.0%)
  3. x86_64-gnu-llvm-21-1: 59m 37s -> 38m 1s (-36.2%)
  4. dist-armv7-linux: 1h 32m -> 1h 3m (-30.7%)
  5. x86_64-gnu-aux: 2h 46m -> 1h 58m (-29.0%)
  6. i686-gnu-1: 2h 20m -> 1h 40m (-28.6%)
  7. x86_64-gnu-distcheck: 1h 44m -> 2h 11m (+24.9%)
  8. x86_64-gnu-gcc-core-tests: 10m 56s -> 8m 13s (-24.8%)
  9. dist-powerpc64le-linux-gnu: 1h 14m -> 1h 32m (+24.8%)
  10. dist-various-2: 44m 49s -> 33m 50s (-24.5%)
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
Copy Markdown
Collaborator

Finished benchmarking commit (165cce8): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary 5.1%, secondary 2.8%)

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

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

Cycles

Results (secondary 3.9%)

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)
3.9% [3.5%, 4.3%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 486.724s -> 485.902s (-0.17%)
Artifact size: 387.61 MiB -> 387.66 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants