From: Yann Collet Date: Fri, 23 Jun 2017 07:09:02 +0000 (-0700) Subject: zstreamtest : disabled multi-threading tests with --newapi --no-big-tests X-Git-Tag: v1.3.0~1^2~17^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32f546c7630f9c1c3219c297225a4d6c15815b4a;p=thirdparty%2Fzstd.git zstreamtest : disabled multi-threading tests with --newapi --no-big-tests --no-big-tests is typically used in combination with qemu-user-static qemu-user-static allocated 4 GB of RAM upfront. On 2 GB VM, this can degenerate into a crash. It's not a problem as long as memory is not used. But with multi-threading enabled, memory fragmentation kicks in, so the amoung of RAM effectively touched increases, and can pass beyond the 2 GB limit of the VM. In single-threaded mode, there is no such issue : memory requirement is smaller, and remains well-located, so very little fragmentation is expected. This modification should make `qemu-arm-static zstreamtests --newapi --no-big-tests` work fine on Travis CI. --- diff --git a/tests/zstreamtest.c b/tests/zstreamtest.c index 3ab8d0537..33ed11f93 100644 --- a/tests/zstreamtest.c +++ b/tests/zstreamtest.c @@ -1193,7 +1193,7 @@ static int fuzzerTests_newAPI(U32 seed, U32 nbTests, unsigned startTest, double size_t dictSize = 0; U32 oldTestLog = 0; U32 const cLevelMax = bigTests ? (U32)ZSTD_maxCLevel() : g_cLevelMax_smallTests; - U32 const nbThreadsMax = bigTests ? 5 : 2; + U32 const nbThreadsMax = bigTests ? 5 : 1; /* allocations */ cNoiseBuffer[0] = (BYTE*)malloc (srcBufferSize);