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

Ignore core, alloc and test tests that require unwinding on -C panic=abort #112314

Merged
merged 2 commits into from
Jun 13, 2023

Conversation

pietroalbini
Copy link
Member

Some of the tests for core and alloc require unwinding through their use of catch_unwind. These tests fail when testing using -C panic=abort (in my case through a target without unwinding support, and -Z panic-abort-tests), while they should be ignored as they don't indicate a failure.

This PR marks all of these tests with this attribute:

#[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]

I'm not aware of a way to test this on rust-lang/rust's CI, as we don't test any target with -C panic=abort, but I tested this locally on a Ferrocene target and it does indeed make the test suite pass.

@rustbot
Copy link
Collaborator

rustbot commented Jun 5, 2023

r? @joshtriplett

(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 Jun 5, 2023
@pietroalbini pietroalbini changed the title Ignore core and alloc tests that require unwinding on -C panic=abort Ignore core, alloc and test tests that require unwinding on -C panic=abort Jun 13, 2023
@pietroalbini
Copy link
Member Author

Also added attributes to the test crate.

@rustbot
Copy link
Collaborator

rustbot commented Jun 13, 2023

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

@pietroalbini
Copy link
Member Author

Removed the ignored tests from the patch.

r? @bjorn3

@rustbot rustbot assigned bjorn3 and unassigned joshtriplett Jun 13, 2023
library/alloc/tests/vec.rs Outdated Show resolved Hide resolved
@bjorn3
Copy link
Member

bjorn3 commented Jun 13, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Jun 13, 2023

📌 Commit a988dc2 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 Jun 13, 2023
@bors
Copy link
Contributor

bors commented Jun 13, 2023

⌛ Testing commit a988dc2 with merge 371994e...

@bors
Copy link
Contributor

bors commented Jun 13, 2023

☀️ Test successful - checks-actions
Approved by: bjorn3
Pushing 371994e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 13, 2023
@bors bors merged commit 371994e into rust-lang:master Jun 13, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 13, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (371994e): comparison URL.

Overall result: ❌✅ regressions and 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.4% [0.4%, 0.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.2% [-1.2%, -1.2%] 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)
2.2% [2.2%, 2.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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: 648.13s -> 647.349s (-0.12%)

@pietroalbini pietroalbini deleted the pa-core-alloc-abort branch June 14, 2023 07:27
bjorn3 pushed a commit to bjorn3/rust that referenced this pull request Jun 15, 2023
Ignore `core`, `alloc` and `test` tests that require unwinding on `-C panic=abort`

Some of the tests for `core` and `alloc` require unwinding through their use of `catch_unwind`. These tests fail when testing using `-C panic=abort` (in my case through a target without unwinding support, and `-Z panic-abort-tests`), while they should be ignored as they don't indicate a failure.

This PR marks all of these tests with this attribute:

```rust
#[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
```

I'm not aware of a way to test this on rust-lang/rust's CI, as we don't test any target with `-C panic=abort`, but I tested this locally on a Ferrocene target and it does indeed make the test suite pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

6 participants