diff mbox series

[5/8] common: always pass -f to $DUMP_COMPRESSOR

Message ID 162078492804.3302755.5107477157116858438.stgit@magnolia (mailing list archive)
State New, archived
Headers show
Series fstests: miscellaneous fixes | expand

Commit Message

Darrick J. Wong May 12, 2021, 2:02 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

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>
---
 common/rc  |    2 +-
 common/xfs |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/common/rc b/common/rc
index 919028ef..b18cf61e 100644
--- 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()
diff --git a/common/xfs b/common/xfs
index 49bd6c31..add33008 100644
--- a/common/xfs
+++ b/common/xfs
@@ -503,7 +503,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
 }