On Wed, Aug 02, 2017 at 01:19:34AM -0300, Ernesto A. Fernández wrote: > Setting acls on an xfs filesystem will succeed even after running out > of space for user attributes. Use trusted attributes instead. Also speed > up the test by setting large values for the attributes. > > Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@xxxxxxxxx> > --- > Changes in v2: > - The check for xfs actually worked for all filesystems, as Eryu Guan > noticed. So the test is now much more straightforward. Thanks for the update! > > tests/generic/449 | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/tests/generic/449 b/tests/generic/449 > index fb776b3..f5aad22 100755 > --- a/tests/generic/449 > +++ b/tests/generic/449 > @@ -66,9 +66,17 @@ touch $TFILE > chmod u+rwx $TFILE > chmod go-rwx $TFILE > > +# The content of this file will be used as the value of the attributes > +VFILE=$SCRATCH_MNT/valuefile > +touch $VFILE > +$XFS_IO_PROG -c "pwrite -S 0x2E 0 1k" $VFILE >>$seqres.full 2>&1 > + I think this VFILE is not needed, because .. > # Try to run out of space so setfacl will fail > $XFS_IO_PROG -c "pwrite 0 50m" $TFILE >>$seqres.full 2>&1 > i=1 > +while $SETFATTR_PROG -n trusted.$i -v $(cat $VFILE) $TFILE &>/dev/null; do we can use something like $(perl -e 'print "a"x1024') to generate 1k attr value. I can fix it at commit time if this looks OK to you. Thanks, Eryu > + ((++i)) > +done > j=1 > ret=0 > while [ $ret -eq 0 ]; do > @@ -77,7 +85,7 @@ while [ $ret -eq 0 ]; do > # On btrfs, setfattr will sometimes fail when free space is > # low, long before it's actually exhausted. Insist until it > # fails consistently. > - $SETFATTR_PROG -n user.$i"x"$j $TFILE &>/dev/null > + $SETFATTR_PROG -n trusted.$i"x"$j $TFILE &>/dev/null > ret=$(( $ret && $? )) > ((++j)) > done > -- > 2.1.4 > > > -- > To unsubscribe from this list: send the line "unsubscribe fstests" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html