* [PATCH] xfs/005: sync superblock modification to disk before mount test
@ 2014-09-16 18:46 Eric Sandeen
0 siblings, 0 replies; only message in thread
From: Eric Sandeen @ 2014-09-16 18:46 UTC (permalink / raw)
To: fstests
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-09-16 18:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-16 18:46 [PATCH] xfs/005: sync superblock modification to disk before mount test Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox