summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2019-04-15 18:12:54 (GMT)
committerYann Collet <cyan@fb.com>2019-04-15 18:12:54 (GMT)
commitce0f3169891ecd0bb2822ec7d2ed322a41014b39 (patch)
tree0cbc924fc010a6ce25b0b9e5f7ca568778144a54
parent474c17cdc4f4704745e1337f88066e9bd88a3eb0 (diff)
downloadlz4-ce0f3169891ecd0bb2822ec7d2ed322a41014b39.zip
lz4-ce0f3169891ecd0bb2822ec7d2ed322a41014b39.tar.gz
lz4-ce0f3169891ecd0bb2822ec7d2ed322a41014b39.tar.bz2
fix fuzzer tests on dirty context
context is no longer dirty after a failed compressed block. Actually, all indexes are fine. It remains compatible with continued streaming, and reset*_fast().
-rw-r--r--tests/fuzzer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/fuzzer.c b/tests/fuzzer.c
index 8e25615..3128e6d 100644
--- a/tests/fuzzer.c
+++ b/tests/fuzzer.c
@@ -762,7 +762,7 @@ static int FUZ_test(U32 seed, U32 nbCycles, const U32 startCycle, const double c
LZ4_attach_dictionary(&LZ4_stream, &LZ4dict);
ret = LZ4_compress_fast_continue(&LZ4_stream, block, compressedBuffer, blockSize, blockContinueCompressedSize-1, 1);
FUZ_CHECKTEST(ret>0, "LZ4_compress_fast_continue using extDictCtx should fail : one missing byte for output buffer : %i written, %i buffer", ret, blockContinueCompressedSize);
- FUZ_CHECKTEST(!LZ4_stream.internal_donotuse.dirty, "context should be dirty");
+ /* note : context is no longer dirty after a failed compressed block */
FUZ_DISPLAYTEST();
LZ4_resetStream_fast(&LZ4_stream);
@@ -840,7 +840,7 @@ static int FUZ_test(U32 seed, U32 nbCycles, const U32 startCycle, const double c
LZ4_loadDictHC(&LZ4dictHC, dict, dictSize);
ret = LZ4_compress_HC_continue(&LZ4dictHC, block, compressedBuffer, blockSize, blockContinueCompressedSize-1);
FUZ_CHECKTEST(ret>0, "LZ4_compress_HC_continue using ExtDict should fail : one missing byte for output buffer (expected %i, but result=%i)", blockContinueCompressedSize, ret);
- FUZ_CHECKTEST(!LZ4dictHC.internal_donotuse.dirty, "Context should be dirty");
+ /* note : context is no longer dirty after a failed compressed block */
FUZ_DISPLAYTEST("LZ4_compress_HC_continue with same external dictionary, and output buffer exactly the right size");
LZ4_loadDictHC(&LZ4dictHC, dict, dictSize);
@@ -877,7 +877,7 @@ static int FUZ_test(U32 seed, U32 nbCycles, const U32 startCycle, const double c
LZ4_attach_HC_dictionary(&LZ4_streamHC, &LZ4dictHC);
ret = LZ4_compress_HC_continue(&LZ4_streamHC, block, compressedBuffer, blockSize, blockContinueCompressedSize-1);
FUZ_CHECKTEST(ret>0, "LZ4_compress_HC_continue using ExtDictCtx should fail : one missing byte for output buffer (%i != %i)", ret, blockContinueCompressedSize);
- FUZ_CHECKTEST(!LZ4_streamHC.internal_donotuse.dirty, "Context should be dirty");
+ /* note : context is no longer dirty after a failed compressed block */
FUZ_DISPLAYTEST();
LZ4_resetStreamHC_fast (&LZ4_streamHC, compressionLevel);