From: Björn Ketelaars Date: Mon, 11 Feb 2019 10:49:35 +0000 (+0100) Subject: 'head -c BYTES' is non-portable. X-Git-Tag: v1.4.0^2~39^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b26c53b0d0560d58b8222df5e889fe39eaec7ecb;p=thirdparty%2Fzstd.git 'head -c BYTES' is non-portable. Pull request #1499 added a new test, which uses 'head -c'. The '-c' option is non-portable (not in POSIX). Instead use 'dd'. Similar issue has been resolved in the past (#1321). --- diff --git a/tests/playTests.sh b/tests/playTests.sh index 8342455a1..6e5582df7 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -815,7 +815,7 @@ FULL_COMPRESSED_FILE=${TEST_DATA_FILE}.zst TRUNCATED_COMPRESSED_FILE=truncated-input.txt.zst ./datagen -g50000 > $TEST_DATA_FILE $ZSTD -f $TEST_DATA_FILE -o $FULL_COMPRESSED_FILE -head -c 100 $FULL_COMPRESSED_FILE > $TRUNCATED_COMPRESSED_FILE +dd bs=1 count=100 if=$FULL_COMPRESSED_FILE of=$TRUNCATED_COMPRESSED_FILE status=none $ZSTD --list $TRUNCATED_COMPRESSED_FILE && die "-l must fail on truncated file" rm $TEST_DATA_FILE