[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YFiamKX+xYH2HJ4E@elver.google.com>
Date: Mon, 22 Mar 2021 14:24:40 +0100
From: Marco Elver <elver@...gle.com>
To: peterz@...radead.org, alexander.shishkin@...ux.intel.com,
acme@...nel.org, mingo@...hat.com, jolsa@...hat.com,
mark.rutland@....com, namhyung@...nel.org, tglx@...utronix.de
Cc: glider@...gle.com, viro@...iv.linux.org.uk, arnd@...db.de,
christian@...uner.io, dvyukov@...gle.com, jannh@...gle.com,
axboe@...nel.dk, mascasa@...gle.com, pcc@...gle.com,
irogers@...gle.com, kasan-dev@...glegroups.com,
linux-arch@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, x86@...nel.org,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH RFC v2 8/8] selftests/perf: Add kselftest for
remove_on_exec
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@...gle.com>
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>
Powered by blists - more mailing lists