]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
changed dictionary to stay reasonable size during test
authorPaul Cruz <paulcruz74@fb.com>
Tue, 20 Jun 2017 00:34:50 +0000 (17:34 -0700)
committerPaul Cruz <paulcruz74@fb.com>
Tue, 20 Jun 2017 00:34:50 +0000 (17:34 -0700)
tests/decodecorpus.c

index 8e2cefb4b8abe8df1c809c2b9a3a7e37b19f1ec6..4b42c6d7cbfe4ca7f12d8eb8077ec1fb8fd66f1b 100644 (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));