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

When comparing SVG tests against their blessed version, ignore the first line #122779

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

estebank
Copy link
Contributor

anstyle_svg has some weird non-determinism in the width parameter, which makes tests blessed in one environment to fail in another. This is the only non-determinism detected so far, so we modify the diff check to ignore the first line of the SVG. In order for a test to fail/be updated by --bless, a different part of the file needs to also have changed. If other sources of non-determinism are found, we should back out of the "--color=always means .svg" change.

r? @compiler-errors

@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 Mar 20, 2024
@rustbot
Copy link
Collaborator

rustbot commented Mar 20, 2024

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@estebank
Copy link
Contributor Author

Context #122029 (comment)

…rst line

`anstyle_svg` has some weird non-determinism in the width parameter, which makes tests blessed in one environment to fail in another. This is the *only* non-determinism detected so far, so we modify the diff check to ignore the first line of the SVG. In order for a test to fail/be updated by `--bless`, a different part of the file needs to also have changed.
Copy link
Member

@lqd lqd left a comment

Choose a reason for hiding this comment

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

I can reproduce the failure and this does fix it 👍

@compiler-errors
Copy link
Member

@bors r+ rollup p=1

@bors
Copy link
Contributor

bors commented Mar 20, 2024

📌 Commit bf63f7e has been approved by compiler-errors

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 Mar 20, 2024
@klensy
Copy link
Contributor

klensy commented Mar 20, 2024

I can reproduce the failure and this does fix it 👍

what command?
python x.py --stage=1 --jobs=4 t tests/ui/codemap_tests --force-rerun can't repro on x86_64-pc-windows-msvc

ahh ignore-windows
But on windows still can't catch 750\751 px difference, only color diff.

@bors
Copy link
Contributor

bors commented Mar 20, 2024

⌛ Testing commit bf63f7e with merge e3df96c...

@lqd
Copy link
Member

lqd commented Mar 20, 2024

what command?

A simple ./x test tests/ui/codemap_tests --force-rerun on my x86_64-unknown-linux-gnu.

@estebank
Copy link
Contributor Author

ahh ignore-windows
But on windows still can't catch 750\751 px difference, only color diff.

The distinction is made because on windows we produce different colors than on all other platforms (cyan instead of light blue), which would require everyone that works with ui tests to have access to both a linux/mac and windows, in perpetuity.

@bors
Copy link
Contributor

bors commented Mar 20, 2024

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing e3df96c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 20, 2024
@bors bors merged commit e3df96c into rust-lang:master Mar 20, 2024
12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Mar 20, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e3df96c): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

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

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)
- - 0
Regressions ❌
(secondary)
6.7% [6.6%, 6.9%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 669.176s -> 669.218s (0.01%)
Artifact size: 312.73 MiB -> 312.87 MiB (0.05%)

@klensy
Copy link
Contributor

klensy commented Mar 21, 2024

what command?

A simple ./x test tests/ui/codemap_tests --force-rerun on my x86_64-unknown-linux-gnu.

Still all ok, strange.

@estebank estebank added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. stable-nominated Nominated for backporting to the compiler in the stable channel. labels May 13, 2024
@estebank
Copy link
Contributor Author

At work we noticed that this fix didn't make it into 1.78, which makes the .svg tests fail non-deterministically. If we do a dot-release, we should include this PR.

@apiraino
Copy link
Contributor

Stable backport accepted (if a dot release will be planned) as per compiler team on Zulip. A backport PR will be authored by the release team at the end of the current development cycle.

@rustbot label +stable-accepted

@rustbot rustbot added the stable-accepted Accepted for backporting to the compiler in the stable channel. label May 16, 2024
@apiraino apiraino removed the P-critical Critical priority label May 16, 2024
@cuviper cuviper removed stable-nominated Nominated for backporting to the compiler in the stable channel. stable-accepted Accepted for backporting to the compiler in the stable channel. labels Jun 21, 2024
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.

9 participants