[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220903000210.1112014-1-namhyung@kernel.org>
Date: Fri, 2 Sep 2022 17:02:10 -0700
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
Jiri Olsa <jolsa@...nel.org>
Cc: Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
LKML <linux-kernel@...r.kernel.org>,
Ian Rogers <irogers@...gle.com>,
linux-perf-users@...r.kernel.org, Marco Elver <elver@...gle.com>
Subject: [PATCH] perf test: Skip sigtrap test on old kernels
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@...gle.com>
Signed-off-by: Namhyung Kim <namhyung@...nel.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
Powered by blists - more mailing lists