mirror of
https://github.com/facebook/zstd.git
synced 2025-12-04 23:42:37 +03:00
Merge pull request #1159 from GeorgeLu97/suffixlist
Unknown Suffix Error
This commit is contained in:
@@ -1754,8 +1754,19 @@ int FIO_decompressMultipleFilenames(const char** srcNamesTable, unsigned nbFiles
|
|||||||
&& strcmp(suffixPtr, ZSTD_EXTENSION)
|
&& strcmp(suffixPtr, ZSTD_EXTENSION)
|
||||||
&& strcmp(suffixPtr, LZMA_EXTENSION)
|
&& strcmp(suffixPtr, LZMA_EXTENSION)
|
||||||
&& strcmp(suffixPtr, LZ4_EXTENSION)) ) {
|
&& strcmp(suffixPtr, LZ4_EXTENSION)) ) {
|
||||||
DISPLAYLEVEL(1, "zstd: %s: unknown suffix (%s/%s/%s/%s/%s expected) -- ignored \n",
|
const char* suffixlist = ZSTD_EXTENSION
|
||||||
srcFileName, GZ_EXTENSION, XZ_EXTENSION, ZSTD_EXTENSION, LZMA_EXTENSION, LZ4_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++;
|
skippedFiles++;
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -632,6 +632,23 @@ else
|
|||||||
$ECHO "lz4 mode not supported"
|
$ECHO "lz4 mode not supported"
|
||||||
fi
|
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 "
|
$ECHO "\n===> zstd round-trip tests "
|
||||||
|
|
||||||
roundTripTest
|
roundTripTest
|
||||||
|
|||||||
Reference in New Issue
Block a user