Linux-api Archive mirror
 help / color / mirror / Atom feed
From: "Mickaël Salaün" <mic@digikod.net>
To: Hu Yadi <hu.yadi@h3c.com>
Cc: jmorris@namei.org, serge@hallyn.com, shuah@kernel.org,
	 mathieu.desnoyers@efficios.com, linux-api@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	 linux-security-module@vger.kernel.org,
	linux-kselftest@vger.kernel.org, 514118380@qq.com,
	 Christian Brauner <brauner@kernel.org>,
	linux-fsdevel@vger.kernel.org,
	 Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v4] selftests/move_mount_set_group:Make tests build with old libc
Date: Thu, 11 Jan 2024 14:27:22 +0100	[thread overview]
Message-ID: <20240111.mee0ohZie5he@digikod.net> (raw)
In-Reply-To: <20240111113229.10820-1-hu.yadi@h3c.com>

On Thu, Jan 11, 2024 at 07:32:29PM +0800, Hu Yadi wrote:
> From: "Hu.Yadi" <hu.yadi@h3c.com>
> 
> Replace SYS_<syscall> with __NR_<syscall>.  Using the __NR_<syscall>
> notation, provided by UAPI, is useful to build tests on systems without
> the SYS_<syscall> definitions.
> 
> Replace SYS_move_mount with __NR_move_mount
> 
> Similar changes: commit 87129ef13603 ("selftests/landlock: Make tests build with old libc")
> 
> Acked-by: Mickaël Salaün <mic@digikod.net>

Sorry, it should have been Reviewed-by: Mickaël Salaün <mic@digikod.net>

Also, this is maintained by the VFS maintainers. I CCed three relevant addresses.

> Signed-off-by: Hu.Yadi <hu.yadi@h3c.com>
> Suggested-by: Jiao <jiaoxupo@h3c.com>
> Reviewed-by: Berlin <berlin@h3c.com>
> ---
> Changes v4 -> v3:
>  - Adjust comments for consistent
>  - Add Acked-by
> Changes v2 -> v3:
>  - Adjust comments
> Changes v1 -> v2:
>  - Fix mail of Suggested-by and Reviewed-by
> 
>  .../move_mount_set_group/move_mount_set_group_test.c          | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c b/tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c
> index 50ed5d475dd1..bcf51d785a37 100644
> --- a/tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c
> +++ b/tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c
> @@ -218,7 +218,7 @@ static bool move_mount_set_group_supported(void)
>  	if (mount(NULL, SET_GROUP_FROM, NULL, MS_SHARED, 0))
>  		return -1;
>  
> -	ret = syscall(SYS_move_mount, AT_FDCWD, SET_GROUP_FROM,
> +	ret = syscall(__NR_move_mount, AT_FDCWD, SET_GROUP_FROM,
>  		      AT_FDCWD, SET_GROUP_TO, MOVE_MOUNT_SET_GROUP);
>  	umount2("/tmp", MNT_DETACH);
>  
> @@ -363,7 +363,7 @@ TEST_F(move_mount_set_group, complex_sharing_copying)
>  		       CLONE_VM | CLONE_FILES); ASSERT_GT(pid, 0);
>  	ASSERT_EQ(wait_for_pid(pid), 0);
>  
> -	ASSERT_EQ(syscall(SYS_move_mount, ca_from.mntfd, "",
> +	ASSERT_EQ(syscall(__NR_move_mount, ca_from.mntfd, "",
>  			  ca_to.mntfd, "", MOVE_MOUNT_SET_GROUP
>  			  | MOVE_MOUNT_F_EMPTY_PATH | MOVE_MOUNT_T_EMPTY_PATH),
>  		  0);
> -- 
> 2.23.0
> 
> 

  reply	other threads:[~2024-01-11 13:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11 11:32 [PATCH v4] selftests/move_mount_set_group:Make tests build with old libc Hu Yadi
2024-01-11 13:27 ` Mickaël Salaün [this message]
2024-01-18  2:03   ` 回复: " Huyadi
2024-01-18 14:37 ` Christian Brauner
2024-01-19  2:57   ` 回复: " Huyadi
2024-01-19 13:39     ` Christian Brauner

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=20240111.mee0ohZie5he@digikod.net \
    --to=mic@digikod.net \
    --cc=514118380@qq.com \
    --cc=brauner@kernel.org \
    --cc=hu.yadi@h3c.com \
    --cc=jmorris@namei.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=serge@hallyn.com \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).