Closed RalfJung closed 4 years ago
(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 https://github.com/llogiq/bytecount/issues/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. :)
(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 https://github.com/llogiq/bytecount/issues/53.