changed dictionary to stay reasonable size during test

dev
Paul Cruz 2017-06-19 17:34:50 -07:00
parent fdbb07283a
commit ea2af1ffc4
1 changed files with 2 additions and 1 deletions

View File

@ -1387,7 +1387,8 @@ static int runTestMode(U32 seed, unsigned numFiles, unsigned const testDurationS
}
}
{
size_t const dictSize = RAND(&seed);
/* don't create a dictionary that is too big */
size_t const dictSize = RAND(&seed) % (10 << 20);
size_t const r = testDecodeWithDict(seed, dictSize);
if (ZSTD_isError(r)) {
DISPLAY("Error in dictionary mode on test seed %u: %s\n", seed+fnum, ZSTD_getErrorName(r));