-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Revamp // run-fail
wrt. --pass
& support // build-fail
& // check-fail
#66932
Conversation
This comment has been minimized.
This comment has been minimized.
@Centril and @petrochenkov, there is a preexisting (and passing)
It may be worthwhile adding the relevant flags above to the offending async run-fail tests. However, I'm not sure if this test gets any special treatment and I cannot reproduce the failures locally. |
5660aef
to
68cce86
Compare
--pass check
work with // run-fail
tests// run-fail
wrt. --pass
& support // build-fail
& // check-fail
@petrochenkov I've rewritten the approach from scratch to something more useful and principled. :) |
This comment has been minimized.
This comment has been minimized.
@@ -1,3 +1,4 @@ | |||
// build-fail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how this is checked.
Looks like if the test starts failing at the "check" phase it will still pass with the // build-fail
annotation.
Why are such annotations useful then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, how the // build-fail
test set was collected?
This can be done by introducing some kind of analogue of --pass check
, but for failing tests, but I don't see it in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like if the test starts failing at the "check" phase it will still pass with the
// build-fail
annotation.
Ouch; Didn't think of that. To fix it, I think we'd need to compile the test twice, once as check-pass
and once as build-fail
.
Also, how the
// build-fail
test set was collected?
A set of tests started failing because they did not fail with --emit metadata
.
This can be done by introducing some kind of analogue of
--pass check
, but for failing tests, but I don't see it in this PR.
Didn't feel necessary, but I can add --fail
if you think it's useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but I can add --fail if you think it's useful.
No, no, just running twice would probably be preferable, the number of such tests is not too large, but we need to measure.
This is material for another PR anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I fixed it, but I had to refactor things to get rid of some implicit state to make it work. I think things should be less brittle & more understandable now. Let's see what the CI builder says. :)
PR builder is happy at last. 🎉 |
@bors r+ |
📌 Commit fdedf4c has been approved by |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@bors p=199 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3049924
to
73e6a21
Compare
Fixed the 32-bit-only tests wrt. build-fail. @bors r=petrochenkov |
📌 Commit 73e6a21 has been approved by |
Revamp `// run-fail` wrt. `--pass` & support `// build-fail` & `// check-fail` Revamp how `// run-fail` tests work internally by having a separate `FailMode` that does not interfere with `PassMode`. In particular, `--pass check` will now have no effect on `// *-fail` tests. Moreover, new test annotations `// check-fail` (the default) and `// build-fail` are added. The latter is useful to distinguish post-monomorphization failures from pre-monomorphization failures as seen throughout the PR. Finally, ensure that non-`Ui` tests do not listen to `--pass check` such that the flag can be used with e.g. `./x.py test --pass check` directly. Fixes #66929. Fixes #67128. r? @petrochenkov cc @RalfJung @ninjasource
☀️ Test successful - checks-azure |
Revamp how
// run-fail
tests work internally by having a separateFailMode
that does not interfere withPassMode
. In particular,--pass check
will now have no effect on// *-fail
tests. Moreover, new test annotations// check-fail
(the default) and// build-fail
are added. The latter is useful to distinguish post-monomorphization failures from pre-monomorphization failures as seen throughout the PR. Finally, ensure that non-Ui
tests do not listen to--pass check
such that the flag can be used with e.g../x.py test --pass check
directly.Fixes #66929.
Fixes #67128.
r? @petrochenkov
cc @RalfJung @ninjasource