]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
[tests] Add rsyncable tests 1416/head
authorNick Terrell <terrelln@fb.com>
Wed, 14 Nov 2018 21:53:14 +0000 (13:53 -0800)
committerNick Terrell <terrelln@fb.com>
Thu, 15 Nov 2018 01:00:29 +0000 (17:00 -0800)
tests/playTests.sh
tests/zstreamtest.c

index f35f5fee6ef5b38ceb12fc89b79c3b957e0bcc0d..99609a5ea01a10c0e8a5cc7050c1b1f667c9d541 100755 (executable)
@@ -836,6 +836,12 @@ $ECHO "===>   test: --adapt must fail on incoherent bounds "
 ./datagen > tmp
 $ZSTD -f -vv --adapt=min=10,max=9 tmp && die "--adapt must fail on incoherent bounds"
 
+$ECHO "\n===>   rsyncable mode "
+roundTripTest -g10M " --rsyncable"
+roundTripTest -g10M " --rsyncable -B100K"
+$ECHO "===>   test: --rsyncable must fail with --single-thread"
+$ZSTD -f -vv --rsyncable --single-thread tmp && die "--rsyncable must fail with --single-thread"
+
 
 if [ "$1" != "--test-large-data" ]; then
     $ECHO "Skipping large data tests"
index f47451a3c3d501b143c8ad90ab0a8ed3f3e9978f..2e076d7b752d6baa424a579cfb9e2ce6f6042d1f 100644 (file)
@@ -1915,6 +1915,8 @@ static int fuzzerTests_newAPI(U32 seed, U32 nbTests, unsigned startTest,
                         CHECK_Z( setCCtxParameter(zc, cctxParams, ZSTD_p_jobSize, (U32)FUZ_rLogLength(&lseed, jobLog), opaqueAPI) );
                     }
                 }
+                /* Enable rsyncable mode 1 in 4 times. */
+                setCCtxParameter(zc, cctxParams, ZSTD_p_rsyncable, (FUZ_rand(&lseed) % 4 == 0), opaqueAPI);
 
                 if (FUZ_rand(&lseed) & 1) CHECK_Z( setCCtxParameter(zc, cctxParams, ZSTD_p_forceMaxWindow, FUZ_rand(&lseed) & 1, opaqueAPI) );