linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf test: Skip sigtrap test on old kernels
@ 2022-09-03  0:02 Namhyung Kim
  2022-09-03  6:52 ` Marco Elver
  0 siblings, 1 reply; 10+ messages in thread
From: Namhyung Kim @ 2022-09-03  0:02 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Jiri Olsa
  Cc: Ingo Molnar, Peter Zijlstra, LKML, Ian Rogers, linux-perf-users,
	Marco Elver

If it runs on an old kernel, perf_event_open would fail because of the
new fields sigtrap and sig_data.  Just skip the test if it failed.

Cc: Marco Elver <elver@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/tests/sigtrap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/tests/sigtrap.c b/tools/perf/tests/sigtrap.c
index e32ece90e164..7057566e6ae4 100644
--- a/tools/perf/tests/sigtrap.c
+++ b/tools/perf/tests/sigtrap.c
@@ -140,6 +140,7 @@ static int test__sigtrap(struct test_suite *test __maybe_unused, int subtest __m
 	fd = sys_perf_event_open(&attr, 0, -1, -1, perf_event_open_cloexec_flag());
 	if (fd < 0) {
 		pr_debug("FAILED sys_perf_event_open(): %s\n", str_error_r(errno, sbuf, sizeof(sbuf)));
+		ret = TEST_SKIP;
 		goto out_restore_sigaction;
 	}
 
-- 
2.37.2.789.g6183377224-goog


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

end of thread, other threads:[~2022-09-27  8:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-03  0:02 [PATCH] perf test: Skip sigtrap test on old kernels Namhyung Kim
2022-09-03  6:52 ` Marco Elver
2022-09-06 12:45   ` Arnaldo Carvalho de Melo
2022-09-06 18:31     ` Namhyung Kim
2022-09-06 20:50       ` Marco Elver
2022-09-06 20:56         ` Arnaldo Carvalho de Melo
2022-09-06 22:52           ` Namhyung Kim
2022-09-26 15:06   ` James Clark
2022-09-26 16:19     ` Namhyung Kim
2022-09-27  8:48       ` James Clark

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