Lines Matching refs:FUZ_rand
88 static U32 FUZ_rand(U32* seedPtr) in FUZ_rand() function
454 size_t const inSize = (FUZ_rand(&coreSeed) & 15) + 1; in basicUnitTests()
455 size_t const outSize = (FUZ_rand(&coreSeed) & 15) + 1; in basicUnitTests()
466 size_t const inSize = FUZ_rand(&coreSeed) & 15; in basicUnitTests()
467 …size_t const outSize = (FUZ_rand(&coreSeed) & 15) + (!inSize); /* avoid having both sizes at 0 =… in basicUnitTests()
701 inBuff.size += MIN(cSize - inBuff.pos, 1 + (FUZ_rand(&coreSeed) & 15)); in basicUnitTests()
746 inBuff.size += MIN(cSize - inBuff.pos, 1 + (FUZ_rand(&coreSeed) & 15)); in basicUnitTests()
1722 return (lengthMask+1) + (FUZ_rand(seed) & lengthMask); in FUZ_rLogLength()
1727 U32 const logLength = FUZ_rand(seed) % maxLog; in FUZ_randomLength()
1735 return (U32)((FUZ_rand(seed) % mod) + minVal); in FUZ_randomClampedLength()
1783 FUZ_rand(&coreSeed); in fuzzerTests()
1796 FUZ_rand(&coreSeed); in fuzzerTests()
1806 if ((FUZ_rand(&lseed) & 0xFF) == 131) { in fuzzerTests()
1812 if ((FUZ_rand(&lseed) & 0xFF) == 132) { in fuzzerTests()
1820 { U32 buffNb = FUZ_rand(&lseed) & 0x7F; in fuzzerTests()
1835 if ((FUZ_rand(&lseed)&1) /* at beginning, to keep same nb of rand */ in fuzzerTests()
1839 { U64 const pledgedSrcSize = (FUZ_rand(&lseed) & 3) ? 0 : maxTestSize; in fuzzerTests()
1843 U32 const testLog = FUZ_rand(&lseed) % maxSrcLog; in fuzzerTests()
1844 U32 const dictLog = FUZ_rand(&lseed) % maxSrcLog; in fuzzerTests()
1845 U32 const cLevelCandidate = ( FUZ_rand(&lseed) % in fuzzerTests()
1853 dictSize = ((FUZ_rand(&lseed)&7)==1) ? FUZ_rLogLength(&lseed, dictLog) : 0; in fuzzerTests()
1854 { size_t const dictStart = FUZ_rand(&lseed) % (srcBufferSize - dictSize); in fuzzerTests()
1857 … { U64 const pledgedSrcSize = (FUZ_rand(&lseed) & 3) ? ZSTD_CONTENTSIZE_UNKNOWN : maxTestSize; in fuzzerTests()
1859 params.fParams.checksumFlag = FUZ_rand(&lseed) & 1; in fuzzerTests()
1860 params.fParams.noDictIDFlag = FUZ_rand(&lseed) & 1; in fuzzerTests()
1861 params.fParams.contentSizeFlag = FUZ_rand(&lseed) & 1; in fuzzerTests()
1873 size_t const srcStart = FUZ_rand(&lseed) % (srcBufferSize - srcSize); in fuzzerTests()
1887 if ((FUZ_rand(&lseed) & 15) == 0) { in fuzzerTests()
1908 … if (!dictSize /* don't reset if dictionary : could be different */ && (FUZ_rand(&lseed) & 1)) { in fuzzerTests()
1942 { U32 const nbNoiseChunks = (FUZ_rand(&lseed) & 7) + 2; in fuzzerTests()
1946 size_t const noiseStart = FUZ_rand(&lseed) % (srcBufferSize - noiseSize); in fuzzerTests()
1947 size_t const cStart = FUZ_rand(&lseed) % (cSize - noiseSize); in fuzzerTests()
2051 FUZ_rand(&coreSeed); in fuzzerTests_newAPI()
2070 FUZ_rand(&coreSeed); in fuzzerTests_newAPI()
2073 opaqueAPI = FUZ_rand(&lseed) & 1; in fuzzerTests_newAPI()
2077 if ((FUZ_rand(&lseed) & 0xFF) == 131) { in fuzzerTests_newAPI()
2084 if ((FUZ_rand(&lseed) & 0xFF) == 132) { in fuzzerTests_newAPI()
2092 { U32 buffNb = FUZ_rand(&lseed) & 0x7F; in fuzzerTests_newAPI()
2108 if ((FUZ_rand(&lseed)&1) /* at beginning, to keep same nb of rand */ in fuzzerTests_newAPI()
2114 { int const compressionLevel = (FUZ_rand(&lseed) % 5) + 1; in fuzzerTests_newAPI()
2119 U32 const testLog = FUZ_rand(&lseed) % maxSrcLog; in fuzzerTests_newAPI()
2120 U32 const dictLog = FUZ_rand(&lseed) % maxSrcLog; in fuzzerTests_newAPI()
2121 U32 const cLevelCandidate = (FUZ_rand(&lseed) % in fuzzerTests_newAPI()
2131 dictSize = ((FUZ_rand(&lseed)&63)==1) ? FUZ_rLogLength(&lseed, dictLog) : 0; in fuzzerTests_newAPI()
2132 { size_t const dictStart = FUZ_rand(&lseed) % (srcBufferSize - dictSize); in fuzzerTests_newAPI()
2136 pledgedSrcSize = (FUZ_rand(&lseed) & 3) ? ZSTD_CONTENTSIZE_UNKNOWN : maxTestSize; in fuzzerTests_newAPI()
2144 cParams.windowLog += (FUZ_rand(&lseed) & 3) - 1; in fuzzerTests_newAPI()
2146 cParams.hashLog += (FUZ_rand(&lseed) & 3) - 1; in fuzzerTests_newAPI()
2147 cParams.chainLog += (FUZ_rand(&lseed) & 3) - 1; in fuzzerTests_newAPI()
2148 cParams.searchLog += (FUZ_rand(&lseed) & 3) - 1; in fuzzerTests_newAPI()
2150 cParams.minMatch += (FUZ_rand(&lseed) & 3) - 1; in fuzzerTests_newAPI()
2151 …ams.targetLength = (U32)((cParams.targetLength + 1 ) * (0.5 + ((double)(FUZ_rand(&lseed) & 127) / … in fuzzerTests_newAPI()
2154 if (FUZ_rand(&lseed) & 1) { in fuzzerTests_newAPI()
2160 if (FUZ_rand(&lseed) & 1) { in fuzzerTests_newAPI()
2164 if (FUZ_rand(&lseed) & 1) { in fuzzerTests_newAPI()
2168 …if (FUZ_rand(&lseed) & 1) CHECK_Z( setCCtxParameter(zc, cctxParams, ZSTD_c_searchLog, cParams.sear… in fuzzerTests_newAPI()
2169 …if (FUZ_rand(&lseed) & 1) CHECK_Z( setCCtxParameter(zc, cctxParams, ZSTD_c_minMatch, cParams.minMa… in fuzzerTests_newAPI()
2170 …if (FUZ_rand(&lseed) & 1) CHECK_Z( setCCtxParameter(zc, cctxParams, ZSTD_c_targetLength, cParams.t… in fuzzerTests_newAPI()
2174 …if (FUZ_rand(&lseed) & 1) CHECK_Z( setCCtxParameter(zc, cctxParams, ZSTD_c_enableLongDistanceMatch… in fuzzerTests_newAPI()
2175 …if (FUZ_rand(&lseed) & 3) CHECK_Z( setCCtxParameter(zc, cctxParams, ZSTD_c_ldmHashLog, FUZ_randomC… in fuzzerTests_newAPI()
2176 …if (FUZ_rand(&lseed) & 3) CHECK_Z( setCCtxParameter(zc, cctxParams, ZSTD_c_ldmMinMatch, FUZ_random… in fuzzerTests_newAPI()
2177 …if (FUZ_rand(&lseed) & 3) CHECK_Z( setCCtxParameter(zc, cctxParams, ZSTD_c_ldmBucketSizeLog, FUZ_r… in fuzzerTests_newAPI()
2178 …if (FUZ_rand(&lseed) & 3) CHECK_Z( setCCtxParameter(zc, cctxParams, ZSTD_c_ldmHashRateLog, FUZ_ran… in fuzzerTests_newAPI()
2179 …if (FUZ_rand(&lseed) & 3) CHECK_Z( setCCtxParameter(zc, cctxParams, ZSTD_c_srcSizeHint, FUZ_random… in fuzzerTests_newAPI()
2183 if (FUZ_rand(&lseed) & 1) { in fuzzerTests_newAPI()
2184 int const checksumFlag = FUZ_rand(&lseed) & 1; in fuzzerTests_newAPI()
2188 …if (FUZ_rand(&lseed) & 1) CHECK_Z( setCCtxParameter(zc, cctxParams, ZSTD_c_dictIDFlag, FUZ_rand(&l… in fuzzerTests_newAPI()
2189 …if (FUZ_rand(&lseed) & 1) CHECK_Z( setCCtxParameter(zc, cctxParams, ZSTD_c_contentSizeFlag, FUZ_ra… in fuzzerTests_newAPI()
2190 if (FUZ_rand(&lseed) & 1) { in fuzzerTests_newAPI()
2198 if (bigTests || (FUZ_rand(&lseed) & 0xF) == 0xF) { in fuzzerTests_newAPI()
2199 U32 const nbThreadsCandidate = (FUZ_rand(&lseed) & 4) + 1; in fuzzerTests_newAPI()
2205 U32 const jobLog = FUZ_rand(&lseed) % (testLog+1); in fuzzerTests_newAPI()
2206 … CHECK_Z( setCCtxParameter(zc, cctxParams, ZSTD_c_overlapLog, FUZ_rand(&lseed) % 10, opaqueAPI) ); in fuzzerTests_newAPI()
2212 int const rsyncable = (FUZ_rand(&lseed) % 4 == 0); in fuzzerTests_newAPI()
2217 …if (FUZ_rand(&lseed) & 1) CHECK_Z( setCCtxParameter(zc, cctxParams, ZSTD_c_forceMaxWindow, FUZ_ran… in fuzzerTests_newAPI()
2225 if (FUZ_rand(&lseed) & 1) { in fuzzerTests_newAPI()
2226 if (FUZ_rand(&lseed) & 1) { in fuzzerTests_newAPI()
2245 int const singlePass = (FUZ_rand(&lseed) & 3) == 0; in fuzzerTests_newAPI()
2259 if (nbWorkers > 0 && (FUZ_rand(&lseed) & 7) == 0) { in fuzzerTests_newAPI()
2278 size_t const srcStart = FUZ_rand(&lseed) % (srcBufferSize - srcSize); in fuzzerTests_newAPI()
2279 … ZSTD_EndDirective const flush = (FUZ_rand(&lseed) & 15) ? ZSTD_e_continue : ZSTD_e_flush; in fuzzerTests_newAPI()
2336 … if (!dictSize /* don't reset if dictionary : could be different */ && (FUZ_rand(&lseed) & 1)) { in fuzzerTests_newAPI()
2375 { U32 const nbNoiseChunks = (FUZ_rand(&lseed) & 7) + 2; in fuzzerTests_newAPI()
2379 size_t const noiseStart = FUZ_rand(&lseed) % (srcBufferSize - noiseSize); in fuzzerTests_newAPI()
2380 size_t const cStart = FUZ_rand(&lseed) % (cSize - noiseSize); in fuzzerTests_newAPI()