use time limited fuzzer tests in CI
This commit is contained in:
+3
-2
@@ -65,6 +65,7 @@ VOID = /dev/null
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ZBUFFTEST = -T2mn
|
ZBUFFTEST = -T2mn
|
||||||
|
FUZZERTEST= -T5mn
|
||||||
|
|
||||||
.PHONY: default all clean install uninstall test test32 test-all
|
.PHONY: default all clean install uninstall test test32 test-all
|
||||||
|
|
||||||
@@ -258,10 +259,10 @@ test-fullbench32: fullbench32 datagen
|
|||||||
./fullbench32 -i1 -P0
|
./fullbench32 -i1 -P0
|
||||||
|
|
||||||
test-fuzzer: fuzzer
|
test-fuzzer: fuzzer
|
||||||
./fuzzer
|
./fuzzer $(FUZZERTEST)
|
||||||
|
|
||||||
test-fuzzer32: fuzzer32
|
test-fuzzer32: fuzzer32
|
||||||
./fuzzer32
|
./fuzzer32 $(FUZZERTEST)
|
||||||
|
|
||||||
test-zbuff: zbufftest
|
test-zbuff: zbufftest
|
||||||
./zbufftest $(ZBUFFTEST)
|
./zbufftest $(ZBUFFTEST)
|
||||||
|
|||||||
+5
-6
@@ -306,9 +306,10 @@ int fuzzerTests(U32 seed, U32 nbTests, unsigned startTest, double compressibilit
|
|||||||
BYTE* sampleBuffer;
|
BYTE* sampleBuffer;
|
||||||
|
|
||||||
/* init */
|
/* init */
|
||||||
DISPLAYUPDATE(2, "\r%6u", testNb);
|
if (nbTests >= testNb)
|
||||||
if (nbTests >= testNb) DISPLAYUPDATE(2, "\r/%6u", nbTests);
|
{ DISPLAYUPDATE(2, "\r%6u/%6u ", testNb, nbTests); }
|
||||||
DISPLAYUPDATE(2, " ");
|
else { DISPLAYUPDATE(2, "\r%6u ", testNb); }
|
||||||
|
|
||||||
FUZ_rand(&coreSeed);
|
FUZ_rand(&coreSeed);
|
||||||
lseed = coreSeed ^ prime1;
|
lseed = coreSeed ^ prime1;
|
||||||
buffNb = FUZ_rand(&lseed) & 127;
|
buffNb = FUZ_rand(&lseed) & 127;
|
||||||
@@ -471,7 +472,7 @@ int fuzzerTests(U32 seed, U32 nbTests, unsigned startTest, double compressibilit
|
|||||||
cSize += errorCode;
|
cSize += errorCode;
|
||||||
crcOrig = XXH64_digest(&crc64);
|
crcOrig = XXH64_digest(&crc64);
|
||||||
}
|
}
|
||||||
DISPLAY("\r%u fuzzer tests completed \n", testNb);
|
DISPLAY("\r%u fuzzer tests completed \n", testNb-1);
|
||||||
|
|
||||||
_cleanup:
|
_cleanup:
|
||||||
ZSTD_freeCCtx(ctx);
|
ZSTD_freeCCtx(ctx);
|
||||||
@@ -629,8 +630,6 @@ int main(int argc, char** argv)
|
|||||||
DISPLAY("Seed = %u\n", seed);
|
DISPLAY("Seed = %u\n", seed);
|
||||||
if (proba!=FUZ_COMPRESSIBILITY_DEFAULT) DISPLAY("Compressibility : %i%%\n", proba);
|
if (proba!=FUZ_COMPRESSIBILITY_DEFAULT) DISPLAY("Compressibility : %i%%\n", proba);
|
||||||
|
|
||||||
if (nbTests<=0) nbTests=1;
|
|
||||||
|
|
||||||
if (testNb==0) result = basicUnitTests(0, ((double)proba) / 100); /* constant seed for predictability */
|
if (testNb==0) result = basicUnitTests(0, ((double)proba) / 100); /* constant seed for predictability */
|
||||||
if (!result)
|
if (!result)
|
||||||
result = fuzzerTests(seed, nbTests, testNb, ((double)proba) / 100);
|
result = fuzzerTests(seed, nbTests, testNb, ((double)proba) / 100);
|
||||||
|
|||||||
Reference in New Issue
Block a user