linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] selftests/move_mount_set_group:Make tests build with old libc
@ 2024-01-11 11:32 Hu Yadi
  2024-01-11 13:27 ` Mickaël Salaün
  2024-01-18 14:37 ` Christian Brauner
  0 siblings, 2 replies; 6+ messages in thread
From: Hu Yadi @ 2024-01-11 11:32 UTC (permalink / raw)
  To: jmorris, serge, shuah, mathieu.desnoyers, mic
  Cc: linux-api, linux-kernel, linux-security-module, linux-kselftest,
	514118380, Hu.Yadi

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>
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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v4] selftests/move_mount_set_group:Make tests build with old libc
  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
  2024-01-18  2:03   ` 回复: " Huyadi
  2024-01-18 14:37 ` Christian Brauner
  1 sibling, 1 reply; 6+ messages in thread
From: Mickaël Salaün @ 2024-01-11 13:27 UTC (permalink / raw)
  To: Hu Yadi
  Cc: jmorris, serge, shuah, mathieu.desnoyers, linux-api,
	linux-kernel, linux-security-module, linux-kselftest, 514118380,
	Christian Brauner, linux-fsdevel, Shuah Khan

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
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* 回复: [PATCH v4] selftests/move_mount_set_group:Make tests build with old libc
  2024-01-11 13:27 ` Mickaël Salaün
@ 2024-01-18  2:03   ` Huyadi
  0 siblings, 0 replies; 6+ messages in thread
From: Huyadi @ 2024-01-18  2:03 UTC (permalink / raw)
  To: 'Mickaël Salaün', 'Christian Brauner',
	Christian Brauner, serge, Shuah Khan
  Cc: jmorris, serge, shuah, mathieu.desnoyers, linux-api,
	linux-kernel, linux-security-module, linux-kselftest, 514118380,
	Christian Brauner, linux-fsdevel, Shuah Khan


>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.


Any progesss about this patch ? 
Thanks

>
>> 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_te
>> st.c 
>> b/tools/testing/selftests/move_mount_set_group/move_mount_set_group_te
>> st.c index 50ed5d475dd1..bcf51d785a37 100644
>> --- 
>> a/tools/testing/selftests/move_mount_set_group/move_mount_set_group_te
>> st.c
>> +++ b/tools/testing/selftests/move_mount_set_group/move_mount_set_grou
>> +++ p_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
>> 
>>  

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v4] selftests/move_mount_set_group:Make tests build with old libc
  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
@ 2024-01-18 14:37 ` Christian Brauner
  2024-01-19  2:57   ` 回复: " Huyadi
  1 sibling, 1 reply; 6+ messages in thread
From: Christian Brauner @ 2024-01-18 14:37 UTC (permalink / raw)
  To: Hu Yadi
  Cc: Christian Brauner, linux-api, linux-kernel,
	linux-security-module, linux-kselftest, 514118380, jmorris,
	serge, shuah, mathieu.desnoyers, mic

On Thu, 11 Jan 2024 19:32:29 +0800, Hu Yadi wrote:
> 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")
> 
> [...]

Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc

[1/1] selftests/move_mount_set_group:Make tests build with old libc
      https://git.kernel.org/vfs/vfs/c/0778b0a1a8d2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* 回复: [PATCH v4] selftests/move_mount_set_group:Make tests build with old libc
  2024-01-18 14:37 ` Christian Brauner
@ 2024-01-19  2:57   ` Huyadi
  2024-01-19 13:39     ` Christian Brauner
  0 siblings, 1 reply; 6+ messages in thread
From: Huyadi @ 2024-01-19  2:57 UTC (permalink / raw)
  To: 'Christian Brauner'
  Cc: linux-api, linux-kernel, linux-security-module, linux-kselftest,
	514118380, jmorris, serge, shuah, mathieu.desnoyers, mic


>On Thu, 11 Jan 2024 19:32:29 +0800, Hu Yadi wrote:
>> 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")
>> 
>> [...]
>
>Applied to the vfs.misc branch of the vfs/vfs.git tree.
>Patches in the vfs.misc branch should appear in linux-next soon.
>
>Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.
>
>It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.
>
>Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.
>
>tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
>branch: vfs.misc
>

May I take the liberty to ask why I don't see patch applied to above branch?
and below commit also shows error:

Bad object id: 0778b0a1a8d2

>[1/1] selftests/move_mount_set_group:Make tests build with old libc
>     https://git.kernel.org/vfs/vfs/c/0778b0a1a8d2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 回复: [PATCH v4] selftests/move_mount_set_group:Make tests build with old libc
  2024-01-19  2:57   ` 回复: " Huyadi
@ 2024-01-19 13:39     ` Christian Brauner
  0 siblings, 0 replies; 6+ messages in thread
From: Christian Brauner @ 2024-01-19 13:39 UTC (permalink / raw)
  To: Huyadi
  Cc: linux-api, linux-kernel, linux-security-module, linux-kselftest,
	514118380, jmorris, serge, shuah, mathieu.desnoyers, mic

> May I take the liberty to ask why I don't see patch applied to above branch?

Just wasn't pushed yet. It is now.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-19 13:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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 NNTP newsgroup(s).