xfstests: fix _filter_ro_mount and make xfs/200 pass with old mount
authorEryu Guan <eguan@redhat.com>
Thu, 31 Oct 2013 10:55:16 +0000 (10:55 +0000)
committerRich Johnston <rjohnston@sgi.com>
Mon, 4 Nov 2013 20:34:04 +0000 (14:34 -0600)
We just want to remove "block device" in _filter_ro_mount(), so add
"mount:" back.

Add one more call of _filter_ro_mount() in xfs/200 to match 200.out.

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
common/filter
tests/xfs/200

index 2390ec0dca9e46c26649ca99a3c06d7f57f6c40e..e37ce690cdd1211abeb19b36f299917725f0f827 100644 (file)
@@ -308,7 +308,7 @@ _filter_fstrim()
 # Older mount output referred to "block device" when mounting RO devices
 # It's gone in newer versions
 _filter_ro_mount() {
-       sed -e "s/mount: block device//g" \
+       sed -e "s/mount: block device/mount:/g" \
            -e "s/mount: cannot mount block device/mount: cannot mount/g"
 }
 
index f573481fd9bf11f83610286d11506b7079a06f2d..f4db64f648c3b52b77e5e4f5eb6d90e286df337f 100755 (executable)
@@ -58,7 +58,7 @@ blockdev --setro $SCRATCH_DEV
 # Mount it, and make sure we can't write to it, and we can unmount it again
 #
 echo "mounting read-only block device:"
-_scratch_mount 2>&1 | _filter_scratch
+_scratch_mount 2>&1 | _filter_scratch | _filter_ro_mount
 
 echo "touching file on read-only filesystem (should fail)"
 touch $SCRATCH_MNT/foo 2>&1 | _filter_scratch