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

Actually abort in -Zpanic-abort-tests #120326

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Conversation

tmandry
Copy link
Member

@tmandry tmandry commented Jan 25, 2024

When a test fails in panic=abort, it can be useful to have a debugger or other tooling hook into the abort() call for debugging. Doing this some other way would require it to hard code details of Rust's panic machinery.

There's no reason we couldn't have done this in the first place; using a single exit code for "success" or "failed" was just simpler. Now we are aware of the special exit codes for posix and windows platforms, logging a special error if an unrecognized code is used on those platforms, and falling back to just "failure" on other platforms.

This continues to account for #[should_panic] inside the test process itself, so there's no risk of misinterpreting a random call to abort() as an expected panic. Any exit code besides TR_OK is logged as a test failure.

As an added benefit, this would allow us to support panic=immediate_abort (but not #[should_panic]), without noise about unexpected exit codes when a test fails.

@rustbot
Copy link
Collaborator

rustbot commented Jan 25, 2024

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 25, 2024
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jan 25, 2024
@tmandry
Copy link
Member Author

tmandry commented Jan 25, 2024

Testing windows support..

@bors try

@tmandry tmandry removed A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jan 25, 2024
@tmandry
Copy link
Member Author

tmandry commented Jan 25, 2024

r? libs

@rustbot rustbot assigned cuviper and unassigned Mark-Simulacrum Jan 25, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 25, 2024
Actually abort in panic-abort-tests

When a test fails in panic=abort, it can be useful to have a debugger or other tooling hook into the `abort()` call for debugging.

There's no reason we couldn't have done this in the first place; using a single exit code for "success" or "failed" was just simpler. Now we are aware of the special exit codes for posix and windows platforms, logging a special error if an unrecognized code is used on those platforms, and falling back to just "failure" on other platforms.

This continues to account for `#[should_panic]` inside the test process itself, so there's no risk of misinterpreting a random call to `abort()` as an expected panic. Any exit code besides `TR_OK` is logged as a test failure.
@bors
Copy link
Contributor

bors commented Jan 25, 2024

⌛ Trying commit bb332f3 with merge 11f3f41...

@tmandry tmandry changed the title Actually abort in panic-abort-tests Actually abort in -Zpanic-abort-tests Jan 25, 2024
@tmandry tmandry added the A-libtest Area: `#[test]` / the `test` library label Jan 25, 2024
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jan 25, 2024

💔 Test failed - checks-actions

@bors bors 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 Jan 25, 2024
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jan 26, 2024
@tmandry
Copy link
Member Author

tmandry commented Jan 26, 2024

@bors try

@bors
Copy link
Contributor

bors commented Jan 26, 2024

⌛ Trying commit 9610404 with merge 765d6e6...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 26, 2024
Actually abort in -Zpanic-abort-tests

When a test fails in panic=abort, it can be useful to have a debugger or other tooling hook into the `abort()` call for debugging. Doing this some other way would require it to hard code details of Rust's panic machinery.

There's no reason we couldn't have done this in the first place; using a single exit code for "success" or "failed" was just simpler. Now we are aware of the special exit codes for posix and windows platforms, logging a special error if an unrecognized code is used on those platforms, and falling back to just "failure" on other platforms.

This continues to account for `#[should_panic]` inside the test process itself, so there's no risk of misinterpreting a random call to `abort()` as an expected panic. Any exit code besides `TR_OK` is logged as a test failure.

As an added benefit, this would allow us to support panic=immediate_abort (but not `#[should_panic]`), without noise about unexpected exit codes when a test fails.
@bors
Copy link
Contributor

bors commented Jan 26, 2024

☀️ Try build successful - checks-actions
Build commit: 765d6e6 (765d6e6ebd889c8e1783ca96400086e9a96b2bc1)

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 6, 2024
@bors
Copy link
Contributor

bors commented Feb 6, 2024

⌛ Testing commit 48f664b with merge ff95e52...

@bors
Copy link
Contributor

bors commented Feb 6, 2024

☀️ Test successful - checks-actions
Approved by: cuviper
Pushing ff95e52 to master...

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

Finished benchmarking commit (ff95e52): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

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

Cycles

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

Binary size

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

Bootstrap: 662.71s -> 662.079s (-0.10%)
Artifact size: 308.15 MiB -> 308.06 MiB (-0.03%)

@tmandry tmandry deleted the abort-in-tests branch February 6, 2024 19:49
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 24, 2024
Update Android in CI

We are currently using a 10+ year old Android image, and it has caused trouble when working on rust-lang#120326.

Our current NDK (25) only supports API 19+, so we were already out of spec. This PR:

1. Bumps the API used by the emulator in CI to 21, as per [NDK-26's release notes](https://github.com/android/ndk/wiki/Changelog-r26) deprecating 19 and 20 as targets.
2. Activates aarch64 testing on the emulator, since the base image is now a 64-bit image.
3. Bumps the NDK to 26b
maurer added a commit to maurer/rust that referenced this pull request Mar 24, 2024
We were running testing on API 18, which was already out of support for
NDK 25, and some of the ancient behavior in that image was causing
trouble when developing `rustc` features (rust-lang#120326).

We'll be updating to NDK 26 (latest LTS) shortly, so rather than
updating to API 19, then again to API 21 in a bit, just jump straight
to 21.

Fixes: rust-lang#120567
maurer added a commit to maurer/rust that referenced this pull request Mar 24, 2024
In updating our image in rust-lang#120326 we were forced off the 32-bit image.
This means it is not too difficult to add testing for 64-bit code as
well. Since this architecture is more used, and on later images, the
only supported kind of executable, we should start testing this now.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 24, 2024
…um,workingjubilee

Update Android in CI

We are currently using a 10+ year old Android image, and it has caused trouble when working on rust-lang#120326.

Our current NDK (25) only supports API 19+, so we were already out of spec. This PR:

1. Bumps the API used by the emulator in CI to 21, as per [NDK-26's release notes](https://github.com/android/ndk/wiki/Changelog-r26) deprecating 19 and 20 as targets.
2. Activates aarch64 testing on the emulator, since the base image is now a 64-bit image.
3. Bumps the NDK to 26b
maurer added a commit to maurer/rust that referenced this pull request May 7, 2024
We were running testing on API 18, which was already out of support for
NDK 25, and some of the ancient behavior in that image was causing
trouble when developing `rustc` features (rust-lang#120326).

Update to the current LTS NDK 26, and to its minimum supported API 21.

Fixes: rust-lang#120567
maurer added a commit to maurer/rust that referenced this pull request May 18, 2024
We were running testing on API 18, which was already out of support for
NDK 25, and some of the ancient behavior in that image was causing
trouble when developing `rustc` features (rust-lang#120326).

Update to the current LTS NDK 26, and to its minimum supported API 21.

Fixes: rust-lang#120567
bors added a commit to rust-lang-ci/rust that referenced this pull request May 19, 2024
Update Android in CI

We are currently using a 10+ year old Android image, and it has caused trouble when working on rust-lang#120326.

Our current NDK (25) only supports API 19+, so we were already out of spec. This PR:

1. Bumps the API used by the emulator in CI to 21, as per [NDK-26's release notes](https://github.com/android/ndk/wiki/Changelog-r26) deprecating 19 and 20 as targets.
2. Activates aarch64 testing on the emulator, since the base image is now a 64-bit image.
3. Bumps the NDK to 26b
bors added a commit to rust-lang-ci/rust that referenced this pull request May 20, 2024
Update Android in CI

We are currently using a 10+ year old Android image, and it has caused trouble when working on rust-lang#120326.

Our current NDK (25) only supports API 19+, so we were already out of spec. This PR:

1. Bumps the API used by the emulator in CI to 21, as per [NDK-26's release notes](https://github.com/android/ndk/wiki/Changelog-r26) deprecating 19 and 20 as targets.
2. Activates aarch64 testing on the emulator, since the base image is now a 64-bit image.
3. Bumps the NDK to 26b
maurer added a commit to maurer/rust that referenced this pull request Jul 10, 2024
We were running testing on API 18, which was already out of support for
NDK 25, and some of the ancient behavior in that image was causing
trouble when developing `rustc` features (rust-lang#120326).

Update to the current LTS NDK 26, and to its minimum supported API 21.

Fixes: rust-lang#120567
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 11, 2024
Update Android in CI

We are currently using a 10+ year old Android image, and it has caused trouble when working on rust-lang#120326.

Our current NDK (25) only supports API 19+, so we were already out of spec. This PR:

1. Bumps the API used by the emulator in CI to 21, as per [NDK-26's release notes](https://github.com/android/ndk/wiki/Changelog-r26) deprecating 19 and 20 as targets.
2. Activates aarch64 testing on the emulator, since the base image is now a 64-bit image.
3. Bumps the NDK to 26b

try-job: arm-android
try-job: aarch64-android
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 11, 2024
Update Android in CI

We are currently using a 10+ year old Android image, and it has caused trouble when working on rust-lang#120326.

Our current NDK (25) only supports API 19+, so we were already out of spec. This PR:

1. Bumps the API used by the emulator in CI to 21, as per [NDK-26's release notes](https://github.com/android/ndk/wiki/Changelog-r26) deprecating 19 and 20 as targets.
2. Activates aarch64 testing on the emulator, since the base image is now a 64-bit image.
3. Bumps the NDK to 26b

try-job: arm-android
try-job: aarch64-android
maurer added a commit to maurer/rust that referenced this pull request Jul 18, 2024
We were running testing on API 18, which was already out of support for
NDK 25, and some of the ancient behavior in that image was causing
trouble when developing `rustc` features (rust-lang#120326).

Update to the current LTS NDK 26, and to its minimum supported API 21.

Fixes: rust-lang#120567
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 19, 2024
Update Android in CI

We are currently using a 10+ year old Android image, and it has caused trouble when working on rust-lang#120326.

Our current NDK (25) only supports API 19+, so we were already out of spec. This PR:

1. Bumps the API used by the emulator in CI to 21, as per [NDK-26's release notes](https://github.com/android/ndk/wiki/Changelog-r26) deprecating 19 and 20 as targets.
2. Activates aarch64 testing on the emulator, since the base image is now a 64-bit image.
3. Bumps the NDK to 26b

try-job: arm-android
try-job: aarch64-android
maurer added a commit to maurer/rust that referenced this pull request Jul 19, 2024
We were running testing on API 18, which was already out of support for
NDK 25, and some of the ancient behavior in that image was causing
trouble when developing `rustc` features (rust-lang#120326).

Update to the current LTS NDK 26, and to its minimum supported API 21.

Fixes: rust-lang#120567
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 20, 2024
Update Android in CI

We are currently using a 10+ year old Android image, and it has caused trouble when working on rust-lang#120326.

Our current NDK (25) only supports API 19+, so we were already out of spec. This PR:

1. Bumps the API used by the emulator in CI to 21, as per [NDK-26's release notes](https://github.com/android/ndk/wiki/Changelog-r26) deprecating 19 and 20 as targets.
2. Activates aarch64 testing on the emulator, since the base image is now a 64-bit image.
3. Bumps the NDK to 26b

try-job: arm-android
try-job: aarch64-android
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 22, 2024
…m,workingjubilee

Update Android in CI

We are currently using a 10+ year old Android image, and it has caused trouble when working on rust-lang#120326.

Our current NDK (25) only supports API 19+, so we were already out of spec. This PR:

1. Bumps the API used by the emulator in CI to 21, as per [NDK-26's release notes](https://github.com/android/ndk/wiki/Changelog-r26) deprecating 19 and 20 as targets.
2. Activates aarch64 testing on the emulator, since the base image is now a 64-bit image.
3. Bumps the NDK to 26b

try-job: arm-android
try-job: aarch64-android
maurer added a commit to maurer/rust that referenced this pull request Jul 25, 2024
We were running testing on API 18, which was already out of support for
NDK 25, and some of the ancient behavior in that image was causing
trouble when developing `rustc` features (rust-lang#120326).

Update to the current LTS NDK 26, and to its minimum supported API 21.

Fixes: rust-lang#120567
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2024
Update Android in CI

We are currently using a 10+ year old Android image, and it has caused trouble when working on rust-lang#120326.

Our current NDK (25) only supports API 19+, so we were already out of spec. This PR:

1. Bumps the API used by the emulator in CI to 21, as per [NDK-26's release notes](https://github.com/android/ndk/wiki/Changelog-r26) deprecating 19 and 20 as targets.
2. Activates aarch64 testing on the emulator, since the base image is now a 64-bit image.
3. Bumps the NDK to 26b

try-job: arm-android
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2024
Update Android in CI

We are currently using a 10+ year old Android image, and it has caused trouble when working on rust-lang#120326.

Our current NDK (25) only supports API 19+, so we were already out of spec. This PR:

1. Bumps the API used by the emulator in CI to 21, as per [NDK-26's release notes](https://github.com/android/ndk/wiki/Changelog-r26) deprecating 19 and 20 as targets.
2. Bumps the NDK to 26b

try-job: arm-android
maurer added a commit to maurer/rust that referenced this pull request Jul 26, 2024
We were running testing on API 18, which was already out of support for
NDK 25, and some of the ancient behavior in that image was causing
trouble when developing `rustc` features (rust-lang#120326).

Update to the current LTS NDK 26, and to its minimum supported API 21.

Fixes: rust-lang#120567
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 26, 2024
Update Android in CI

We are currently using a 10+ year old Android image, and it has caused trouble when working on rust-lang#120326.

Our current NDK (25) only supports API 19+, so we were already out of spec. This PR:

1. Bumps the API used by the emulator in CI to 21, as per [NDK-26's release notes](https://github.com/android/ndk/wiki/Changelog-r26) deprecating 19 and 20 as targets.
2. Bumps the NDK to 26b

try-job: arm-android
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 26, 2024
…um,workingjubilee

Update Android in CI

We are currently using a 10+ year old Android image, and it has caused trouble when working on rust-lang#120326.

Our current NDK (25) only supports API 19+, so we were already out of spec. This PR:

1. Bumps the API used by the emulator in CI to 21, as per [NDK-26's release notes](https://github.com/android/ndk/wiki/Changelog-r26) deprecating 19 and 20 as targets.
2. Bumps the NDK to 26b

try-job: arm-android
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-libtest Area: `#[test]` / the `test` library 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-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants