]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Fix Flaky Test
authorW. Felix Handte <w@felixhandte.com>
Mon, 13 Sep 2021 20:35:58 +0000 (16:35 -0400)
committerW. Felix Handte <w@felixhandte.com>
Tue, 5 Oct 2021 20:18:09 +0000 (16:18 -0400)
This test depended on `_extDict` and `_noDict` compressing identically, which
is not a guarantee we make, AFAIK.

tests/zstreamtest.c

index bbef903f892b98cda8b1a495c2d840426807fe34..093850e10a911ff165eac66d6fff0fa7c5cc83f2 100644 (file)
@@ -906,7 +906,7 @@ static int basicUnitTests(U32 seed, double compressibility)
         in.pos = 0;
         in.size = CNBufferSize - in.size;
         CHECK(!(ZSTD_compressStream2(cctx, &out, &in, ZSTD_e_end) == 0), "Not finished");
-        CHECK_Z(ZSTD_decompress(decodedBuffer, CNBufferSize, compressedBuffer, cSize));
+        CHECK_Z(ZSTD_decompress(decodedBuffer, CNBufferSize, compressedBuffer, out.pos));
         DISPLAYLEVEL(3, "OK \n");
 
         DISPLAYLEVEL(3, "test%3i : ZSTD_compressStream2() ZSTD_c_stableOutBuffer modify buffer : ", testNb++);