-
Notifications
You must be signed in to change notification settings - Fork 325
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
cargo miri test
no longer correctly detects tests
#479
Comments
After running with #482 I see that unit tests in libraries don't have the |
Somehow the test binary has to work, find the tests, run them. How does it do that? |
It looks like it looks for the |
Ah, yep, the |
The Its second field is an enum, which for ordinary test cases is equal to |
rust-lang/rust#56243 makes some progress towards this: We still run into rust-lang/rust#54957, but other than that, we can actually run the libtest harness in miri. |
Can you just disable the btree-breaking check for a bit? |
That would mean disabling Stacked Borrows. One can run with I can try disabling it inside the BTree module (there's a whiteliist), but that could fail to work because it means references created by BTree are not properly tracked. |
Since rust-lang/rust#53410 the
#[test]
attribute has become a macro and is not visible in the HIR as an attribute. This means that the code detecting test cases never triggers so any#[test]
-labeled functions are ignored.CI passes because the effect of this is that the tests simply aren't run, so of course they don't fail :).
I am investigating the effects of the compiler PR. Empirically it looks like functions that used to have a
test
attribute in the HIR now have amain
attribute, but I'm not sure if that's happening on purpose and if that's the correct way for us to detect test cases now.The text was updated successfully, but these errors were encountered: