From: Paul Cruz Date: Tue, 20 Jun 2017 00:34:50 +0000 (-0700) Subject: changed dictionary to stay reasonable size during test X-Git-Tag: v1.3.0~1^2~15^2~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea2af1ffc429981214124572524790c82126493a;p=thirdparty%2Fzstd.git changed dictionary to stay reasonable size during test --- diff --git a/tests/decodecorpus.c b/tests/decodecorpus.c index 8e2cefb4b..4b42c6d7c 100644 --- a/tests/decodecorpus.c +++ b/tests/decodecorpus.c @@ -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));