Re: [PATCH] generic/050: fix xfsquota configuration failures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue 26-11-19 20:15:38, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> 
> The new 'xfsquota' configuration for generic/050 doesn't filter out
> SCRATCH_MNT properly and seems to be missing an error message in the
> golden output.  Fix both of these problems.
> 
> Fixes: e088479871 ("generic/050: Handle xfs quota special case with different output")
> Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

Umm, I can see how I messed up the SCRATCH_MNT filtering and didn't notice
- thanks for fixing that. But the error message should not be there. The
previous mount completely failed so we end up touching file on the parent
filesystem which succeeds (well, unless the parent filesystem is read-only
as well). So to avoid this obscure behavior, we should add something like
(untested):

diff --git a/tests/generic/050 b/tests/generic/050
index cf2b93814267..593e2e69bf9a 100755
--- a/tests/generic/050
+++ b/tests/generic/050
@@ -59,8 +59,10 @@ blockdev --setro $SCRATCH_DEV
 #
 echo "mounting read-only block device:"
 _try_scratch_mount 2>&1 | _filter_ro_mount
-echo "touching file on read-only filesystem (should fail)"
-touch $SCRATCH_MNT/foo 2>&1 | _filter_scratch
+if [ "${PIPESTATUS[0]}" -eq 0 ]; then
+       echo "touching file on read-only filesystem (should fail)"
+       touch $SCRATCH_MNT/foo 2>&1 | _filter_scratch
+fi

and update xfsquota output accordingly...

								Honza
> @@ -1,8 +1,9 @@
>  QA output created by 050
>  setting device read-only
>  mounting read-only block device:
> -mount: /mnt-scratch: permission denied
> +mount: SCRATCH_MNT: permission denied
>  touching file on read-only filesystem (should fail)
> +touch: cannot touch 'SCRATCH_MNT/foo': Read-only file system
>  unmounting read-only filesystem
>  umount: SCRATCH_DEV: not mounted
>  setting device read-write
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux