On Wed, Mar 10, 2021 at 11:41AM +0100, Marco Elver wrote: > Add kselftest to test that remove_on_exec removes inherited events from > child tasks. > > Signed-off-by: Marco Elver <elver@xxxxxxxxxx> To make compatible with more recent libc, we'll need to fixup the tests with the below. Also, I've seen that tools/perf/tests exists, however it seems to be primarily about perf-tool related tests. Is this correct? I'd propose to keep these purely kernel ABI related tests separate, and that way we can also make use of the kselftests framework which will also integrate into various CI systems such as kernelci.org. Thanks, -- Marco ------ >8 ------ diff --git a/tools/testing/selftests/perf_events/remove_on_exec.c b/tools/testing/selftests/perf_events/remove_on_exec.c index e176b3a74d55..f89d0cfdb81e 100644 --- a/tools/testing/selftests/perf_events/remove_on_exec.c +++ b/tools/testing/selftests/perf_events/remove_on_exec.c @@ -13,6 +13,11 @@ #define __have_siginfo_t 1 #define __have_sigval_t 1 #define __have_sigevent_t 1 +#define __siginfo_t_defined +#define __sigval_t_defined +#define __sigevent_t_defined +#define _BITS_SIGINFO_CONSTS_H 1 +#define _BITS_SIGEVENT_CONSTS_H 1 #include <linux/perf_event.h> #include <pthread.h> diff --git a/tools/testing/selftests/perf_events/sigtrap_threads.c b/tools/testing/selftests/perf_events/sigtrap_threads.c index 7ebb9bb34c2e..b9a7d4b64b3c 100644 --- a/tools/testing/selftests/perf_events/sigtrap_threads.c +++ b/tools/testing/selftests/perf_events/sigtrap_threads.c @@ -13,6 +13,11 @@ #define __have_siginfo_t 1 #define __have_sigval_t 1 #define __have_sigevent_t 1 +#define __siginfo_t_defined +#define __sigval_t_defined +#define __sigevent_t_defined +#define _BITS_SIGINFO_CONSTS_H 1 +#define _BITS_SIGEVENT_CONSTS_H 1 #include <linux/hw_breakpoint.h> #include <linux/perf_event.h>