fuzz_storvsp: forward progress with invalid packets #648
+83
−55
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.
Refactor the storvsp fuzzer to allow for forward progress: split the fuzzing loop into its own async function, and have the fuzz executor wait for either the fuzzing loop to run out of arbitrary data, or for the thread parsing storvsp packets (the test worker's task) to finish.
This is necessary because storvsp stops packet processing if the guest sends storvsp a corrupted or invalid packet. This is correct behavior, and the fuzzer must accommodate.
Tested by running running the fuzzer for some time and inspecting code coverage. There is a noticeable increase in code coverage on the paths that process IOs (where these were previously not hit). Also ran
cargo xtask fuzz run fuzz_storvsp -- -- -timeout=1
to catch when this likely hangs, with no hangs seen.