From 6cce8575a5d588295e6bf57d0e080027d8d173e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ernesto=20A=2E=20Fern=C3=A1ndez?= Date: Wed, 2 Aug 2017 01:19:34 -0300 Subject: [PATCH] generic/449: make the test effective against xfs MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- tests/generic/449 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.39.5