generic/566: use _require_xfs_quota_foreign and remove -f option
authorYang Xu <xuyang2018.jy@cn.fujitsu.com>
Mon, 9 Sep 2019 22:11:43 +0000 (06:11 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 15 Sep 2019 04:39:41 +0000 (12:39 +0800)
xfstests should decide if xfs_quota needs the -f option by
_require_xfs_quota_foreign, not write the -f option after
$XFS_QUOTA_PROG manually. The later way will cause unexpected error
on an old system which xfsprogs doesn't support the -f option.

Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Tested-by: Murphy Zhou <jencce.kernel@gmail.com>
Acked-by: Murphy Zhou <jencce.kernel@gmail.com>
Acked-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/566

index e8491e542c79a7dceac59bce762ca87176297746..44f71cce876d700500e8cb6035c727b1961b65df 100755 (executable)
@@ -34,6 +34,7 @@ _supported_os Linux
 _supported_fs generic
 _require_scratch
 _require_quota
+_require_xfs_quota_foreign
 _require_user
 
 rm -f $seqres.full
@@ -45,13 +46,13 @@ _qmount
 dir="$SCRATCH_MNT/dummy"
 mkdir -p $dir
 chown $qa_user $dir
-$XFS_QUOTA_PROG -x -f -c "limit -g bsoft=100k bhard=100k $qa_user" $SCRATCH_MNT
+$XFS_QUOTA_PROG -x -c "limit -g bsoft=100k bhard=100k $qa_user" $SCRATCH_MNT
 
 $XFS_IO_PROG -f -c 'pwrite -S 0x58 0 1m' $dir/foo >> $seqres.full
 chown $qa_user "${dir}/foo"
 _user_do "chgrp $qa_user ${dir}/foo" 2>&1 | _filter_scratch
 ls -la ${dir} >> $seqres.full
-$XFS_QUOTA_PROG -x -f -c 'report -hag' $SCRATCH_MNT >> $seqres.full
+$XFS_QUOTA_PROG -x -c 'report -hag' $SCRATCH_MNT >> $seqres.full
 
 # success, all done
 status=0