[fuzz] Speed up round trip tests

* Enforce smaller maximum values for parameters
* Adjust parameters to the source size

The memory usage is reduced by about 5x, which makes the fuzzers run at
least twice as fast, even more so with ASAN/MSAN enabled.
This commit is contained in:
Nick Terrell
2017-09-26 14:03:43 -07:00
parent 8a4d0abc1c
commit 471aa385b3
5 changed files with 80 additions and 46 deletions
+5 -1
View File
@@ -21,7 +21,11 @@
extern "C" {
#endif
void FUZZ_setRandomParameters(ZSTD_CCtx *cctx, uint32_t *state);
void FUZZ_setRandomParameters(ZSTD_CCtx *cctx, size_t srcSize, uint32_t *state);
ZSTD_compressionParameters FUZZ_randomCParams(size_t srcSize, uint32_t *state);
ZSTD_frameParameters FUZZ_randomFParams(uint32_t *state);
ZSTD_parameters FUZZ_randomParams(size_t srcSize, uint32_t *state);
#ifdef __cplusplus