Skip to content

tests: Run more pauth tests in CI and make them pass - #162228

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
jchlanda:jakub/pac_span_test_fix
Sep 25, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
jchlanda:jakub/pac_span_test_fix

Conversation

@jchlanda

@jchlanda jchlanda commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

View all comments

Some pauth tests have ended up failing since they were not run in CI.
Make them run and make them pass.

This is a follow up to: #161183

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 3, 2026
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 3, 2026
@rustbot

rustbot commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

r? @Enselic

rustbot has assigned @Enselic.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 21 candidates

@jchlanda
jchlanda force-pushed the jakub/pac_span_test_fix branch from 3dd50a5 to f9688a6 Compare September 3, 2026 10:26
@Enselic

Enselic commented Sep 3, 2026

Copy link
Copy Markdown
Member

How come we don't run these tests in CI? Have that been discussed somewhere before?

@jchlanda

jchlanda commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

How come we don't run these tests in CI? Have that been discussed somewhere before?

No, not discussed yet.

This looks like a bug on my part. Early on when we worked on run-make tests I've added ignore-pauthtest and only-pauthtest. This made sense, since aarch64-unknown-linux-pauthtest requires pointer-authentication-enabled sysroot based on a custom Musl toolchain (not provided by CI). Somehow those directives (mostly only) crept into all the tests.

Let me have a once over for all the tests and see what the CI has to say.

In the meantime I'll turn it to a WIP PR.

@rust-log-analyzer

This comment has been minimized.

@jchlanda
jchlanda force-pushed the jakub/pac_span_test_fix branch from 3ce0220 to 4e177fe Compare September 7, 2026 13:55
@rust-log-analyzer

This comment has been minimized.

@jchlanda
jchlanda force-pushed the jakub/pac_span_test_fix branch from 4e177fe to cd25ff9 Compare September 7, 2026 14:47
@jchlanda

jchlanda commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

How come we don't run these tests in CI? Have that been discussed somewhere before?

@Enselic this is now ready for review. I've gone over the uses of ignore|only-pauthtest and only keept the directives where they were strictly needed.

I can see the test executing (and passing) in the CI:

Comment thread tests/codegen-llvm/pauth/pauth-attr-cli-flags.rs Outdated
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 17, 2026
@rustbot

rustbot commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@jchlanda
jchlanda force-pushed the jakub/pac_span_test_fix branch from cd25ff9 to 63a674d Compare September 17, 2026 06:29

@Enselic Enselic 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.

I think the changes themselves look reasonable now, but I'd like us to adjust the commit title and PR title.

A commit title shall make sense on its own, so "the test" is a bit too vague. What do you think of having a commit and PR title like the following?:

tests: Run more pauth tests in CI and make them pass

And as PR and commit description we can have something like:

Some pauth tests have ended up failing since they were not run in CI.
Make them run and make them pass.

I'd say it is also overly separated to have two commits. Are you OK with putting it all in one commit?

View changes since this review

Comment thread tests/ui/statics/crt-static-pauthtest.rs Outdated
@jchlanda

Copy link
Copy Markdown
Contributor Author

Some pauth tests have ended up failing since they were not run in CI.
Make them run and make them pass.

Yes to both, thank you for the suggestion. Squashed commits to just one.

@jchlanda
jchlanda force-pushed the jakub/pac_span_test_fix branch from 63a674d to 03f9117 Compare September 18, 2026 08:56
@jchlanda jchlanda changed the title Update the test not to expect a span in mixed -Zpointer-authentication tests: Run more pauth tests in CI and make them pass Sep 18, 2026
@jchlanda

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 18, 2026

@Enselic Enselic 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.

This looks good to me now, thanks.

Since the tests will now run in a broader set of circumstances it is reasonable to expect some failures when the full CI test suite is run. Therefore I am marking this as rollup=iffy.

@bors r+ rollup=iffy

View changes since this review

@rust-bors

rust-bors Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 03f9117 has been approved by Enselic

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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 19, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Sep 19, 2026
…r=Enselic

tests: Run more pauth tests in CI and make them pass

Some pauth tests have ended up failing since they were not run in CI.
Make them run and make them pass.

This is a follow up to: rust-lang#161183
Comment thread tests/auxiliary/minicore.rs Outdated
type Output = i32;

