From 32f546c7630f9c1c3219c297225a4d6c15815b4a Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Fri, 23 Jun 2017 00:09:02 -0700 Subject: [PATCH] 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. --- tests/zstreamtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/zstreamtest.c b/tests/zstreamtest.c index 3ab8d053..33ed11f9 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);