public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH v1 06/11] lapi/quotactl.h: Add fallback for quotactl_fd
Date: Wed, 27 Oct 2021 02:58:43 +0000	[thread overview]
Message-ID: <6178C067.2080208@fujitsu.com> (raw)
In-Reply-To: <YXgNHp6K/7CqyumH@yuki>

Hi Cyril
> Hi!
>> Signed-off-by: Yang Xu<xuyang2018.jy@fujitsu.com>
>> ---
>>   configure.ac                                    |  1 +
>>   include/lapi/quotactl.h                         | 16 +++++++++++++++-
>>   testcases/kernel/syscalls/quotactl/quotactl01.c |  2 +-
>>   testcases/kernel/syscalls/quotactl/quotactl04.c |  2 +-
>>   testcases/kernel/syscalls/quotactl/quotactl07.c |  2 +-
>>   5 files changed, 19 insertions(+), 4 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 5bf3c52ec..859aa9857 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -122,6 +122,7 @@ AC_CHECK_FUNCS_ONCE([ \
>>       profil \
>>       pwritev \
>>       pwritev2 \
>> +    quotactl_fd \
>>       rand_r \
>>       readlinkat \
>>       recvmmsg \
>> diff --git a/include/lapi/quotactl.h b/include/lapi/quotactl.h
>> index 348b70b58..e265a6708 100644
>> --- a/include/lapi/quotactl.h
>> +++ b/include/lapi/quotactl.h
>> @@ -1,6 +1,6 @@
>>   // SPDX-License-Identifier: GPL-2.0-or-later
>>   /*
>> - * Copyright (c) 2017-2019 Fujitsu Ltd.
>> + * Copyright (c) 2017-2021 FUJITSU LIMITED. All rights reserved
>>    * Author: Xiao Yang<yangx.jy@cn.fujitsu.com>
>>    * Author: Yang Xu<xuyang2018.jy@cn.jujitsu.com>
>>    */
>> @@ -9,6 +9,20 @@
>>   #define LAPI_QUOTACTL_H__
>>
>>   #include<sys/quota.h>
>> +#include "lapi/syscalls.h"
>> +
>> +static inline void quotactl_fd_supported(void)
>> +{
>> +	/* allow the tests to fail early */
>> +	tst_syscall(__NR_quotactl_fd);
>> +}
>> +
>> +#ifndef HAVE_QUOTACTL_FD
>> +static inline int quotactl_fd(int fd, int cmd, int id, caddr_t addr)
>> +{
>> +	return tst_syscall(__NR_quotactl_fd, fd, cmd, id, addr);
>> +}
>> +#endif
>>
>>   #ifdef HAVE_STRUCT_IF_NEXTDQBLK
>>   # include<linux/quota.h>
>> diff --git a/testcases/kernel/syscalls/quotactl/quotactl01.c b/testcases/kernel/syscalls/quotactl/quotactl01.c
>> index 4b791a03a..469c47437 100644
>> --- a/testcases/kernel/syscalls/quotactl/quotactl01.c
>> +++ b/testcases/kernel/syscalls/quotactl/quotactl01.c
>> @@ -63,8 +63,8 @@
>>   #include<string.h>
>>   #include<unistd.h>
>>   #include<stdio.h>
>> -#include "lapi/quotactl.h"
>>   #include "tst_test.h"
>> +#include "lapi/quotactl.h"
>>
>>   #define USRPATH MNTPOINT "/aquota.user"
>>   #define GRPPATH MNTPOINT "/aquota.group"
>> diff --git a/testcases/kernel/syscalls/quotactl/quotactl04.c b/testcases/kernel/syscalls/quotactl/quotactl04.c
>> index ca6a94263..e01657de5 100644
>> --- a/testcases/kernel/syscalls/quotactl/quotactl04.c
>> +++ b/testcases/kernel/syscalls/quotactl/quotactl04.c
>> @@ -41,9 +41,9 @@
>>   #include<sys/stat.h>
>>   #include<sys/mount.h>
>>   #include "config.h"
>> +#include "tst_test.h"
>>   #include "lapi/quotactl.h"
>>   #include "tst_safe_stdio.h"
>> -#include "tst_test.h"
>>
>>   #define FMTID QFMT_VFS_V1
>>   #define MNTPOINT	"mntpoint"
>> diff --git a/testcases/kernel/syscalls/quotactl/quotactl07.c b/testcases/kernel/syscalls/quotactl/quotactl07.c
>> index a55416f0e..f745e9b1c 100644
>> --- a/testcases/kernel/syscalls/quotactl/quotactl07.c
>> +++ b/testcases/kernel/syscalls/quotactl/quotactl07.c
>> @@ -16,8 +16,8 @@
>>   #include<unistd.h>
>>   #include<stdio.h>
>>   #include<sys/quota.h>
>> -#include "lapi/quotactl.h"
>>   #include "tst_test.h"
>> +#include "lapi/quotactl.h"
>>
>>   #ifdef HAVE_XFS_XQM_H
>>   # include<xfs/xqm.h>
>
> Unless it breaks compilation the part that shuffles the headers should
> go in a separate patch. Or at least it should have been described in the
> patch commit message...
Will add it in commit message.

Best Regards
Yang Xu
>

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2021-10-27  2:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 13:14 [LTP] [PATCH v1 06/11] lapi/quotactl.h: Add fallback for quotactl_fd Yang Xu
2021-10-18 13:14 ` [LTP] [PATCH v1 07/11] syscalls/quotactl08: Test quoatctl01 but quota info hidden in filesystem Yang Xu
2021-10-26 14:21   ` Cyril Hrubis
2021-10-27  3:04     ` xuyang2018.jy
2021-10-18 13:14 ` [LTP] [PATCH v1 08/11] syscalls/quotaclt02, 5: Add quotactl_fd test variant Yang Xu
2021-10-26 14:23   ` Cyril Hrubis
2021-10-18 13:14 ` [LTP] [PATCH v1 09/11] syscalls/quotactl03: " Yang Xu
2021-10-26 14:25   ` Cyril Hrubis
2021-10-18 13:14 ` [LTP] [PATCH v1 10/11] syscalls/quotactl04: " Yang Xu
2021-10-26 14:26   ` Cyril Hrubis
2021-10-26 14:13 ` [LTP] [PATCH v1 06/11] lapi/quotactl.h: Add fallback for quotactl_fd Cyril Hrubis
2021-10-27  2:58   ` xuyang2018.jy [this message]

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=6178C067.2080208@fujitsu.com \
    --to=xuyang2018.jy@fujitsu.com \
    --cc=chrubis@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