Uh oh!
There was an error while loading. Please reload this page.
Add unstable option to ignore should_panic tests - #58689
Conversation
rust-highfive
commented
Feb 24, 2019
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
memoryruins
commented
Feb 24, 2019
r? @oli-obk |
Uh oh!
There was an error while loading. Please reload this page.
RalfJung
commented
Feb 24, 2019
To just satisfy Miri's needs, all we need to do is use the existing |
memoryruins
commented
Feb 24, 2019
It was the first experiment tried, but I agree about the complexity, which is why I posted an alternative in #58689 (comment) It would only use the ShouldPanic enum and wouldn’t need a miri specific cfg. |
I've seen that, but that still adds a new option If, OTOH, you think that option is also useful outside of Miri, then this seems fine. |
memoryruins
commented
Feb 24, 2019
I understand your reservations, as it seems like the option would be niche outside of this. One possible advantage for miri is that since the option does not require further changes to libtest, it could be useful for testing when the time comes to support panics and unwinding. The flag idea was proposed by oli-obk, so I rolled with it (unless if I misunderstood).
The new flag can be passed to cargo similar to include-ignored or in the case of cargo miri, which could be passed by default by |
RalfJung
commented
Feb 24, 2019
I suppose that works. I'll leave it up to you to decide whether it makes sense to carry that extra flag just for Miri, or whether it has more general use. I think we'll have no trouble testing the panic/unwinding story without this, when the time comes for Miri to support that. |
memoryruins
commented
Feb 24, 2019
That’s good to hear. Thank you for the review, Ralf :)
I would like to first hear oli’s thoughts on the current changes. It’s possible I’ve made more than they expected too. |
oli-obk
commented
Feb 25, 2019
I did indeed have the current changes in mind, but I agree with @RalfJung, if there's a simpler option, let's use that.
that won't work, libtest is never compiled with |
It is. However, I think it is NOT set inside rustbuild when we run the Miri test suite there... |
|
RalfJung
commented
Feb 25, 2019
Running |
oli-obk
commented
Feb 25, 2019
Also, without full MIR, you can't run tests anyway ;) So you do need
we already have the |
RalfJung
commented
Feb 25, 2019
We could, but do we want to? This means that with that flag set, all should_panic tests will get skipped, even when not run in Miri. That seems wrong. |
oli-obk
commented
Feb 25, 2019
hm. true. Ok, so... we roll with this PR and undo it once miri can do unwinding? |
memoryruins
commented
Feb 26, 2019
I looked into it more and saw that compiletest and the extracted compiletest-rs crate depend on libtest's Before going further, I would like to try out ralf's suggestion locally and see if it sorts the original issue. (unless if the cli flag is preferred after all for the rustbuild/bootstrap case) |
RalfJung
commented
Feb 26, 2019
Basically this would be a hack to make Miri somewhat more useful, but we'd have to be careful that we don't ever set Having a So I think I have come around to the conclusion that such a flag actually might make some sense. But then ignored tests should be treated just like those marked
AFAIK the extracted crate carries a copy of this, so this should be fine from a toolstate perspective. |
japaric
commented
Feb 26, 2019
All the embedded targets that are panic=abort and I'm familiar with are |
RalfJung
commented
Feb 28, 2019
@rust-lang/infra recently discussed issues with panics on Android and disabling |
emilyalbini
commented
Feb 28, 2019
It would be huge for the infra team if this is merged! |
oli-obk
commented
Feb 28, 2019
@bors r+ This is the design I envisioned, seems to be the least surprising or least error prone solution we came up with. Additionally being useful to more than just miri makes the slight additional complexity acceptable |
bors
commented
Feb 28, 2019
📌 Commit 43e7434 has been approved by |
emilyalbini
commented
Feb 28, 2019
@bors p=1 Needed to fix a spurious failure. |
…=oli-obk Add unstable option to ignore should_panic tests Add an unstable option `--exclude-should-panic` to libtest to workaround rust-lang/miri#636 ?r @oli-obk cc @RalfJung
kennytm
commented
Mar 1, 2019
Seemed to cause failure in #58820 on WASM. |
bors
commented
Mar 1, 2019
Add unstable option to ignore should_panic tests Add an unstable option `--exclude-should-panic` to libtest to workaround rust-lang/miri#636 ?r @oli-obk cc @RalfJung
bors
commented
Mar 1, 2019
☀️ Test successful - checks-travis, status-appveyor |
rust-highfive
commented
Mar 1, 2019
Tested on commit rust-lang/rust@7b4f8f9. Direct link to PR: <rust-lang/rust#58689> 💔 miri on windows: test-pass → test-fail (cc @oli-obk@RalfJung@eddyb, @rust-lang/infra). 💔 miri on linux: test-pass → test-fail (cc @oli-obk@RalfJung@eddyb, @rust-lang/infra).
RalfJung
commented
Mar 1, 2019
Seems like I was wrong thinking that compiletest-rs carries copies of these structs. Oh well. |
Fix build with the master rust-lang/rust#58689 broke compiletest.
Add an unstable option
--exclude-should-panicto libtest to workaround rust-lang/miri#636?r @oli-obk
cc @RalfJung