common: always pass -f to $DUMP_COMPRESSOR
authorDarrick J. Wong <djwong@kernel.org>
Wed, 12 May 2021 02:02:08 +0000 (19:02 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 16 May 2021 15:55:43 +0000 (23:55 +0800)
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>
common/rc
common/xfs

index 919028e..b18cf61 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -628,7 +628,7 @@ _ext4_metadump()
        test -n "$E2IMAGE_PROG" || _fail "e2image not installed"
        $E2IMAGE_PROG -Q "$device" "$dumpfile"
        [ "$compressopt" = "compress" ] && [ -n "$DUMP_COMPRESSOR" ] &&
-               $DUMP_COMPRESSOR "$dumpfile" &>> "$seqres.full"
+               $DUMP_COMPRESSOR -f "$dumpfile" &>> "$seqres.full"
 }
 
 _test_mkfs()
index 0ec5b03..725819b 100644 (file)
@@ -478,7 +478,7 @@ _xfs_metadump() {
        $XFS_METADUMP_PROG $options "$device" "$metadump"
        res=$?
        [ "$compressopt" = "compress" ] && [ -n "$DUMP_COMPRESSOR" ] &&
-               $DUMP_COMPRESSOR "$metadump" &> /dev/null
+               $DUMP_COMPRESSOR -f "$metadump" &> /dev/null
        return $res
 }