[PATCH] selftests/landlock:Fix fs_test build issues with old libc

2024-01-23 Thread Hu Yadi
From: "Hu.Yadi" Fixes: 04f9070e99a4 ("selftests/landlock: Add tests for pseudo filesystems") one issues comes up while building selftest/landlock on my side (gcc 7.3/glibc-2.28/kernel-4.19) gcc -Wall -O2 -isystem fs_test.c -lcap -o selftests/landlock/fs_test fs_test.c:4575:9: error:

[PATCH] selftests/landlock:Fix net_test build issues with old libc

2024-01-22 Thread Hu Yadi
of function ‘gettid’; [-Wimplicit-function-declaration] "_selftests-landlock-net-tid%d-index%d", gettid(), ^~ getgid net_test.c:(.text+0x4e0): undefined reference to `gettid' Signed-off-b

[PATCH v4] selftests/landlock:Fix two build issues

2024-01-15 Thread Hu Yadi
From: "Hu.Yadi" Two issues comes up while building selftest/landlock on my side (gcc 7.3/glibc-2.28/kernel-4.19) the first one is as to gettid net_test.c: In function ‘set_service’: net_test.c:91:45: warning: implicit declaration of function ‘gettid’; [-Wimplicit-function-declaration]

[PATCH] selftests/filesystems:fix build error in overlayfs

2024-01-11 Thread Hu Yadi
ng treated as errors and then , add sys_mount definition to solve it After both above, dev_in_maps.c can be built correctly on my mache(gcc 10.2,glibc-2.32,kernel-5.10) Signed-off-by: Hu Yadi --- .../selftests/filesystems/overlayfs/dev_in_maps.c | 10 ++ 1 file changed, 6 insert

[PATCH v3] selftests/landlock:Fix two build issues

2024-01-11 Thread Hu Yadi
From: "Hu.Yadi" Two issues comes up while building selftest/landlock on my side (gcc 7.3/glibc-2.28/kernel-4.19) the first one is as to gettid net_test.c: In function ‘set_service’: net_test.c:91:45: warning: implicit declaration of function ‘gettid’; [-Wimplicit-function-declaration]

[PATCH v4] selftests/move_mount_set_group:Make tests build with old libc

2024-01-11 Thread Hu Yadi
From: "Hu.Yadi" Replace SYS_ with __NR_. Using the __NR_ notation, provided by UAPI, is useful to build tests on systems without the SYS_ definitions. Replace SYS_move_mount with __NR_move_mount Similar changes: commit 87129ef13603 ("selftests/landlock: Make tests build with old libc")

[PATCH v2] selftests/landlock:Fix two build issues

2024-01-10 Thread Hu Yadi
From: "Hu.Yadi" Two issues comes up while building selftest/landlock: the first one is as to gettid net_test.c: In function ‘set_service’: net_test.c:91:45: warning: implicit declaration of function ‘gettid’; [-Wimplicit-function-declaration] "_selftests-landlock-net-tid%d-index%d",

[PATCH] selftests/core: Fix build issue with CLOSE_RANGE_UNSHARE

2024-01-10 Thread Hu Yadi
From: "Hu.Yadi" Add head file to fix cpmpile error: gcc -g -isystem /home/linux/usr/include close_range_test.c -o /home/linux/tools/testing/selftests/core/close_range_test close_range_test.c: In function ‘close_range_unshare’: close_range_test.c:111:11: error: ‘CLOSE_RANGE_UNSHARE’

[PATCH v3] selftests/move_mount_set_group:Fix build issue with old libc

2024-01-10 Thread Hu Yadi
From: "Hu.Yadi" Replace SYS_move_mount with __NR_move_mount to fix build error with old libc. Signed-off-by: Hu.Yadi Suggested-by: Jiao Reviewed-by: Berlin --- Changes v2 -> v3: - Adjust comments Changes v1 -> v2: - Fix mail of Suggested-by and Reviewed-by

[PATCH v2] selftests/move_mount_set_group:Make tests build with old libc

2024-01-09 Thread Hu Yadi
From: "Hu.Yadi" Replace SYS_ with __NR_. Using the __NR_ notation, provided by UAPI, is useful to build tests on systems without the SYS_ definitions. Replace SYS_move_mount with __NR_move_mount Signed-off-by: Hu.Yadi Suggested-by:Jiao Reviewed-by:Berlin --- Changes v1 -> v2: - Fix mail

[PATCH] selftests/landlock:Fix two build issues

2024-01-09 Thread Hu Yadi
From: "Hu.Yadi" Two issues comes up while building selftest/landlock: the first one is as to gettid net_test.c: In function ‘set_service’: net_test.c:91:45: warning: implicit declaration of function ‘gettid’; did you mean ‘getgid’? [-Wimplicit-function-declaration]

[PATCH] selftests/move_mount_set_group:Make tests build with old libc

2024-01-09 Thread Hu Yadi
From: "Hu.Yadi" Replace SYS_ with __NR_. Using the __NR_ notation, provided by UAPI, is useful to build tests on systems without the SYS_ definitions. Replace SYS_move_mount with __NR_move_mount Signed-off-by: Hu.Yadi Suggested-by:jiaox...@h3c.com Reviewed-by:ber...@h3c.com ---