On Wed, Nov 27, 2019 at 01:06:41PM +0100, Jan Kara wrote: > 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). Heh, yes, I deliberately make the test dir and scratch mounts readonly so that mount failures show up as errors. Usually I catch it, but this time I saw the previous line and was too hasty. > 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... Ok. I'll do that. --D > > 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