common: always pass -f to $DUMP_COMPRESSOR

If the test runner gave us the name of a program to use to compress
dumps, always pass -f to overwrite older compressed images, like the
documentation says we do. This prevents the test suite from stalling on
"foo.md.gz exists, overwrite?" prompts.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Darrick J. Wong
2021-05-11 19:02:08 -07:00
committed by Eryu Guan
parent 98dff757fc
commit 0df636ef78
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -628,7 +628,7 @@ _ext4_metadump()
test -n "$E2IMAGE_PROG" || _fail "e2image not installed" test -n "$E2IMAGE_PROG" || _fail "e2image not installed"
$E2IMAGE_PROG -Q "$device" "$dumpfile" $E2IMAGE_PROG -Q "$device" "$dumpfile"
[ "$compressopt" = "compress" ] && [ -n "$DUMP_COMPRESSOR" ] && [ "$compressopt" = "compress" ] && [ -n "$DUMP_COMPRESSOR" ] &&
$DUMP_COMPRESSOR "$dumpfile" &>> "$seqres.full" $DUMP_COMPRESSOR -f "$dumpfile" &>> "$seqres.full"
} }
_test_mkfs() _test_mkfs()
+1 -1
View File
@@ -478,7 +478,7 @@ _xfs_metadump() {
$XFS_METADUMP_PROG $options "$device" "$metadump" $XFS_METADUMP_PROG $options "$device" "$metadump"
res=$? res=$?
[ "$compressopt" = "compress" ] && [ -n "$DUMP_COMPRESSOR" ] && [ "$compressopt" = "compress" ] && [ -n "$DUMP_COMPRESSOR" ] &&
$DUMP_COMPRESSOR "$metadump" &> /dev/null $DUMP_COMPRESSOR -f "$metadump" &> /dev/null
return $res return $res
} }