From: Eric Sandeen <sandeen@redhat.com>
To: "fstests@vger.kernel.org" <fstests@vger.kernel.org>
Subject: [PATCH] xfs/032: properly test for corruption from xfs_copy
Date: Thu, 14 May 2015 10:32:32 -0500 [thread overview]
Message-ID: <5554C010.7020300@redhat.com> (raw)
>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));
next reply other threads:[~2015-05-14 15:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-14 15:32 Eric Sandeen [this message]
2015-05-15 6:15 ` [PATCH] xfs/032: properly test for corruption from xfs_copy Eryu Guan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5554C010.7020300@redhat.com \
--to=sandeen@redhat.com \
--cc=fstests@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.