From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
Ian Rogers <irogers@google.com>,
James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org
Subject: [PATCH 2/4] perf test: Use shelldir to refer perf source location
Date: Thu, 18 Dec 2025 17:18:18 -0800 [thread overview]
Message-ID: <20251219011820.2505506-2-namhyung@kernel.org> (raw)
In-Reply-To: <20251219011820.2505506-1-namhyung@kernel.org>
It uses tools/perf/include which assumes it's running from the root of
the linux kernel source tree. But you can run perf from other places
like tools/perf, then the include path won't match. We can use the
shelldir variable to locate the test script in the tree.
$ cd tools/perf
$ ./perf test dlfilter
63: dlfilter C API : Ok
101: perf script --dlfilter tests : Ok
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/tests/shell/script_dlfilter.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/tests/shell/script_dlfilter.sh b/tools/perf/tests/shell/script_dlfilter.sh
index 7895ab0309b29dd5..aaed92bb78285dfd 100755
--- a/tools/perf/tests/shell/script_dlfilter.sh
+++ b/tools/perf/tests/shell/script_dlfilter.sh
@@ -68,7 +68,7 @@ test_dlfilter() {
fi
# Build the dlfilter
- if ! cc -c -I tools/perf/include -fpic -x c "${dlfilter_c}" -o "${dlfilter_so}.o"
+ if ! cc -c -I ${shelldir}/../../include -fpic -x c "${dlfilter_c}" -o "${dlfilter_so}.o"
then
echo "Basic --dlfilter test [Skip - failed to build dlfilter object]"
err=2
--
2.52.0.322.g1dd061c0dc-goog
next prev parent reply other threads:[~2025-12-19 1:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 1:18 [PATCH 1/4] perf test: Skip dlfilter test for build failures Namhyung Kim
2025-12-19 1:18 ` Namhyung Kim [this message]
2026-01-09 23:17 ` [PATCH 2/4] perf test: Use shelldir to refer perf source location Ian Rogers
2025-12-19 1:18 ` [PATCH 3/4] perf test: Do not skip when some metrics tests succeeded Namhyung Kim
2026-01-09 23:37 ` Ian Rogers
2026-01-10 0:26 ` Namhyung Kim
2025-12-19 1:18 ` [PATCH 4/4] perf test: Do not skip when some metric-group tests succeed Namhyung Kim
2026-01-09 23:39 ` Ian Rogers
2026-01-08 23:58 ` [PATCH 1/4] perf test: Skip dlfilter test for build failures Namhyung Kim
2026-01-09 23:16 ` Ian Rogers
2026-01-13 20:21 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251219011820.2505506-2-namhyung@kernel.org \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®