mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
fstests: filter readonly mount error messages
util-linux commit 6dede2f2f7c5 ("libmount: support MS_RDONLY on
write-protected devices") changed the error message on read-only
block device, and in the failure case printed one line message
instead of two (for details please see comments in common/filter),
and this change broke generic/050 and overlay/035.
Fix it by adding more filter rules to _filter_ro_mount and updating
associated .out files to unify the output from both old and new
util-linux versions.
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
+2
-2
@@ -69,7 +69,7 @@ mkdir -p $lowerdir1 $lowerdir2 $upperdir $workdir
|
||||
$MOUNT_PROG -t overlay -o"lowerdir=$lowerdir2:$lowerdir1" \
|
||||
$OVL_BASE_SCRATCH_MNT $SCRATCH_MNT
|
||||
touch $SCRATCH_MNT/foo 2>&1 | _filter_scratch
|
||||
_scratch_remount rw 2>&1 | _filter_scratch
|
||||
_scratch_remount rw 2>&1 | _filter_ro_mount
|
||||
$UMOUNT_PROG $SCRATCH_MNT
|
||||
|
||||
# Make workdir immutable to prevent workdir re-create on mount
|
||||
@@ -79,7 +79,7 @@ $CHATTR_PROG +i $workdir
|
||||
# Verify that overlay is mounted read-only and that it cannot be remounted rw.
|
||||
_overlay_scratch_mount_dirs $lowerdir2 $upperdir $workdir
|
||||
touch $SCRATCH_MNT/bar 2>&1 | _filter_scratch
|
||||
_scratch_remount rw 2>&1 | _filter_scratch
|
||||
_scratch_remount rw 2>&1 | _filter_ro_mount
|
||||
|
||||
# success, all done
|
||||
status=0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
QA output created by 035
|
||||
touch: cannot touch 'SCRATCH_MNT/foo': Read-only file system
|
||||
mount: cannot remount SCRATCH_DEV read-write, is write-protected
|
||||
mount: cannot remount device read-write, is write-protected
|
||||
touch: cannot touch 'SCRATCH_MNT/bar': Read-only file system
|
||||
mount: cannot remount SCRATCH_DEV read-write, is write-protected
|
||||
mount: cannot remount device read-write, is write-protected
|
||||
|
||||
Reference in New Issue
Block a user