xfs
[Top] [All Lists]

[PATCH] xfstests: fix _filter_ro_mount and make xfs/200 pass with old mo

To: xfs@xxxxxxxxxxx
Subject: [PATCH] xfstests: fix _filter_ro_mount and make xfs/200 pass with old mount
From: Eryu Guan <eguan@xxxxxxxxxx>
Date: Thu, 31 Oct 2013 18:55:16 +0800
Cc: Eryu Guan <eguan@xxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
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@xxxxxxxxxx>
---
 common/filter | 2 +-
 tests/xfs/200 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/filter b/common/filter
index 2390ec0..e37ce69 100644
--- a/common/filter
+++ b/common/filter
@@ -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"
 }
 
diff --git a/tests/xfs/200 b/tests/xfs/200
index f573481..f4db64f 100755
--- a/tests/xfs/200
+++ b/tests/xfs/200
@@ -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
-- 
1.8.3.1

<Prev in Thread] Current Thread [Next in Thread>