From: Nick Terrell Date: Tue, 27 Aug 2019 01:32:08 +0000 (-0700) Subject: [test][dictBuilder] Add multithreaded tests X-Git-Tag: v1.4.4~1^2~70^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=793c71d6aeb775dddc8f8825d36d88fc495cc8c1;p=thirdparty%2Fzstd.git [test][dictBuilder] Add multithreaded tests --- diff --git a/tests/playTests.sh b/tests/playTests.sh index ad096fddd..19fc514f6 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -526,6 +526,15 @@ $ZSTD -o tmpDict --train "$TESTDIR"/*.c "$PRGDIR"/*.c test -f tmpDict $ZSTD --train "$TESTDIR"/*.c "$PRGDIR"/*.c test -f dictionary +println "- Test dictionary training fails" +echo "000000000000000000000000000000000" > tmpz +$ZSTD --train tmpz tmpz tmpz tmpz tmpz tmpz tmpz tmpz tmpz && die "Dictionary training should fail : source is all zeros" +if [ -n "$hasMT" ] +then + $ZSTD --train -T0 tmpz tmpz tmpz tmpz tmpz tmpz tmpz tmpz tmpz && die "Dictionary training should fail : source is all zeros" + println "- Create dictionary with multithreading enabled" + $ZSTD --train -T0 "$TESTDIR"/*.c "$PRGDIR"/*.c -o tmpDict +fi rm tmp* dictionary