fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] generic/566:  skip this test if -f option is non-supported
@ 2019-09-09 10:14 Yang Xu
  2019-09-10  4:28 ` Murphy Zhou
  0 siblings, 1 reply; 3+ messages in thread
From: Yang Xu @ 2019-09-09 10:14 UTC (permalink / raw)
  To: fstests; +Cc: darrick.wong, Yang Xu

This test will use xfs_quota -f option, this option was introduced
since xfsprogs v4.10.0-rc1. On old version, we should skip this case.

Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
 tests/generic/566 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/generic/566 b/tests/generic/566
index e8491e54..173974ad 100755
--- a/tests/generic/566
+++ b/tests/generic/566
@@ -34,6 +34,7 @@ _supported_os Linux
 _supported_fs generic
 _require_scratch
 _require_quota
+_require_xfs_quota_foreign
 _require_user
 
 rm -f $seqres.full
-- 
2.18.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2] generic/566: use _require_xfs_quota_foreign and remove -f option
  2019-09-10  4:28 ` Murphy Zhou
@ 2019-09-09 22:11   ` Yang Xu
  0 siblings, 0 replies; 3+ messages in thread
From: Yang Xu @ 2019-09-09 22:11 UTC (permalink / raw)
  To: fstests; +Cc: Yang Xu

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>
---
 tests/generic/566 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/generic/566 b/tests/generic/566
index e8491e54..44f71cce 100755
--- a/tests/generic/566
+++ b/tests/generic/566
@@ -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
-- 
2.18.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] generic/566:  skip this test if -f option is non-supported
  2019-09-09 10:14 [PATCH] generic/566: skip this test if -f option is non-supported Yang Xu
@ 2019-09-10  4:28 ` Murphy Zhou
  2019-09-09 22:11   ` [PATCH v2] generic/566: use _require_xfs_quota_foreign and remove -f option Yang Xu
  0 siblings, 1 reply; 3+ messages in thread
From: Murphy Zhou @ 2019-09-10  4:28 UTC (permalink / raw)
  To: Yang Xu; +Cc: fstests, darrick.wong

On Mon, Sep 09, 2019 at 06:14:46PM +0800, Yang Xu wrote:
> This test will use xfs_quota -f option, this option was introduced
> since xfsprogs v4.10.0-rc1. On old version, we should skip this case.

Tested and ack.

Thanks!

> 
> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
> ---
>  tests/generic/566 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/generic/566 b/tests/generic/566
> index e8491e54..173974ad 100755
> --- a/tests/generic/566
> +++ b/tests/generic/566
> @@ -34,6 +34,7 @@ _supported_os Linux
>  _supported_fs generic
>  _require_scratch
>  _require_quota
> +_require_xfs_quota_foreign
>  _require_user
>  
>  rm -f $seqres.full
> -- 
> 2.18.1
> 
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-11  3:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-09 10:14 [PATCH] generic/566: skip this test if -f option is non-supported Yang Xu
2019-09-10  4:28 ` Murphy Zhou
2019-09-09 22:11   ` [PATCH v2] generic/566: use _require_xfs_quota_foreign and remove -f option Yang Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).