Automatically distinguish between Miri identifying UB and Miri being unable to run tests
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.6k
- Forks
- 529
- Avg merge
- 13h 55m
- Merged PRs (30d)
- 40
Description
Hi, I'm working on an automated test suite for our project with Miri, and we have a number of crates that use FFI in some, but not all, tests. I won't have knowledge about which crates and the tests within those crates call FFI functions.
Is there an easy way to handle this? We want to run as many of our tests as possible under Miri. Right now, my current strategy is to go through stderr after running cargo miri test on each crate and search through a set of fixed error strings that indicate Miri being unable to run the test rather than identifying UB. However, that's brittle and requires me to know upfront all of the possible unsupported features.
Could we have a different error code be returned for cargo miri test if a test was unable to finish running due to an unsupported feature? Right now both UB and unsupported features return 1.
If there were a flag to skip and ignore tests that couldn't run in Miri, that would also work.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the cargo miri test entry point and trace how Miri reports unsupported features versus undefined behavior. Compare the requested distinct exit code with the alternative of skipping unsupported tests, then define a way to verify that UB still fails while tests Miri cannot run are handled separately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100