public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 2/5] syscalls/quotactl02.c: Add Q_XGETQSTATV test
Date: Mon, 18 Nov 2019 09:25:10 +0100	[thread overview]
Message-ID: <20191118082510.GA8415@dell5510> (raw)
In-Reply-To: <791f40c927114eb8b9ce5320d8c33447@G08CNEXMBPEKD04.g08.fujitsu.local>

Hi Xu,

> > >Q_XGETQSTATV returns XFS filesystem-specific quota information in the 
> > >fs_quota_statv pointed to by addr. The qs_version field of the 
> > >structure should be filled with the version of the structure supported 
> > >by the caller (for now, only FS_QSTAT_VERSION1 is supported).
> >nit: one would think you add 1 test case. But you added 8 test cases, all of them are XFS related, but only 4 related to Q_XGETQSTATV.
> For user quota, I add 2 test cases to use Q_XGETQSTATV to get status for Q_XQUOTAOFF and Q_XQUOTAOFF . 
> Also, I add group quota for this case as quotactl01.c.  so I add 8 (2+6) test cases.  I will update group coverage in commit info. 

> Ps: I want to use Q_XGETQSTAT to test  Q_XQUOTAOFF, Q_XGETQSTATV to test Q_XQUOTAON. So it can be only 8 test cases. But Q_XGETQSTATV
> is introduced since v3.12-rc1 commit[1]. We should use a pair (on,off )to test Q_XGETQSTATV.

> [1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5d5e3d57605e77708685e8d20a40fe86891db299
Thanks for info.

> >> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
> >Reviewed-by: Petr Vorel <pvorel@suse.cz> Nice work, thanks!
> Thanks for your review.

> >>Nit: I'd just extract quotactl02.h later in the commit, where the code needs to be reused (i.e. in 0cc1dc512 ("syscalls/quotactl05: add project quota test for xfs filesystem")) or at least mention why you do it now.
> I will mention it in commit info.
OK, I'll review the rest of v3 and wait for v4.

> >> +++ b/testcases/kernel/syscalls/quotactl/quotactl02.c
> >...
> >> +#if defined(HAVE_STRUCT_FS_QUOTA_STATV)
> >> +	{QCMD(Q_XQUOTAOFF, GRPQUOTA), &qflagg, check_qoffv,
> >> +	QCMD(Q_XGETQSTATV, GRPQUOTA), 1,
> > >+	"turn off xfs quota and get xfs quota off statv for group"},

> >> -	tst_res(TPASS, "quoactl() succeeded to set and use %s to get xfs disk quota limits",
> > >-			desp);
> > >-}
> > >+	{QCMD(Q_XQUOTAON, GRPQUOTA), &qflagg, check_qonv,
> > >+	QCMD(Q_XGETQSTATV, GRPQUOTA), 1,
> > >+	"turn on xfs quota and get xfs quota on statv for group"}, #endif };
> >Hm, we don't report some TCONF: Q_XGETQSTATV not supported.
> >But that's probably not important
> This cmd was introduced since 2013,  I think we should check it. Also,  if we 
> Use a new kernel but boot with a older kernel header, HAVE_STRUCT_FS_QUOTA_STATV may be undefined.
> But in kernel, it is implemented. So I think we may define a fs_quota_statv struct in ltp, so we can detect whether Q_XGETQSTAT is implemented. 
> What do you think about it?
+1, IMHO this makes sense.

Kind regards,
Petr

  reply	other threads:[~2019-11-18  8:25 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-23  9:00 [LTP] [PATCH v2 0/6] optimize quotactl test code Yang Xu
2019-10-23  9:00 ` [LTP] [PATCH v2 1/6] syscalls/quotactl: Don't use ltp-quota.m4 Yang Xu
2019-10-31 14:02   ` Petr Vorel
2019-10-23  9:00 ` [LTP] [PATCH v2 2/6] m4/ltp-xfs_quota.m4: Remove useless ltp—xfs_quota.m4 Yang Xu
2019-10-31 15:26   ` Petr Vorel
2019-11-01 12:55     ` [LTP] [PATCH v3 0/5] optimize quotactl test code Yang Xu
2019-11-01 12:55       ` [LTP] [PATCH v3 1/5] syscalls/quotactl01.c: Add Q_GETNEXQUOTA test Yang Xu
2019-11-15 15:51         ` Petr Vorel
2019-11-18  6:42           ` Xu, Yang
2019-11-20 17:09             ` Petr Vorel
2019-11-21  3:59               ` Yang Xu
2019-11-15 16:48         ` Petr Vorel
2019-11-18  6:18           ` Xu, Yang
2019-11-18  6:24             ` Petr Vorel
2019-11-01 12:55       ` [LTP] [PATCH v3 2/5] syscalls/quotactl02.c: Add Q_XGETQSTATV test Yang Xu
2019-11-15 17:41         ` Petr Vorel
2019-11-18  7:59           ` Xu, Yang
2019-11-18  8:25             ` Petr Vorel [this message]
2019-11-01 12:55       ` [LTP] [PATCH v3 3/5] syscalls/quotactl04: add project quota test for non-xfs filesystem Yang Xu
2022-03-15 17:19         ` Petr Vorel
2022-03-16  2:00           ` xuyang2018.jy
2019-11-01 12:55       ` [LTP] [PATCH v3 4/5] syscalls/quotactl05: add project quota test for xfs filesystem Yang Xu
2019-11-01 12:55       ` [LTP] [PATCH v3 5/5] syscalls/quotactl06: Add new testcase Yang Xu
2019-11-12  8:05       ` [LTP] [PATCH v3 0/5] optimize quotactl test code Yang Xu
2019-11-15  9:02         ` Yang Xu
2019-11-15  9:25           ` Petr Vorel
2019-10-23  9:00 ` [LTP] [PATCH v2 3/6] syscalls/quotactl01.c: Add Q_GETNEXQUOTA test Yang Xu
2019-10-24  8:25   ` Jan Kara
2019-10-25  8:49     ` Yang Xu
2019-10-31 14:10     ` Petr Vorel
2019-10-31 14:31   ` Petr Vorel
2019-11-01 12:44     ` Yang Xu
2019-10-23  9:00 ` [LTP] [PATCH v2 4/6] syscalls/quotactl02.c: Add Q_XGETQSTATV and Q_XQUOTARM test Yang Xu
2019-10-23  9:00 ` [LTP] [PATCH v2 5/6] syscalls/quotactl04: add project quota test for non-xfs filesystem Yang Xu
2019-10-24  8:14   ` Jan Kara
2019-10-24  9:55     ` Yang Xu
2019-10-23  9:00 ` [LTP] [PATCH v2 6/6] syscalls/quotactl05: add project quota test for xfs filesystem Yang Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191118082510.GA8415@dell5510 \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox