From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yang Xu Date: Fri, 1 Nov 2019 20:44:45 +0800 Subject: [LTP] [PATCH v2 3/6] syscalls/quotactl01.c: Add Q_GETNEXQUOTA test In-Reply-To: <20191031143148.GA6781@dell5510> References: <1571821231-3846-1-git-send-email-xuyang2018.jy@cn.fujitsu.com> <1571821231-3846-4-git-send-email-xuyang2018.jy@cn.fujitsu.com> <20191031143148.GA6781@dell5510> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it 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 >> --- >> 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 > I'd prefer to add autotools check for (I guess we ignore include/config.h.default atm). > > But, more important, I'd prefer to include here as well: > > #ifdef HAVE_LINUX_QUOTA_H > # include > #else > # include > #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 because I add 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 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: