ensure that benchmark mode can only be invoked with zstd format

fix #3463
This commit is contained in:
Yann Collet
2023-01-31 09:04:29 -08:00
parent 4794bbfe00
commit af09777b24
2 changed files with 30 additions and 14 deletions
+6
View File
@@ -1218,6 +1218,12 @@ println "benchmark decompression only"
zstd -f tmp1
zstd -b -d -i0 tmp1.zst
GZIPMODE=1
zstd --format=gzip -V || GZIPMODE=0
if [ $GZIPMODE -eq 1 ]; then
println "benchmark mode is only compatible with zstd"
zstd --format=gzip -b tmp1 && die "-b should be incompatible with gzip format!"
fi
println "\n===> zstd compatibility tests "