From: Ernesto A. Fernández Date: Wed, 2 Aug 2017 04:19:34 +0000 (-0300) Subject: generic/449: make the test effective against xfs X-Git-Tag: v2022.05.01~1932 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6cce8575a5d588295e6bf57d0e080027d8d173e0;p=xfstests-dev.git generic/449: make the test effective against xfs 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. [eguan: use perl to generate attr value, and add comments on trusted namespace] Signed-off-by: Ernesto A. Fernández Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/tests/generic/449 b/tests/generic/449 index fb776b37..2326a731 100755 --- a/tests/generic/449 +++ b/tests/generic/449 @@ -69,6 +69,12 @@ chmod go-rwx $TFILE # Try to run out of space so setfacl will fail $XFS_IO_PROG -c "pwrite 0 50m" $TFILE >>$seqres.full 2>&1 i=1 + +# Setting acls on an xfs filesystem will succeed even after running out of +# space for user attributes. Use trusted attributes +while $SETFATTR_PROG -n trusted.$i -v $(perl -e 'print "a"x1024') $TFILE &>/dev/null; do + ((++i)) +done j=1 ret=0 while [ $ret -eq 0 ]; do @@ -77,7 +83,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