Use test-tag crate for tagging Miri tests #711
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The way we specify the tests to run under Miri is error-prone at best. Basically, we roughly group eligible tests into modules or hard code function names of suitable functions inside the CI configuration. This is prone to result in missed tests (if somebody renames a test and forgets to adjust the CI script). It is also non-obvious from the code what is happening and that makes it much less likely that new tests are onboarded to run there. Lastly, because we establish a grouping by module (to minimize maintenance burden of naming dozens of tests in the CI configuration), we end up with attributes such as
#[cfg_attr(miri, ignore)]
for opting out.With this change we switch over to using the test-tag crate for tagging Miri tests as such, which will make it much easier to onboard new tests and reduces the maintenance burden down the line, because the source of truth is a single declarative attribute on the eligible tests.