fn add(self, other: i32) -> i32 {
7

@Enselic Enselic Sep 23, 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.

Looks like my local LLVM (top of the tree) was able to perform tail call optimization for this test, while CI's (21?) was not.

That's because the particular CI job that fails runs tests without optimizations:

I suggest we do the same thing as many other tests in ./tests/assembly-llvm and set an explicit and fixed -Copt-level to keep emitted assembly fixed. That way we don't have to make strange (on first glance) changes to minicore.

View changes since the review

@jchlanda jchlanda Sep 23, 2026 •

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.

Right, thank you for the clarification.

I've set the optimisation level and reverted the minicore changes, in favour of using, already defined, Neg.
Kept the uses of function calls as the generated code shows more pointer authentication instructions (pacibsp, retab).

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 23, 2026
@jchlanda
jchlanda force-pushed the jakub/pac_span_test_fix branch from ab9f9a2 to d91db79 Compare September 23, 2026 07:08
@rust-log-analyzer

This comment has been minimized.

@jchlanda
jchlanda force-pushed the jakub/pac_span_test_fix branch from d91db79 to 9528bf9 Compare September 23, 2026 07:31
@jchlanda
jchlanda requested a review from Enselic September 23, 2026 08:28
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 23, 2026
Comment thread tests/assembly-llvm/pauth-basic.rs Outdated
// CHECK: mov x0, [[FN_REG]]
// CHECK: b call_through
// CHECK: pacibsp
// CHECK: adrp [[GOT_REG:x[0-9]+]], :got:c_func

@Enselic Enselic Sep 23, 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 don't feel qualified to review emitted aarch64 assembly (or at least it is a significant effort for me), so may I please ask you to change the emitted assembly in a separate PR and only add the opt-level line to my previously approved commit (in the same, single commit)?

It would be nice to get this CI improvement merged before iterating a change on one specific test.

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.

That's fair. Reverted to just the opt level change.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 23, 2026
@jchlanda
jchlanda force-pushed the jakub/pac_span_test_fix branch from 9528bf9 to 8a32403 Compare September 24, 2026 12:04
Some pauth tests have ended up failing since they were not run in CI.
Make them run and make them pass.
@jchlanda
jchlanda force-pushed the jakub/pac_span_test_fix branch from 8a32403 to 96b181c Compare September 24, 2026 12:07
@jchlanda
jchlanda requested a review from Enselic September 24, 2026 12:07
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 24, 2026

@Enselic Enselic 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.

Thanks.

Marking as rollup=iffy again with same motivation as last time.

@bors r+ rollup=iffy

View changes since this review

@rust-bors

rust-bors Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 96b181c has been approved by Enselic

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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 24, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Sep 24, 2026
…r=Enselic

tests: Run more pauth tests in CI and make them pass

Some pauth tests have ended up failing since they were not run in CI.
Make them run and make them pass.

This is a follow up to: rust-lang#161183
rust-bors Bot pushed a commit that referenced this pull request Sep 25, 2026
Rollup of 9 pull requests

Successful merges:

 - #162228 (tests: Run more pauth tests in CI and make them pass)
 - #162493 (Add support for -Zsanitizer-cfi-minimal-runtime)
 - #163271 (add a leak check test)
 - #163282 (cleanup: clean up more dependencies that are unused)
 - #157562 (Avoid computing layout of enums with non-int discriminants)
 - #162275 (Do not increase recursion depth for coroutine witness and rigid opaques when proving auto traits)
 - #163037 (fix and test `va_arg` on `f128` on `x86`)
 - #163114 (Add regression test for hang on mutually recursive trait impls)
 - #163255 (Check the entire library and cg_clif workspaces for permitted deps in tidy)
rust-bors Bot pushed a commit that referenced this pull request Sep 25, 2026
Rollup of 8 pull requests

Successful merges:

 - #162228 (tests: Run more pauth tests in CI and make them pass)
 - #163271 (add a leak check test)
 - #163282 (cleanup: clean up more dependencies that are unused)
 - #157562 (Avoid computing layout of enums with non-int discriminants)
 - #162275 (Do not increase recursion depth for coroutine witness and rigid opaques when proving auto traits)
 - #163037 (fix and test `va_arg` on `f128` on `x86`)
 - #163114 (Add regression test for hang on mutually recursive trait impls)
 - #163255 (Check the entire library and cg_clif workspaces for permitted deps in tidy)
@rust-bors
rust-bors Bot merged commit f43cc4d into rust-lang:main Sep 25, 2026
13 checks passed
rust-bors Bot pushed a commit that referenced this pull request Sep 25, 2026
Rollup merge of #162228 - jchlanda:jakub/pac_span_test_fix, r=Enselic

tests: Run more pauth tests in CI and make them pass

Some pauth tests have ended up failing since they were not run in CI.
Make them run and make them pass.

This is a follow up to: #161183
@rustbot rustbot added this to the 1.100.0 milestone Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

5 participants