Skip to content

Conversation

fmease
Copy link
Member

@fmease fmease commented Sep 24, 2025

Fixes #146977.

r? bjorn3 or reassign

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 24, 2025
.expected_file("short-error.txt")
.actual_text("(linker error)", out.stderr())
.normalize(r#"/rustc[^/_-]*/"#, "/rustc/")
.normalize(r#"^/rustc[^/_-]*/"#, "/rustc/")
Copy link
Member Author

@fmease fmease Sep 24, 2025

Choose a reason for hiding this comment

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

For me locally, the test as a whole passes just fine if I remove this normalization step altogether but I guess there are some environments where there's a rustcXXX (tempdir?) in the (fake?) rootdir?

Or is the current change of prepending ^ as suggested in #146977 (comment) actually wrong as it makes this normalization step effectively unreachable?

Copy link
Member

@bjorn3 bjorn3 Sep 24, 2025

Choose a reason for hiding this comment

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

Right, that was what this was supposed to normalize. I was thinking about the /rustc/<commit>/ for source files, but those wouldn't have matched anyway. So yeah, my suggestion will probably break something.

Copy link
Member Author

@fmease fmease Sep 25, 2025

Choose a reason for hiding this comment

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

Okay, so I've now completely removed that normalization step because short-error.txt doesn't contain any occurrence of /rustc/ so I'm led to believe that it never fired anyway (except on my machine) since the subsequent normalizations didn't depend on the ↦/rustc/ normalization I think (so the lack of /rustc/ in the golden file should really mean "never fired").

Does that make sense to you or am I misunderstanding something? In which environments or circumstances would it be possible for rustc to pass a /rustc/<commit>/ path to the linker (but even if it did that the test would fail I believe)? Anything I could test via a try job?

Copy link
Member

Choose a reason for hiding this comment

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

I think the .normalize(r#""[^"]*\/symbols.o""#, "\"/symbols.o\"").normalize(r#""[^"]*\/raw-dylibs""#, "\"/raw-dylibs\"") below made the tempdir normalization obsolete.

@fmease

This comment was marked as outdated.

rust-bors bot added a commit that referenced this pull request Sep 24, 2025
Make normalization step in `tests/run-make/linker-warning` more robust

try-job: test-various
@rust-bors

This comment has been minimized.

@fmease

This comment was marked as outdated.

@rust-bors

This comment was marked as outdated.

@fmease
Copy link
Member Author

fmease commented Sep 24, 2025

Okay I hope that this one is a suitable try job (host x86_64-unknown-linux-gnu to trigger the branch in the run-make test + executing tests).

@bors try jobs=x86_64-gnu

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 24, 2025
Make normalization step in `tests/run-make/linker-warning` more robust

try-job: x86_64-gnu
@rust-bors
Copy link

rust-bors bot commented Sep 24, 2025

☀️ Try build successful (CI)
Build commit: 9a4d5b3 (9a4d5b3dbb962bfda60013a56aeb82983860bba1, parent: e9385f9eea0221ef295a188d49d16f8f5189abf1)

@fmease fmease force-pushed the fix-rmake-linker-warning branch from 404d8ee to bc37dd4 Compare September 25, 2025 04:30
@fmease fmease changed the title Make normalization step in tests/run-make/linker-warning more robust Remove erroneous normalization step in tests/run-make/linker-warning more robust Sep 25, 2025
@fmease fmease changed the title Remove erroneous normalization step in tests/run-make/linker-warning more robust Remove erroneous normalization step in tests/run-make/linker-warning Sep 25, 2025
@bjorn3
Copy link
Member

bjorn3 commented Sep 25, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 25, 2025

📌 Commit bc37dd4 has been approved by bjorn3

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 Sep 25, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 25, 2025
…=bjorn3

Remove erroneous normalization step in `tests/run-make/linker-warning`

Fixes rust-lang#146977.

r? bjorn3 or reassign
bors added a commit that referenced this pull request Sep 25, 2025
Rollup of 14 pull requests

Successful merges:

 - #145067 (RawVecInner: add missing `unsafe` to unsafe fns)
 - #145277 (Do not materialise X in [X; 0] when X is unsizing a const)
 - #145973 (Add `std` support for `armv7a-vex-v5`)
 - #146667 (Add an attribute to check the number of lanes in a SIMD vector after monomorphization)
 - #146735 (unstably constify float mul_add methods)
 - #146737 (f16_f128: enable some more tests in Miri)
 - #146766 (Add attributes for #[global_allocator] functions)
 - #146905 (llvm: update remarks support on LLVM 22)
 - #146982 (Remove erroneous normalization step in `tests/run-make/linker-warning`)
 - #147005 (Small string formatting cleanup)
 - #147007 (Explicitly note `&[SocketAddr]` impl of `ToSocketAddrs`)
 - #147008 (bootstrap.py: Respect build.jobs while building bootstrap tool)
 - #147013 (rustdoc: Fix documentation for `--doctest-build-arg`)
 - #147015 (Use `LLVMDisposeTargetMachine`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 231002f into rust-lang:master Sep 25, 2025
10 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Sep 25, 2025
rust-timer added a commit that referenced this pull request Sep 25, 2025
Rollup merge of #146982 - fmease:fix-rmake-linker-warning, r=bjorn3

Remove erroneous normalization step in `tests/run-make/linker-warning`

Fixes #146977.

r? bjorn3 or reassign
@fmease fmease deleted the fix-rmake-linker-warning branch September 25, 2025 17:28
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Sep 26, 2025
Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#145067 (RawVecInner: add missing `unsafe` to unsafe fns)
 - rust-lang/rust#145277 (Do not materialise X in [X; 0] when X is unsizing a const)
 - rust-lang/rust#145973 (Add `std` support for `armv7a-vex-v5`)
 - rust-lang/rust#146667 (Add an attribute to check the number of lanes in a SIMD vector after monomorphization)
 - rust-lang/rust#146735 (unstably constify float mul_add methods)
 - rust-lang/rust#146737 (f16_f128: enable some more tests in Miri)
 - rust-lang/rust#146766 (Add attributes for #[global_allocator] functions)
 - rust-lang/rust#146905 (llvm: update remarks support on LLVM 22)
 - rust-lang/rust#146982 (Remove erroneous normalization step in `tests/run-make/linker-warning`)
 - rust-lang/rust#147005 (Small string formatting cleanup)
 - rust-lang/rust#147007 (Explicitly note `&[SocketAddr]` impl of `ToSocketAddrs`)
 - rust-lang/rust#147008 (bootstrap.py: Respect build.jobs while building bootstrap tool)
 - rust-lang/rust#147013 (rustdoc: Fix documentation for `--doctest-build-arg`)
 - rust-lang/rust#147015 (Use `LLVMDisposeTargetMachine`)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

Run-make test tests/run-make/linker-warning/ fails for me locally
4 participants