Fixup and re-enable many tests for NVPTX#157512
Conversation
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
|
Nice find. I'm very busy till June 12th, but happy to check then if you don't mind waiting a bit, otherwise please feel free to reroll. |
f1256f5 to
ceea353
Compare
|
re |
|
|
This comment has been minimized.
This comment has been minimized.
Not sure about that, since My intention was to have an I've rebased on top of the current main branch, added |
This comment has been minimized.
This comment has been minimized.
|
Thanks, the new name and note in the docs imho give a much better explanation of the change. @bors try jobs=test-various otherwise lgtm. |
This comment has been minimized.
This comment has been minimized.
Fixup and re-enable many tests for NVPTX try-job: test-various
|
💔 Test for cfc5c92 failed: CI. Failed job:
|
This comment has been minimized.
This comment has been minimized.
|
Hm, interesting. Anyway, it made me look deeper into how our test infrastructure works. I was tempted to simply not restrict which test-suites are run in CI targeting This leaves us with the current approach, but we probably should document it properly:
|
If the linker supports to emit assembly as the final artifact, this `assembly-output` directive can be used. This allows assembly tests to also check the emitted assembly after linking. The NVPTX target is the primary use case as this target only emits assembly as its final artifact.
The `ptx-linker` is no longer used, but wasn't removed from the rustc-dev-guide yet.
|
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. |
|
I created #159059 for the linker issue. This will allow us to stick to cross-build tests for NVPTX for all test-suites. I also modified this PR a little:
Since |
This comment has been minimized.
This comment has been minimized.
a6e3c49 to
c26da7e
Compare
A lot of tests for NVPTX were previously disabled. They were configured as `only-nvptx` and `ignore-nvptx` at the same time, so they did not run at all. they even did not succeed, even when forced to run. Fixup and re-enable those tests to pass the test suite. Add minicore, where needed.
Document that `only-X` directives can accidentally make tests unreachable in CI when no CI job runs the corresponding test suite with matching conditions. Also add guidance for target-specific tests: for targets that are not used as hosts in CI, prefer cross-building the test to that target instead of making the whole test `only-X` for that target.
|
☔ The latest upstream changes (presumably #159579) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
…rcote Fix debuginfo argument when invoking LLBC linker Previously LLBC's Linker implementation unconditionally added `--debug` to the linker invocation. This just became visible when 062ecd6 made LLBC no longer strip debug information unconditionally. It is also common to use `cargo build --release` together with `-Zbuild-std=core` when targeting NVPTX. In this case the release profile will prevent all crates from embedding debug information in the first place. This additionally made the bug less visible. This PR adds the proper logic to LLBC's linker implementation to only invoke LLBC with `--debug` when debug-information should not be stripped. I did not add a regression test yet, since this would require to actually invoke the linker in `assembly-llvm`. As soon as rust-lang#157512 is merged and we have `assembly-output: linker-asm` available, I want to follow up on that. cc: @kjetilkjeka @rustbot label +O-NVPTX
…rcote Fix debuginfo argument when invoking LLBC linker Previously LLBC's Linker implementation unconditionally added `--debug` to the linker invocation. This just became visible when 062ecd6 made LLBC no longer strip debug information unconditionally. It is also common to use `cargo build --release` together with `-Zbuild-std=core` when targeting NVPTX. In this case the release profile will prevent all crates from embedding debug information in the first place. This additionally made the bug less visible. This PR adds the proper logic to LLBC's linker implementation to only invoke LLBC with `--debug` when debug-information should not be stripped. I did not add a regression test yet, since this would require to actually invoke the linker in `assembly-llvm`. As soon as rust-lang#157512 is merged and we have `assembly-output: linker-asm` available, I want to follow up on that. cc: @kjetilkjeka @rustbot label +O-NVPTX
…rcote Fix debuginfo argument when invoking LLBC linker Previously LLBC's Linker implementation unconditionally added `--debug` to the linker invocation. This just became visible when 062ecd6 made LLBC no longer strip debug information unconditionally. It is also common to use `cargo build --release` together with `-Zbuild-std=core` when targeting NVPTX. In this case the release profile will prevent all crates from embedding debug information in the first place. This additionally made the bug less visible. This PR adds the proper logic to LLBC's linker implementation to only invoke LLBC with `--debug` when debug-information should not be stripped. I did not add a regression test yet, since this would require to actually invoke the linker in `assembly-llvm`. As soon as rust-lang#157512 is merged and we have `assembly-output: linker-asm` available, I want to follow up on that. cc: @kjetilkjeka @rustbot label +O-NVPTX
…rcote Fix debuginfo argument when invoking LLBC linker Previously LLBC's Linker implementation unconditionally added `--debug` to the linker invocation. This just became visible when 062ecd6 made LLBC no longer strip debug information unconditionally. It is also common to use `cargo build --release` together with `-Zbuild-std=core` when targeting NVPTX. In this case the release profile will prevent all crates from embedding debug information in the first place. This additionally made the bug less visible. This PR adds the proper logic to LLBC's linker implementation to only invoke LLBC with `--debug` when debug-information should not be stripped. I did not add a regression test yet, since this would require to actually invoke the linker in `assembly-llvm`. As soon as rust-lang#157512 is merged and we have `assembly-output: linker-asm` available, I want to follow up on that. cc: @kjetilkjeka @rustbot label +O-NVPTX
Rollup merge of #159211 - kulst:llbc-fix-debuginfo, r=nnethercote Fix debuginfo argument when invoking LLBC linker Previously LLBC's Linker implementation unconditionally added `--debug` to the linker invocation. This just became visible when 062ecd6 made LLBC no longer strip debug information unconditionally. It is also common to use `cargo build --release` together with `-Zbuild-std=core` when targeting NVPTX. In this case the release profile will prevent all crates from embedding debug information in the first place. This additionally made the bug less visible. This PR adds the proper logic to LLBC's linker implementation to only invoke LLBC with `--debug` when debug-information should not be stripped. I did not add a regression test yet, since this would require to actually invoke the linker in `assembly-llvm`. As soon as #157512 is merged and we have `assembly-output: linker-asm` available, I want to follow up on that. cc: @kjetilkjeka @rustbot label +O-NVPTX
Fix debuginfo argument when invoking LLBC linker Previously LLBC's Linker implementation unconditionally added `--debug` to the linker invocation. This just became visible when 062ecd6 made LLBC no longer strip debug information unconditionally. It is also common to use `cargo build --release` together with `-Zbuild-std=core` when targeting NVPTX. In this case the release profile will prevent all crates from embedding debug information in the first place. This additionally made the bug less visible. This PR adds the proper logic to LLBC's linker implementation to only invoke LLBC with `--debug` when debug-information should not be stripped. I did not add a regression test yet, since this would require to actually invoke the linker in `assembly-llvm`. As soon as rust-lang/rust#157512 is merged and we have `assembly-output: linker-asm` available, I want to follow up on that. cc: @kjetilkjeka @rustbot label +O-NVPTX
While working with NVPTX, I found that many of its tests are currently disabled. They are configured as
only-nvptx64andignore-nvptx64at the same time, so they did not run at all. (For tests-suites not running in CI for NVPTXonly-nvptx64alone is sufficient to prevent a test from running)Some of the tests also failed when I forced them to run.
I would like to improve the test coverage for NVPTX with this PR as a starting point. It
linker-asmas anassembly-outputdirective for linkers that emit assembly by default (likellbc) or which can be explicitly instructed to do so.This PR also adds to the rustc-dev-guide best-practices for target-specific tests and a warning mentioning the interactions of
only-Xdirectives with our CI.cc: @kjetilkjeka
@rustbot label +O-NVPTX
r? @ZuseZ4