Enable Running Test Cases on Windows #280
Draft
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.
#279 includes changes necessary to start supporting Windows once support also lands in
rustc
(see rust-lang/rust#89369). I wanted to explore the current state of support by running thecargo-fuzz
test suite with therust
toolchain built with Windows support forasan
symbols enabled. I've run in to two issues so far.First Issue - Addressed
The test suite generates a set of fuzz targets and associated
Cargo.toml
manifest files. Those files include path configuration that, up until this point, has leveraged thePathBuf
display functionality to render the paths as strings for the generatedtoml
file. This breaks on Windows.toml
needs\
in Windows paths to be escaped, which display does not do. Using thetoml
serializer address this in a cross platform way. I have tested this change on Windows and Linux. While I don't have a Mac system to test on I have no reason to think this is a risky change there.Second Issue - Work In Progress
With a dev toolchain built and linked including the changes from rust-lang/rust#89369 and the above path issue addressed there are still failures of the test cases on Windows. All test cases that execute fuzz tests fail with:
References to this error I've found suggest it has to do with calling
cargo
from within another execution ofcargo
on Windows, which is the behavior we're attempting in these test cases. Reference rust-lang/rust-clippy#3118. Clippy addressed this with hardcoding the+nightly
toolchain in their calls tocargo
which might work here when/if rust-lang/rust#89369 or other support hits nightly. I'm investigating other options.