All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 3/6] syscalls/quotactl01.c: Add Q_GETNEXQUOTA test
Date: Fri, 1 Nov 2019 20:44:45 +0800	[thread overview]
Message-ID: <dc5a87c6-512e-b9fc-66ca-987e9e88f9ae@cn.fujitsu.com> (raw)
In-Reply-To: <20191031143148.GA6781@dell5510>


on 2019/10/31 22:31, Petr Vorel wrote:

> Hi Xu,
>
>> Q_GETNEXTQUOTA was introduced since linux 4.6, this operation is the
>> same as Q_GETQUOTA, but it returns quota information for the next ID
>> greater than or equal to id that has a quota set.
>> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
>> ---
>>   include/lapi/quotactl.h                       | 23 ++---
>>   m4/ltp-quota.m4                               | 36 +-------
>>   .../kernel/syscalls/quotactl/quotactl01.c     | 86 ++++++++++++-------
>>   3 files changed, 67 insertions(+), 78 deletions(-)
>> diff --git a/include/lapi/quotactl.h b/include/lapi/quotactl.h
> ...
>>   #ifndef LAPI_QUOTACTL_H__
>>   # define LAPI_QUOTACTL_H__
>> +#include <linux/quota.h>
> I'd prefer to add autotools check for <linux/quota.h configure.ac
> (I guess we ignore include/config.h.default atm).
>
> But, more important, I'd prefer to include <sys/quota.h> here as well:
>
> #ifdef HAVE_LINUX_QUOTA_H
> # include <linux/quota.h>
> #else
> # include <sys/quota.h>
> #endif

Hi Petr

It still has problems that sys/quota.h has some struct defintion as struct dqblk ,struct dqinfo.
Also, now linux/quota.h doesn't have quotactl function declaration.

I think we can use HAVE_STRUCT_IF_NEXTDQBLK macro in lapi/quotactl.h to decide whether include <linux/quota.h> because
I add <linux/quota.h> for finding struct if_netxdqblk defintion.

  

ps: In my ltp fork, it passed.

[1]https://travis-ci.org/xuyang0410/ltp/builds/605963472?utm_medium=notification&utm_source=github_status

Thanks
Yang Xu

>
> => move it from quotactl0*.c (there is not yet agreement to include headers in
> lapi files, but later lapi files does it).
>
> The reason is that old distros fail when both headers are included at the same
> time (probably <linux/quota.h> got fixed later, maybe there is an workaround,
> but the easiest way is to handle this in header anyway).
>
> Kind regards,
> Petr
>
> [1] https://travis-ci.org/pevik/ltp/jobs/605507690
> [2] https://api.travis-ci.org/v3/job/605507690/log.txt
>
>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20191101/06f679de/attachment.htm>

  reply	other threads:[~2019-11-01 12:44 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
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 [this message]
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=dc5a87c6-512e-b9fc-66ca-987e9e88f9ae@cn.fujitsu.com \
    --to=xuyang2018.jy@cn.fujitsu.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.