mutagen icon indicating copy to clipboard operation
mutagen copied to clipboard

Integration with cargo-fuzz

Open elichai opened this issue 2 years ago • 2 comments

A lot of the tests I have are using libfuzzer/cargo-fuzz to create test curposes, would be nice if I could run those under mutagen, obviously I could write a test function that runs them and then run mutagen, but I have a lot of fuzzers and it will require adding a lot of fuzzing logic code into my crate's tests suite, so it would be nice if I could plug cargo-mutagen into the fuzzer so it will run the fuzzing corpuses under mutations

elichai avatar Jan 01 '23 12:01 elichai

Could you elaborate a bit more? Some questions:

  • what output do you expect? do you want to know which mutations would result in a failure of cargo-fuzz?
  • which tool would be the "outer" one? cargo fuzz --mutagen or cargo mutagen --with-cargo-fuzz
  • could either tool use the other tool as a lib? or would either tool call the other tool as command?
  • who would be responsible to detect whether mutations result in infinite loops?

samuelpilz avatar Jan 04 '23 11:01 samuelpilz

do you want to know which mutations would result in a failure of cargo-fuzz?

As far as I've used mutagen, it basically test the mutants with cargo test, right? So, I suppose @elichai wants to test the mutants using fuzzing e.g. by running only with the cases from the corpus or limiting the execution time like "Run fuzzing for 3 minutes and check if the mutant was killed").

brunoerg avatar May 28 '24 21:05 brunoerg