mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfstests: fix _filter_ro_mount and make xfs/200 pass with old mount
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>
This commit is contained in:
+1
-1
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user