selftests: capabilities: remove duplicate unneeded defines
PATCH 1/6 selftests: capabilities: remove duplicate unneeded defines
These duplicate defines should automatically be picked up from kernel headers. Use KHDR_INCLUDES to add kernel header files.
--- tools/testing/selftests/capabilities/Makefile | 2 +- tools/testing/selftests/capabilities/test_execve.c | 8 -------- tools/testing/selftests/capabilities/validate_cap.c | 8 -------- 3 files changed, 1 insertion(+), 17 deletions(-)
tools/testing/selftests/capabilities/Makefile +1 -1
@@ -2,7 +2,7 @@ TEST_GEN_FILES := validate_cap TEST_GEN_PROGS := test_execve -CFLAGS += -O2 -g -std=gnu99 -Wall +CFLAGS += -O2 -g -std=gnu99 -Wall $(KHDR_INCLUDES) LDLIBS += -lcap-ng -lrt -ldl include ../lib.mk
tools/testing/selftests/capabilities/test_execve.c +0 -8
@@ -20,14 +20,6 @@#include "../kselftest.h" -#ifndef PR_CAP_AMBIENT -#define PR_CAP_AMBIENT 47 -# define PR_CAP_AMBIENT_IS_SET 1 -# define PR_CAP_AMBIENT_RAISE 2 -# define PR_CAP_AMBIENT_LOWER 3 -# define PR_CAP_AMBIENT_CLEAR_ALL 4 -#endif -static int nerrs;static pid_t mpid;/* main() pid is used to avoid duplicate test counts */
tools/testing/selftests/capabilities/validate_cap.c +0 -8
@@ -9,14 +9,6 @@#include "../kselftest.h" -#ifndef PR_CAP_AMBIENT -#define PR_CAP_AMBIENT 47 -# define PR_CAP_AMBIENT_IS_SET 1 -# define PR_CAP_AMBIENT_RAISE 2 -# define PR_CAP_AMBIENT_LOWER 3 -# define PR_CAP_AMBIENT_CLEAR_ALL 4 -#endif -#if __GLIBC__ >2 || (__GLIBC__ ==2 && __GLIBC_MINOR__ >=19 )# define HAVE_GETAUXVAL #endif
Signature · 1 line
2.39.2
PATCH 2/6 selftests: clone3: remove duplicate defines
Remove duplicate defines which are included in kernel headers. MAX_PID_NS_LEVEL macro is used inside kernel only. It isn't exposed to userspace. So it is never defined in test application. Remove #ifndef in this case.
--- .../clone3/clone3_cap_checkpoint_restore.c | 2 -- .../testing/selftests/clone3/clone3_clear_sighand.c | 4 ---- tools/testing/selftests/clone3/clone3_selftests.h | 13 ------------- tools/testing/selftests/clone3/clone3_set_tid.c | 2 -- 4 files changed, 21 deletions(-)
tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c +0 -2
@@ -27,9 +27,7 @@#include "../kselftest_harness.h" #include "clone3_selftests.h" -#ifndef MAX_PID_NS_LEVEL #define MAX_PID_NS_LEVEL 32 -#endif static void child_exit (int ret) {
tools/testing/selftests/clone3/clone3_clear_sighand.c +0 -4
@@ -16,10 +16,6 @@#include "../kselftest.h" #include "clone3_selftests.h" -#ifndef CLONE_CLEAR_SIGHAND -#define CLONE_CLEAR_SIGHAND 0x100000000ULL -#endif -static void nop_handler (int signo) { }
tools/testing/selftests/clone3/clone3_selftests.h +0 -13
@@ -15,10 +15,6 @@#define ptr_to_u64 (ptr) ((__u64)((uintptr_t)(ptr))) -#ifndef CLONE_INTO_CGROUP -#define CLONE_INTO_CGROUP 0x200000000ULL/* Clone into a specific cgroup given the right permissions. */ -#endif -#ifndef __NR_clone3#define __NR_clone3 -1#endif
@@ -32,18 +28,9 @@ struct __clone_args {__aligned_u64 stack;__aligned_u64 stack_size;__aligned_u64 tls; -#ifndef CLONE_ARGS_SIZE_VER0 -#define CLONE_ARGS_SIZE_VER0 64/* sizeof first published struct */ -#endif __aligned_u64 set_tid;__aligned_u64 set_tid_size; -#ifndef CLONE_ARGS_SIZE_VER1 -#define CLONE_ARGS_SIZE_VER1 80/* sizeof second published struct */ -#endif __aligned_u64 cgroup; -#ifndef CLONE_ARGS_SIZE_VER2 -#define CLONE_ARGS_SIZE_VER2 88/* sizeof third published struct */ -#endif };static pid_t sys_clone3 (struct __clone_args *args,size_t size)
tools/testing/selftests/clone3/clone3_set_tid.c +0 -2
@@ -23,9 +23,7 @@#include "../kselftest.h" #include "clone3_selftests.h" -#ifndef MAX_PID_NS_LEVEL #define MAX_PID_NS_LEVEL 32 -#endif static int pipe_1[2 ];static int pipe_2[2 ];
Signature · 1 line
2.39.2
PATCH 3/6 selftests: core: remove duplicate defines
In reply to Muhammad Usama AnjumRemove duplicate defines which are already defined in kernel headers and re-definition isn't required.
--- .../testing/selftests/core/close_range_test.c | 28 ------------------- 1 file changed, 28 deletions(-)
tools/testing/selftests/core/close_range_test.c +0 -28
@@ -16,34 +16,6 @@#include "../kselftest_harness.h" #include "../clone3/clone3_selftests.h" -#ifndef __NR_close_range -#if defined __alpha__ -#define __NR_close_range 546 -#elif defined _MIPS_SIM -#if _MIPS_SIM == _MIPS_SIM_ABI32/* o32 */ -#define __NR_close_range (436 + 4000) -#endif -#if _MIPS_SIM == _MIPS_SIM_NABI32/* n32 */ -#define __NR_close_range (436 + 6000) -#endif -#if _MIPS_SIM == _MIPS_SIM_ABI64/* n64 */ -#define __NR_close_range (436 + 5000) -#endif -#elif defined __ia64__ -#define __NR_close_range (436 + 1024) -#else -#define __NR_close_range 436 -#endif -#endif - -#ifndef CLOSE_RANGE_UNSHARE -#define CLOSE_RANGE_UNSHARE (1U << 1) -#endif - -#ifndef CLOSE_RANGE_CLOEXEC -#define CLOSE_RANGE_CLOEXEC (1U << 2) -#endif -static inline int sys_close_range (unsigned int fd,unsigned int max_fd,unsigned int flags) {
Signature · 1 line
2.39.2
PATCH 4/6 selftests: fchmodat2: remove duplicate unneeded defines
In reply to Muhammad Usama AnjumThese duplicate defines should automatically be picked up from kernel headers. Use KHDR_INCLUDES to add kernel header files.
--- tools/testing/selftests/fchmodat2/Makefile | 2 +- .../selftests/fchmodat2/fchmodat2_test.c | 20 ------------------- 2 files changed, 1 insertion(+), 21 deletions(-)
tools/testing/selftests/fchmodat2/Makefile +1 -1
@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-or-later -CFLAGS += -Wall -O2 -g -fsanitize=address -fsanitize=undefined +CFLAGS += -Wall -O2 -g -fsanitize=address -fsanitize=undefined $(KHDR_INCLUDES) TEST_GEN_PROGS := fchmodat2_test include ../lib.mk
tools/testing/selftests/fchmodat2/fchmodat2_test.c +0 -20
@@ -9,26 +9,6 @@#include "../kselftest.h" -#ifndef __NR_fchmodat2 -#if defined __alpha__ -#define __NR_fchmodat2 562 -#elif defined _MIPS_SIM -#if _MIPS_SIM == _MIPS_SIM_ABI32/* o32 */ -#define __NR_fchmodat2 (452 + 4000) -#endif -#if _MIPS_SIM == _MIPS_SIM_NABI32/* n32 */ -#define __NR_fchmodat2 (452 + 6000) -#endif -#if _MIPS_SIM == _MIPS_SIM_ABI64/* n64 */ -#define __NR_fchmodat2 (452 + 5000) -#endif -#elif defined __ia64__ -#define __NR_fchmodat2 (452 + 1024) -#else -#define __NR_fchmodat2 452 -#endif -#endif -int sys_fchmodat2 (int dfd,const char *filename,mode_t mode,int flags) {int ret =syscall (__NR_fchmodat2, dfd, filename, mode, flags);
Signature · 1 line
2.39.2
Christian Brauner
AppliedRe: (subset) [PATCH 4/6] selftests: fchmodat2: remove duplicate unneeded defines
Quoted 4 lines · Muhammad Usama Anjum
These duplicate defines should automatically be picked up from kernel headers. Use
KHDR_INCLUDESto add kernel header files.
Since the test isn't upstream yet I'm carrying it separately from the other patches which will go through the selftest tree.
---
Applied to the vfs.fchmodat2 branch of the vfs/vfs.git tree. Patches in the vfs.fchmodat2 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.fchmodat2
[4/6] selftests: fchmodat2: remove duplicate unneeded defines
https://git.kernel.org/vfs/vfs/c/712143795327
PATCH 5/6 selftests: firmware: remove duplicate unneeded defines
In reply to Muhammad Usama AnjumThese duplicate defines should automatically picked up from kernel headers.
--- tools/testing/selftests/firmware/fw_namespace.c | 4 ---- 1 file changed, 4 deletions(-)
tools/testing/selftests/firmware/fw_namespace.c +0 -4
@@ -17,10 +17,6 @@#include <sys/wait.h> #include <unistd.h> -#ifndef CLONE_NEWNS -# define CLONE_NEWNS 0x00020000 -#endif -static char *fw_path =NULL ;static void die (char *fmt, ...)
Signature · 1 line
2.39.2
PATCH 6/6 selftests: futex: remove duplicate unneeded defines
In reply to Muhammad Usama AnjumKselftests are kernel tests and must be build with kernel headers from same source version. These duplicate defines should automatically picked up from kernel headers. Use KHDR_INCLUDES to add kernel header files.
--- .../selftests/futex/include/futextest.h | 22 ------------------- 1 file changed, 22 deletions(-)
tools/testing/selftests/futex/include/futextest.h +0 -22
@@ -25,28 +25,6 @@typedef volatile u_int32_t futex_t ;#define FUTEX_INITIALIZER 0 -/* Define the newer op codes if the system header file is not up to date. */ -#ifndef FUTEX_WAIT_BITSET -#define FUTEX_WAIT_BITSET 9 -#endif -#ifndef FUTEX_WAKE_BITSET -#define FUTEX_WAKE_BITSET 10 -#endif -#ifndef FUTEX_WAIT_REQUEUE_PI -#define FUTEX_WAIT_REQUEUE_PI 11 -#endif -#ifndef FUTEX_CMP_REQUEUE_PI -#define FUTEX_CMP_REQUEUE_PI 12 -#endif -#ifndef FUTEX_WAIT_REQUEUE_PI_PRIVATE -#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \ - FUTEX_PRIVATE_FLAG) -#endif -#ifndef FUTEX_REQUEUE_PI_PRIVATE -#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ - FUTEX_PRIVATE_FLAG) -#endif -/** * futex() - SYS_futex syscall wrapper * @uaddr: address of first futex
Signature · 1 line
2.39.2
Re: [PATCH 6/6] selftests: futex: remove duplicate unneeded defines
Quoted 29 lines · Muhammad Usama Anjum
Kselftests are kernel tests and must be build with kernel headers from same source version. These duplicate defines should automatically picked up from kernel headers. Use
KHDR_INCLUDESto add kernel header files.Signed-off-by Muhammad Usama Anjum <[email protected]>--- .../selftests/futex/include/futextest.h | 22 ------------------- 1 file changed, 22 deletions(-)tools/testing/selftests/futex/include/futextest.h +0
-11@@ -25,28 +25,6 @@typedef volatile u_int32_t futex_t ;#define FUTEX_INITIALIZER 0 -/* Define the newer op codes if the system header file is not up to date. */ -#ifndef FUTEX_WAIT_BITSET -#define FUTEX_WAIT_BITSET 9 -#endif -#ifndef FUTEX_WAKE_BITSET -#define FUTEX_WAKE_BITSET 10 -#endif -#ifndef FUTEX_WAIT_REQUEUE_PI -#define FUTEX_WAIT_REQUEUE_PI 11 -#endif -#ifndef FUTEX_CMP_REQUEUE_PI
tools/testing/selftests/futex/include/futextest.h line 48
Quoted 10 lines
tools/testing/selftests/futex/include/futextest.h +0
-10-#define FUTEX_CMP_REQUEUE_PI 12 -#endif -#ifndef FUTEX_WAIT_REQUEUE_PI_PRIVATE -#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \ - FUTEX_PRIVATE_FLAG) -#endif -#ifndef FUTEX_REQUEUE_PI_PRIVATE -#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ - FUTEX_PRIVATE_FLAG) -#endif
AFAICT I cannot really pick this up into the locking tree as-is, as this patch relies on the KHDR_INCLUDES change in patch #1, so that all self-tests get the kernel headers included, correct?
Thanks,
Ingo
Re: [PATCH 6/6] selftests: futex: remove duplicate unneeded defines
Quoted 38 lines · Ingo Molnar
Quoted 35 lines · Muhammad Usama Anjum
Kselftests are kernel tests and must be build with kernel headers from same source version. These duplicate defines should automatically picked up from kernel headers. Use
KHDR_INCLUDESto add kernel header files.Signed-off-by Muhammad Usama Anjum <[email protected]>--- .../selftests/futex/include/futextest.h | 22 ------------------- 1 file changed, 22 deletions(-)tools/testing/selftests/futex/include/futextest.h +0
-17@@ -25,28 +25,6 @@typedef volatile u_int32_t futex_t ;#define FUTEX_INITIALIZER 0 -/* Define the newer op codes if the system header file is not up to date. */ -#ifndef FUTEX_WAIT_BITSET -#define FUTEX_WAIT_BITSET 9 -#endif -#ifndef FUTEX_WAKE_BITSET -#define FUTEX_WAKE_BITSET 10 -#endif -#ifndef FUTEX_WAIT_REQUEUE_PI -#define FUTEX_WAIT_REQUEUE_PI 11 -#endif -#ifndef FUTEX_CMP_REQUEUE_PI -#define FUTEX_CMP_REQUEUE_PI 12 -#endif -#ifndef FUTEX_WAIT_REQUEUE_PI_PRIVATE -#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \ - FUTEX_PRIVATE_FLAG) -#endif
Quoted 8 lines
tools/testing/selftests/futex/include/futextest.h line 48
Quoted 4 lines
tools/testing/selftests/futex/include/futextest.h +0
-4-#ifndef FUTEX_REQUEUE_PI_PRIVATE -#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ - FUTEX_PRIVATE_FLAG) -#endif AFAICT I cannot really pick this up into the locking tree as-is, as this patch relies on the
KHDR_INCLUDESchange in patch #1, so that all self-tests get the kernel headers included, correct?
No this patch is self contained and doesn't depend on the patch #1. KHDR_INCLUDES was included several releases back in kselftest's Makefile and in kselftests of futex. Correct headers are being included already. In this patch, I'm removing just the un-needed dead code. Other patches were already picked up by other maintainers.
Quoted 4 lines
Thanks,
Ingo
Signature · 2 lines
BR, Muhammad Usama Anjum
Re: [PATCH 6/6] selftests: futex: remove duplicate unneeded defines
Quoted 47 lines · Muhammad Usama Anjum
Quoted 38 lines · Ingo Molnar
Quoted 35 lines · Muhammad Usama Anjum
Kselftests are kernel tests and must be build with kernel headers from same source version. These duplicate defines should automatically picked up from kernel headers. Use
KHDR_INCLUDESto add kernel header files.Signed-off-by Muhammad Usama Anjum <[email protected]>--- .../selftests/futex/include/futextest.h | 22 ------------------- 1 file changed, 22 deletions(-)tools/testing/selftests/futex/include/futextest.h +0
-17@@ -25,28 +25,6 @@typedef volatile u_int32_t futex_t ;#define FUTEX_INITIALIZER 0 -/* Define the newer op codes if the system header file is not up to date. */ -#ifndef FUTEX_WAIT_BITSET -#define FUTEX_WAIT_BITSET 9 -#endif -#ifndef FUTEX_WAKE_BITSET -#define FUTEX_WAKE_BITSET 10 -#endif -#ifndef FUTEX_WAIT_REQUEUE_PI -#define FUTEX_WAIT_REQUEUE_PI 11 -#endif -#ifndef FUTEX_CMP_REQUEUE_PI -#define FUTEX_CMP_REQUEUE_PI 12 -#endif -#ifndef FUTEX_WAIT_REQUEUE_PI_PRIVATE -#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \ - FUTEX_PRIVATE_FLAG) -#endif Quoted 8 lines
tools/testing/selftests/futex/include/futextest.h line 48
Quoted 4 lines
tools/testing/selftests/futex/include/futextest.h +0
-4-#ifndef FUTEX_REQUEUE_PI_PRIVATE -#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ - FUTEX_PRIVATE_FLAG) -#endif AFAICT I cannot really pick this up into the locking tree as-is, as this patch relies on the
KHDR_INCLUDESchange in patch #1, so that all self-tests get the kernel headers included, correct?
Quoted 5 lines
No this patch is self contained and doesn't depend on the patch #1.
KHDR_INCLUDESwas included several releases back in kselftest'sMakefileand in kselftests of futex. Correct headers are being included already. In this patch, I'm removing just the un-needed dead code. Other patches were already picked up by other maintainers.
So the changelog does not match that characterization, it talks about KHDR_INCLUDES in the present tense, and patch #1 adds the KHDR_INCLUDES, which further suggested a dependency to me:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Kselftests are kernel tests and must be build with kernel headers from same source version. These duplicate defines should automatically picked up from kernel headers. Use
KHDR_INCLUDESto add kernel header
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Quoted 1 line
Quoted 1 line
Quoted 1 line
files.
^^^^^^
Could you please re-send it with the changelog updated that makes it clear that this patch works fine standalone against current mainline kernels?
Thanks,
Ingo
Re: [PATCH 6/6] selftests: futex: remove duplicate unneeded defines
Quoted 56 lines · Ingo Molnar
Quoted 47 lines · Muhammad Usama Anjum
Quoted 38 lines · Ingo Molnar
Quoted 35 lines · Muhammad Usama Anjum
Kselftests are kernel tests and must be build with kernel headers from same source version. These duplicate defines should automatically picked up from kernel headers. Use
KHDR_INCLUDESto add kernel header files.Signed-off-by Muhammad Usama Anjum <[email protected]>--- .../selftests/futex/include/futextest.h | 22 ------------------- 1 file changed, 22 deletions(-)tools/testing/selftests/futex/include/futextest.h +0
-17@@ -25,28 +25,6 @@typedef volatile u_int32_t futex_t ;#define FUTEX_INITIALIZER 0 -/* Define the newer op codes if the system header file is not up to date. */ -#ifndef FUTEX_WAIT_BITSET -#define FUTEX_WAIT_BITSET 9 -#endif -#ifndef FUTEX_WAKE_BITSET -#define FUTEX_WAKE_BITSET 10 -#endif -#ifndef FUTEX_WAIT_REQUEUE_PI -#define FUTEX_WAIT_REQUEUE_PI 11 -#endif -#ifndef FUTEX_CMP_REQUEUE_PI -#define FUTEX_CMP_REQUEUE_PI 12 -#endif -#ifndef FUTEX_WAIT_REQUEUE_PI_PRIVATE -#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \ - FUTEX_PRIVATE_FLAG) -#endif Quoted 8 lines
tools/testing/selftests/futex/include/futextest.h line 48
Quoted 4 lines
tools/testing/selftests/futex/include/futextest.h +0
-4-#ifndef FUTEX_REQUEUE_PI_PRIVATE -#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ - FUTEX_PRIVATE_FLAG) -#endif AFAICT I cannot really pick this up into the locking tree as-is, as this patch relies on the
KHDR_INCLUDESchange in patch #1, so that all self-tests get the kernel headers included, correct?Quoted 5 lines
No this patch is self contained and doesn't depend on the patch #1.
KHDR_INCLUDESwas included several releases back in kselftest'sMakefileand in kselftests of futex. Correct headers are being included already. In this patch, I'm removing just the un-needed dead code. Other patches were already picked up by other maintainers.
Quoted 3 lines
So the changelog does not match that characterization, it talks about
KHDR_INCLUDESin the present tense, and patch #1 adds theKHDR_INCLUDES, which further suggested a dependency to me:
Sorry, so the working of the change-log isn't clear enough. I'll send the patch separately and with better wording.
Quoted 14 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Kselftests are kernel tests and must be build with kernel headers from same source version. These duplicate defines should automatically picked up from kernel headers. Use
KHDR_INCLUDESto add kernel header^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Quoted 1 line
Quoted 1 line
Quoted 1 line
files.
^^^^^^Could you please re-send it with the changelog updated that makes it clear that this patch works fine standalone against current mainline kernels?
Thanks,
Ingo
Signature · 2 lines
BR, Muhammad Usama Anjum
Re: [PATCH 6/6] selftests: futex: remove duplicate unneeded defines
Quoted 2 lines · Muhammad Usama Anjum
Sorry, so the working of the change-log isn't clear enough. I'll send the patch separately and with better wording.
Thank you!
Ingo
Hi Shuah,
Christian Brauner had picked [PATCH 4/6]. Others are still not picked. Please have a look.
Thanks,
Usama
Quoted 61 lines · Muhammad Usama Anjum
These duplicate defines should automatically be picked up from kernel headers. Use
KHDR_INCLUDESto add kernel header files.Signed-off-by Muhammad Usama Anjum <[email protected]>--- tools/testing/selftests/capabilities/Makefile | 2 +- tools/testing/selftests/capabilities/test_execve.c | 8 -------- tools/testing/selftests/capabilities/validate_cap.c | 8 -------- 3 files changed, 1 insertion(+), 17 deletions(-)tools/testing/selftests/capabilities/Makefile +1
-1@@ -2,7 +2,7 @@ TEST_GEN_FILES := validate_cap TEST_GEN_PROGS := test_execve -CFLAGS += -O2 -g -std=gnu99 -Wall +CFLAGS += -O2 -g -std=gnu99 -Wall $(KHDR_INCLUDES) LDLIBS += -lcap-ng -lrt -ldl include ../lib.mktools/testing/selftests/capabilities/test_execve.c +0
-8@@ -20,14 +20,6 @@#include "../kselftest.h" -#ifndef PR_CAP_AMBIENT -#define PR_CAP_AMBIENT 47 -# define PR_CAP_AMBIENT_IS_SET 1 -# define PR_CAP_AMBIENT_RAISE 2 -# define PR_CAP_AMBIENT_LOWER 3 -# define PR_CAP_AMBIENT_CLEAR_ALL 4 -#endif -static int nerrs;static pid_t mpid;/* main() pid is used to avoid duplicate test counts */ tools/testing/selftests/capabilities/validate_cap.c +0
-8@@ -9,14 +9,6 @@#include "../kselftest.h" -#ifndef PR_CAP_AMBIENT -#define PR_CAP_AMBIENT 47 -# define PR_CAP_AMBIENT_IS_SET 1 -# define PR_CAP_AMBIENT_RAISE 2 -# define PR_CAP_AMBIENT_LOWER 3 -# define PR_CAP_AMBIENT_CLEAR_ALL 4 -#endif -#if __GLIBC__ >2 || (__GLIBC__ ==2 && __GLIBC_MINOR__ >=19 )# define HAVE_GETAUXVAL #endif
Signature · 2 lines
BR, Muhammad Usama Anjum
Quoted 4 lines · Muhammad Usama Anjum
Hi Shuah,
Christian Brauner had picked [PATCH 4/6]. Others are still not picked. Please have a look.
Soft reminder
Quoted 67 lines
Thanks,
UsamaQuoted 61 lines · Muhammad Usama Anjum
These duplicate defines should automatically be picked up from kernel headers. Use
KHDR_INCLUDESto add kernel header files.Signed-off-by Muhammad Usama Anjum <[email protected]>--- tools/testing/selftests/capabilities/Makefile | 2 +- tools/testing/selftests/capabilities/test_execve.c | 8 -------- tools/testing/selftests/capabilities/validate_cap.c | 8 -------- 3 files changed, 1 insertion(+), 17 deletions(-)tools/testing/selftests/capabilities/Makefile +1
-1@@ -2,7 +2,7 @@ TEST_GEN_FILES := validate_cap TEST_GEN_PROGS := test_execve -CFLAGS += -O2 -g -std=gnu99 -Wall +CFLAGS += -O2 -g -std=gnu99 -Wall $(KHDR_INCLUDES) LDLIBS += -lcap-ng -lrt -ldl include ../lib.mktools/testing/selftests/capabilities/test_execve.c +0
-8@@ -20,14 +20,6 @@#include "../kselftest.h" -#ifndef PR_CAP_AMBIENT -#define PR_CAP_AMBIENT 47 -# define PR_CAP_AMBIENT_IS_SET 1 -# define PR_CAP_AMBIENT_RAISE 2 -# define PR_CAP_AMBIENT_LOWER 3 -# define PR_CAP_AMBIENT_CLEAR_ALL 4 -#endif -static int nerrs;static pid_t mpid;/* main() pid is used to avoid duplicate test counts */ tools/testing/selftests/capabilities/validate_cap.c +0
-8@@ -9,14 +9,6 @@#include "../kselftest.h" -#ifndef PR_CAP_AMBIENT -#define PR_CAP_AMBIENT 47 -# define PR_CAP_AMBIENT_IS_SET 1 -# define PR_CAP_AMBIENT_RAISE 2 -# define PR_CAP_AMBIENT_LOWER 3 -# define PR_CAP_AMBIENT_CLEAR_ALL 4 -#endif -#if __GLIBC__ >2 || (__GLIBC__ ==2 && __GLIBC_MINOR__ >=19 )# define HAVE_GETAUXVAL #endif
Signature · 2 lines
BR, Muhammad Usama Anjum
Quoted 5 lines · Muhammad Usama Anjum
Quoted 4 lines · Muhammad Usama Anjum
Hi Shuah,
Christian Brauner had picked [PATCH 4/6]. Others are still not picked. Please have a look.
Shuah, I thought you had picked up these patches. But I'm unable to find them in the linux-next. I'll be re-sending 6th patch separately. Can you please pick up patch number 1, 2, 3 and 5 to your tree?
Thanks
Quoted 70 lines
Soft reminder
Quoted 67 lines
Thanks,
UsamaQuoted 61 lines · Muhammad Usama Anjum
These duplicate defines should automatically be picked up from kernel headers. Use
KHDR_INCLUDESto add kernel header files.Signed-off-by Muhammad Usama Anjum <[email protected]>--- tools/testing/selftests/capabilities/Makefile | 2 +- tools/testing/selftests/capabilities/test_execve.c | 8 -------- tools/testing/selftests/capabilities/validate_cap.c | 8 -------- 3 files changed, 1 insertion(+), 17 deletions(-)tools/testing/selftests/capabilities/Makefile +1
-1@@ -2,7 +2,7 @@ TEST_GEN_FILES := validate_cap TEST_GEN_PROGS := test_execve -CFLAGS += -O2 -g -std=gnu99 -Wall +CFLAGS += -O2 -g -std=gnu99 -Wall $(KHDR_INCLUDES) LDLIBS += -lcap-ng -lrt -ldl include ../lib.mktools/testing/selftests/capabilities/test_execve.c +0
-8@@ -20,14 +20,6 @@#include "../kselftest.h" -#ifndef PR_CAP_AMBIENT -#define PR_CAP_AMBIENT 47 -# define PR_CAP_AMBIENT_IS_SET 1 -# define PR_CAP_AMBIENT_RAISE 2 -# define PR_CAP_AMBIENT_LOWER 3 -# define PR_CAP_AMBIENT_CLEAR_ALL 4 -#endif -static int nerrs;static pid_t mpid;/* main() pid is used to avoid duplicate test counts */ tools/testing/selftests/capabilities/validate_cap.c +0
-8@@ -9,14 +9,6 @@#include "../kselftest.h" -#ifndef PR_CAP_AMBIENT -#define PR_CAP_AMBIENT 47 -# define PR_CAP_AMBIENT_IS_SET 1 -# define PR_CAP_AMBIENT_RAISE 2 -# define PR_CAP_AMBIENT_LOWER 3 -# define PR_CAP_AMBIENT_CLEAR_ALL 4 -#endif -#if __GLIBC__ >2 || (__GLIBC__ ==2 && __GLIBC_MINOR__ >=19 )# define HAVE_GETAUXVAL #endif
Signature · 2 lines
BR, Muhammad Usama Anjum
Quoted 9 lines · Muhammad Usama Anjum
Quoted 5 lines · Muhammad Usama Anjum
Quoted 4 lines · Muhammad Usama Anjum
Hi Shuah,
Christian Brauner had picked [PATCH 4/6]. Others are still not picked. Please have a look.
Shuah, I thought you had picked up these patches. But I'm unable to find them in the linux-next. I'll be re-sending 6th patch separately. Can you please pick up patch number 1, 2, 3 and 5 to your tree?
Sent v2 for your ease. It has same patches.
https://lore.kernel.org/all/[email protected]
Quoted 74 lines
Thanks
Quoted 70 lines
Soft reminder
Quoted 67 lines
Thanks,
UsamaQuoted 61 lines · Muhammad Usama Anjum
These duplicate defines should automatically be picked up from kernel headers. Use
KHDR_INCLUDESto add kernel header files.Signed-off-by Muhammad Usama Anjum <[email protected]>--- tools/testing/selftests/capabilities/Makefile | 2 +- tools/testing/selftests/capabilities/test_execve.c | 8 -------- tools/testing/selftests/capabilities/validate_cap.c | 8 -------- 3 files changed, 1 insertion(+), 17 deletions(-)tools/testing/selftests/capabilities/Makefile +1
-1@@ -2,7 +2,7 @@ TEST_GEN_FILES := validate_cap TEST_GEN_PROGS := test_execve -CFLAGS += -O2 -g -std=gnu99 -Wall +CFLAGS += -O2 -g -std=gnu99 -Wall $(KHDR_INCLUDES) LDLIBS += -lcap-ng -lrt -ldl include ../lib.mktools/testing/selftests/capabilities/test_execve.c +0
-8@@ -20,14 +20,6 @@#include "../kselftest.h" -#ifndef PR_CAP_AMBIENT -#define PR_CAP_AMBIENT 47 -# define PR_CAP_AMBIENT_IS_SET 1 -# define PR_CAP_AMBIENT_RAISE 2 -# define PR_CAP_AMBIENT_LOWER 3 -# define PR_CAP_AMBIENT_CLEAR_ALL 4 -#endif -static int nerrs;static pid_t mpid;/* main() pid is used to avoid duplicate test counts */ tools/testing/selftests/capabilities/validate_cap.c +0
-8@@ -9,14 +9,6 @@#include "../kselftest.h" -#ifndef PR_CAP_AMBIENT -#define PR_CAP_AMBIENT 47 -# define PR_CAP_AMBIENT_IS_SET 1 -# define PR_CAP_AMBIENT_RAISE 2 -# define PR_CAP_AMBIENT_LOWER 3 -# define PR_CAP_AMBIENT_CLEAR_ALL 4 -#endif -#if __GLIBC__ >2 || (__GLIBC__ ==2 && __GLIBC_MINOR__ >=19 )# define HAVE_GETAUXVAL #endif
Signature · 2 lines
BR, Muhammad Usama Anjum
Shuah Khan
maintainerQuoted 10 lines · Muhammad Usama Anjum
Quoted 9 lines · Muhammad Usama Anjum
Quoted 5 lines · Muhammad Usama Anjum
Quoted 4 lines · Muhammad Usama Anjum
Hi Shuah,
Christian Brauner had picked [PATCH 4/6]. Others are still not picked. Please have a look.
Shuah, I thought you had picked up these patches. But I'm unable to find them in the linux-next. I'll be re-sending 6th patch separately. Can you please pick up patch number 1, 2, 3 and 5 to your tree?
I though I picked these up. Looks like I didn't.
Quoted 3 lines
Sent v2 for your ease. It has same patches.
https://lore.kernel.org/all/[email protected]
Thank you. They are now in linux-kselftest next.
-- Shuah