Skip to content
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

Optimize Miri for test_validate_cast_and_convert_metadata #397

Closed
joshlf opened this issue Sep 19, 2023 · 0 comments · Fixed by #399
Closed

Optimize Miri for test_validate_cast_and_convert_metadata #397

joshlf opened this issue Sep 19, 2023 · 0 comments · Fixed by #399

Comments

@joshlf
Copy link
Member

joshlf commented Sep 19, 2023

Currently, Miri tests are failing (both on main and in PRs) due to test_validate_cast_and_convert_metadata taking too long to run. We need to optimize this under Miri to unblock CI.

joshlf added a commit that referenced this issue Sep 19, 2023
In #376, we introduced `test_validate_rust_layout`, which took a long
time to run under Miri. In order to prevent it from consuming too much
time in CI, we marked it as `#[cfg_attr(miri, ignore)]`, and configured
CI to pass `-- --ignored` to Miri only a small percentage of the time.

This had the unintended side effect of running
`test_validate_cast_and_convert_metadata` under Miri. That test is
marked as `#[cfg_attr(miri, ignore)]` for good reason - it takes far too
long to run under Miri, and doesn't exercise any `unsafe` code, so
doesn't benefit from Miri. Enabling this test has caused CI to timeout.

In the interim, in #395, we optimized `test_validate_rust_layout` so
that it no longer takes an unreasonably long time to run under Miri.
Thus, in this commit, we remove the `#[cfg_attr(miri, ignore)]`
annotation from that test, and no longer pass `-- --ignored` to Miri in
CI.

Closes #397
joshlf added a commit that referenced this issue Sep 19, 2023
In #376, we introduced `test_validate_rust_layout`, which took a long
time to run under Miri. In order to prevent it from consuming too much
time in CI, we marked it as `#[cfg_attr(miri, ignore)]`, and configured
CI to pass `-- --ignored` to Miri only a small percentage of the time.

This had the unintended side effect of running
`test_validate_cast_and_convert_metadata` under Miri. That test is
marked as `#[cfg_attr(miri, ignore)]` for good reason - it takes far too
long to run under Miri, and doesn't exercise any `unsafe` code, so
doesn't benefit from Miri. Enabling this test has caused CI to timeout.

In the interim, in #395, we optimized `test_validate_rust_layout` so
that it no longer takes an unreasonably long time to run under Miri.
Thus, in this commit, we remove the `#[cfg_attr(miri, ignore)]`
annotation from that test, and no longer pass `-- --ignored` to Miri in
CI.

Closes #397
@joshlf joshlf mentioned this issue Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant