[fuzz] Add determinism fuzzing to simple & dictionary round trip
Compress the input twice in the `simple_round_trip` and `dictionary_round_trip` fuzzers with exactly the same parameters, but reusing the context. Then ensure that the compressed output is identical.
This commit is contained in:
@@ -66,6 +66,12 @@ size_t FUZZ_dataProducer_remainingBytes(FUZZ_dataProducer_t *producer){
|
||||
return producer->size;
|
||||
}
|
||||
|
||||
void FUZZ_dataProducer_rollBack(FUZZ_dataProducer_t *producer, size_t remainingBytes)
|
||||
{
|
||||
FUZZ_ASSERT(remainingBytes >= producer->size);
|
||||
producer->size = remainingBytes;
|
||||
}
|
||||
|
||||
int FUZZ_dataProducer_empty(FUZZ_dataProducer_t *producer) {
|
||||
return producer->size == 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user