From: Eric Sandeen <sandeen@redhat.com>
To: fstests@vger.kernel.org
Subject: [PATCH] xfs/005: sync superblock modification to disk before mount test
Date: Tue, 16 Sep 2014 13:46:11 -0500 [thread overview]
Message-ID: <54188573.3070907@redhat.com> (raw)
This test tries to directly corrupt the CRC field of the primary
superblock by using xfs_io pwrite, but never syncs it to disk,
so it's quite likely that the mount will not see the bad data.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/tests/xfs/005 b/tests/xfs/005
index 5d4534b..fade4bb 100755
--- a/tests/xfs/005
+++ b/tests/xfs/005
@@ -61,7 +61,7 @@ rm -f $seqres.full
_scratch_mkfs_xfs -m crc=1 >> $seqres.full 2>&1 || _fail "mkfs failed"
# Zap the crc. xfs_db updates the CRC post-write, so poke it directly
-$XFS_IO_PROG -c "pwrite 224 4" $SCRATCH_DEV | _filter_xfs_io
+$XFS_IO_PROG -c "pwrite 224 4" -c fsync $SCRATCH_DEV | _filter_xfs_io
# should FAIL, the crc is bad; golden output contains mount failure
_scratch_mount 2>&1 | filter_mount
reply other threads:[~2014-09-16 18:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=54188573.3070907@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox