From: W. Felix Handte Date: Mon, 13 Sep 2021 20:35:58 +0000 (-0400) Subject: Fix Flaky Test X-Git-Tag: v1.5.1~1^2~77^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=168d0a3c89dd7d74fc682859520e895b6f1b521a;p=thirdparty%2Fzstd.git Fix Flaky Test This test depended on `_extDict` and `_noDict` compressing identically, which is not a guarantee we make, AFAIK. --- diff --git a/tests/zstreamtest.c b/tests/zstreamtest.c index bbef903f8..093850e10 100644 --- a/tests/zstreamtest.c +++ b/tests/zstreamtest.c @@ -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++);