From c18374bb16ecea2a34d003be769bf14b7e97b931 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Mon, 10 Mar 2025 13:40:47 -0700 Subject: [PATCH] add test checks that ZSTD_NBTHREADS triggers the expected verbose message Also: checked that the new test script fails on current `dev` branch, and is fixed by this branch --- tests/playTests.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/playTests.sh b/tests/playTests.sh index 65aa5c0b1..366f9c741 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -1570,7 +1570,11 @@ then ZSTD_NBTHREADS=3a7 zstd -f mt_tmp # malformed env var, warn and revert to default setting ZSTD_NBTHREADS=50000000000 zstd -f mt_tmp # numeric value too large, warn and revert to default setting= ZSTD_NBTHREADS=2 zstd -f mt_tmp # correct usage - ZSTD_NBTHREADS=1 zstd -f mt_tmp # correct usage: single thread + ZSTD_NBTHREADS=1 zstd -f mt_tmp # correct usage: single worker + ZSTD_NBTHREADS=4 zstd -f mt_tmp -vv 2>&1 | grep "4 worker threads" # check message + zstd -tq mt_tmp.zst + ZSTD_NBTHREADS=0 zstd -f mt_tmp -vv 2>&1 | grep "core(s) detected" # check core count autodetection is triggered + zstd -tq mt_tmp.zst # temporary envvar changes in the above tests would actually persist in macos /bin/sh unset ZSTD_NBTHREADS rm -f mt_tmp*