diff --git a/programs/fileio.c b/programs/fileio.c index d5b389e1e..b1d2a2415 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -1754,8 +1754,19 @@ int FIO_decompressMultipleFilenames(const char** srcNamesTable, unsigned nbFiles && strcmp(suffixPtr, ZSTD_EXTENSION) && strcmp(suffixPtr, LZMA_EXTENSION) && strcmp(suffixPtr, LZ4_EXTENSION)) ) { - DISPLAYLEVEL(1, "zstd: %s: unknown suffix (%s/%s/%s/%s/%s expected) -- ignored \n", - srcFileName, GZ_EXTENSION, XZ_EXTENSION, ZSTD_EXTENSION, LZMA_EXTENSION, LZ4_EXTENSION); + const char* suffixlist = ZSTD_EXTENSION + #ifdef ZSTD_GZCOMPRESS + "/" GZ_EXTENSION + #endif + #ifdef ZSTD_LZMACOMPRESS + "/" XZ_EXTENSION "/" LZMA_EXTENSION + #endif + #ifdef ZSTD_LZ4COMPRESS + "/" LZ4_EXTENSION + #endif + ; + DISPLAYLEVEL(1, "zstd: %s: unknown suffix (%s expected) -- ignored \n", + srcFileName, suffixlist); skippedFiles++; continue; } else { diff --git a/tests/playTests.sh b/tests/playTests.sh index e0779ad2c..48001c2eb 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -632,6 +632,23 @@ else $ECHO "lz4 mode not supported" fi +$ECHO "\n===> suffix list test" + +! $ZSTD -d tmp.abc 2> tmplg + +if [ $GZIPMODE -ne 1 ]; then + grep ".gz" tmplg > $INTOVOID && die "Unsupported suffix listed" +fi + +if [ $LZMAMODE -ne 1 ]; then + grep ".lzma" tmplg > $INTOVOID && die "Unsupported suffix listed" + grep ".xz" tmplg > $INTOVOID && die "Unsupported suffix listed" +fi + +if [ $LZ4MODE -ne 1 ]; then + grep ".lz4" tmplg > $INTOVOID && die "Unsupported suffix listed" +fi + $ECHO "\n===> zstd round-trip tests " roundTripTest