-
Notifications
You must be signed in to change notification settings - Fork 28
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
add Miri CI #61
add Miri CI #61
Conversation
.travis.yml
Outdated
@@ -39,6 +39,9 @@ matrix: | |||
env: | |||
- ARCH=x86_64 | |||
- FEATURES="--features generic-simd,runtime-dispatch-simd" | |||
- name: Miri | |||
rust: nightly | |||
script: ci/miri.sh |
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.
In terms of ordering it would probably be better to put Miri earlier as it will be one of the longer-running jobs I assume?
(Not sure what's happening with Travis, it doesn't show up in the PR for some reason but a job is running.) |
FWIW, Miri can also run code for other architectures, so this could help with #53. So far I only tested cross-OS interpretation (like using a Windows target on a Linux host and vice versa), but in principle using a different CPU as a target should also work. EDIT: did that, it works great. :) |
|
||
# Run tests | ||
cargo miri test | ||
cargo miri test --target=mips64-unknown-linux-gnuabi64 # big-endian architecture |
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 verified locally that reverting db2b9ef makes this test fail.
(CI fails for Rust 1.32 because criterion-0.3.3 does not seem compatible.) |
Thank you! |
A long time ago, I think at RustFest Rome, we talked about using Miri to test bytecount. Back then Miri wasn't up for the task, but these days it is. :)
In the default settings, each quickcheck test takes around 50s in Miri on my machine, which seems okay. When running the tests locally, one can make things go faster with something like
("disable-isolation" is needed to forward the env var to the program)
Note that by default Miri makes all RNGs deterministic. We could add the
-Zmiri-disable-isolation
flag to allow seeing from the OS RNG.Also fixes #53.