All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs/032: properly test for corruption from xfs_copy
@ 2015-05-14 15:32 Eric Sandeen
  2015-05-15  6:15 ` Eryu Guan
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2015-05-14 15:32 UTC (permalink / raw)
  To: fstests

>From the xfs_repair manpage:

    xfs_repair run without the -n option will always return
    a status code of 0.

So we must use "-n" to detect corruption in this test.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
	

diff --git a/tests/xfs/032 b/tests/xfs/032
index 60c4662..a3fb89f 100755
--- a/tests/xfs/032
+++ b/tests/xfs/032
@@ -68,7 +68,8 @@ while [ $SECTORSIZE -le $PAGESIZE ]; do
 
 		$XFS_COPY_PROG -d $SCRATCH_DEV $IMGFILE >> $seqres.full 2>&1 || \
 			_fail "Copy failed for Sector size $SECTORSIZE Block size $BLOCKSIZE"
-		$XFS_REPAIR_PROG $IMGFILE >> $seqres.full 2>&1 || \
+		# Must use "-n" to get exit code; without it xfs_repair always returns 0
+		$XFS_REPAIR_PROG -n $IMGFILE >> $seqres.full 2>&1 || \
 			_fail "Copy corrupted for Sector size $SECTORSIZE Block size $BLOCKSIZE"
 
 		BLOCKSIZE=$(($BLOCKSIZE * 2));


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-15  6:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-14 15:32 [PATCH] xfs/032: properly test for corruption from xfs_copy Eric Sandeen
2015-05-15  6:15 ` Eryu Guan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.