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

Add needs-unwind and beginning of support for testing panic=abort std to compiletest #84734

Merged
merged 4 commits into from
May 7, 2021

Conversation

tmandry
Copy link
Member

@tmandry tmandry commented Apr 30, 2021

For the Fuchsia platform we build libstd with panic=abort and would like a way to run tests with that enabled. This adds low-level support for this directly to compiletest.

In the future I'd like to add high-level support in rustbuild, e.g. having target-specific flags that allow configuring a panic strategy. (Side note: It would be nice if we could also build multiple configurations for the same target, but I'm getting ahead of myself.)

This plus #84500 have everything that's needed to get ui tests passing on fuchsia targets.

Part of #84766. Note that this change only includes the header on tests which need an unwinder to build, not those which need it to run.

r? @Mark-Simulacrum

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 30, 2021
@rust-log-analyzer

This comment has been minimized.

@tmandry tmandry force-pushed the compiletest-needs-unwind branch from b01f6a5 to 64b9061 Compare April 30, 2021 04:50
@rust-log-analyzer

This comment has been minimized.

@tmandry tmandry force-pushed the compiletest-needs-unwind branch from 64b9061 to c65ba57 Compare April 30, 2021 05:04
@rust-log-analyzer

This comment has been minimized.

@tmandry tmandry force-pushed the compiletest-needs-unwind branch 2 times, most recently from 4e16d2e to 9cda465 Compare April 30, 2021 06:44
@bjorn3
Copy link
Member

bjorn3 commented Apr 30, 2021

@tmandry
Copy link
Member Author

tmandry commented Apr 30, 2021

@bjorn3 ah it's because I disabled running any of the UI tests. I should build a panic=abort libstd on linux and get the full set that way. Good to know there's another use case for this, though..

@tmandry tmandry changed the title Add needs-unwind and support for testing panic=abort libstd to compiletest Add needs-unwind and beginning of support for testing panic=abort std to compiletest Apr 30, 2021
@Mark-Simulacrum
Copy link
Member

This seems good to me; I imagine it may make sense to add the support and then actually annotate all the tests in followup PRs. I left a nit, but please make sure to squash it into the existing commits.

With regards to future extensions (e.g., multiple target variants, etc.) I think support for configuring the panic strategy desired seems OK, but allowing one to build multiple 'identical' targets but with different panic strategies or other attributes is probably best left out of scope for now. It may become (more) desirable as we gain further support for build-std or similar features, where it may make sense to "prebuild" std for a variety of configurations, so that users can opt-in via some standard mechanism to those builds, perhaps before we allow them to actually build std themselves.

@Mark-Simulacrum Mark-Simulacrum 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 May 6, 2021
@tmandry tmandry force-pushed the compiletest-needs-unwind branch from 9cda465 to 947ad58 Compare May 6, 2021 02:49
@Mark-Simulacrum
Copy link
Member

Let me know what strategy you want to take with the annotations, but r=me on this first draft of you want to followup with those

@tmandry
Copy link
Member Author

tmandry commented May 6, 2021

@Mark-Simulacrum Yes, I'd prefer to do those in a follow-up. I also want to make sure that these have a way of being tested in CI (probably as part of the wasm target)

@bors r=Mark-Simulacrum

@bors
Copy link
Contributor

bors commented May 6, 2021

📌 Commit 947ad58 has been approved by Mark-Simulacrum

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 6, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request May 6, 2021
…=Mark-Simulacrum

Add `needs-unwind` and beginning of support for testing `panic=abort` std to compiletest

For the Fuchsia platform we build libstd with `panic=abort` and would like a way to run tests with that enabled. This adds low-level support for this directly to compiletest.

In the future I'd like to add high-level support in rustbuild, e.g. having target-specific flags that allow configuring a panic strategy. (Side note: It would be nice if we could also build multiple configurations for the same target, but I'm getting ahead of myself.)

This plus rust-lang#84500 have everything that's needed to get ui tests passing on fuchsia targets.

Part of rust-lang#84766. Note that this change only includes the header on tests which need an unwinder to _build_, not those which need it to _run_.

r? `@Mark-Simulacrum`
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request May 6, 2021
…=Mark-Simulacrum

Add `needs-unwind` and beginning of support for testing `panic=abort` std to compiletest

For the Fuchsia platform we build libstd with `panic=abort` and would like a way to run tests with that enabled. This adds low-level support for this directly to compiletest.

In the future I'd like to add high-level support in rustbuild, e.g. having target-specific flags that allow configuring a panic strategy. (Side note: It would be nice if we could also build multiple configurations for the same target, but I'm getting ahead of myself.)

This plus rust-lang#84500 have everything that's needed to get ui tests passing on fuchsia targets.

Part of rust-lang#84766. Note that this change only includes the header on tests which need an unwinder to _build_, not those which need it to _run_.

r? ``@Mark-Simulacrum``
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request May 6, 2021
…=Mark-Simulacrum

Add `needs-unwind` and beginning of support for testing `panic=abort` std to compiletest

For the Fuchsia platform we build libstd with `panic=abort` and would like a way to run tests with that enabled. This adds low-level support for this directly to compiletest.

In the future I'd like to add high-level support in rustbuild, e.g. having target-specific flags that allow configuring a panic strategy. (Side note: It would be nice if we could also build multiple configurations for the same target, but I'm getting ahead of myself.)

This plus rust-lang#84500 have everything that's needed to get ui tests passing on fuchsia targets.

Part of rust-lang#84766. Note that this change only includes the header on tests which need an unwinder to _build_, not those which need it to _run_.

r? ```@Mark-Simulacrum```
bors added a commit to rust-lang-ci/rust that referenced this pull request May 7, 2021
Rollup of 11 pull requests

Successful merges:

 - rust-lang#84409 (Ensure TLS destructors run before thread joins in SGX)
 - rust-lang#84500 (Add --run flag to compiletest)
 - rust-lang#84728 (Add test for suggestion to borrow unsized function parameters)
 - rust-lang#84734 (Add `needs-unwind` and beginning of support for testing `panic=abort` std to compiletest)
 - rust-lang#84755 (Allow using `core::` in intra-doc links within core itself)
 - rust-lang#84871 (Disallows `#![feature(no_coverage)]` on stable and beta (using standard crate-level gating))
 - rust-lang#84872 (Wire up tidy dependency checks for cg_clif)
 - rust-lang#84896 (Handle incorrect placement of parentheses in trait bounds more gracefully)
 - rust-lang#84905 (CTFE engine: rename copy → copy_intrinsic, move to intrinsics.rs)
 - rust-lang#84953 (Remove unneeded call to with_default_session_globals in rustdoc highlight)
 - rust-lang#84987 (small nits)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 577f1d0 into rust-lang:master May 7, 2021
@rustbot rustbot added this to the 1.54.0 milestone May 7, 2021
@tmandry tmandry deleted the compiletest-needs-unwind branch May 7, 2021 03:57
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants