generic/566: use _require_xfs_quota_foreign to replace the hard -f option
PATCH 1/1 generic/566: use _require_xfs_quota_foreign to replace the hard -f option
xfstests should decide if xfs_quota need 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.
--- tests/generic/566 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tests/generic/566 +2 -1
@@ -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,7 +46,7 @@ _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"
Signature · 1 line
2.20.1
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Yang/徐 杨
Quoted 4 lines · Zorro Lang
xfstests should decide if
xfs_quotaneed 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.Hi Zorro
Quoted 7 lines
I also sent a patch[1] about
_require_xfs_quota_foreignbut i miss $XFS_QUOTA_PROG have used -f option for non-xfs filesystem. And you may forget to modify the last $XFS_QUOTA_PRO. As below:$XFS_QUOTA_PROG -x -f -c 'report -hag' $SCRATCH_MNT >> $seqres.full
Oh, I didn't notice that, we sent the patch nearly same time. As you've sent a patch, you can keep working on that, ignore this patch.
But the '-f' options in the case must be removed, or the case will fail on RHEL-7 XFS. Due rhel7 xfsprogs doesn't support -f option, but _require_xfs_quota_foreign won't _notrun if the FSTYP is xfs.
Thanks,
Zorro
Quoted 31 lines
Thanks
Yang XuQuoted 25 lines
Signed-off-by Zorro Lang <[email protected]>--- tests/generic/566 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tests/generic/566 +2
-1@@ -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,7 +46,7 @@ _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"