From: sashiko-bot@kernel.org
To: "Thomas Richter" <tmricht@linux.ibm.com>
Cc: linux-perf-users@vger.kernel.org, linux-s390@vger.kernel.org,
"Vasily Gorbik" <gor@linux.ibm.com>,
"Heiko Carstens" <hca@linux.ibm.com>,
"Alexander Gordeev" <agordeev@linux.ibm.com>
Subject: Re: [PATCH linux-next] perf test: Skip failing 'perf test aslr' test case
Date: Fri, 19 Jun 2026 09:42:33 +0000 [thread overview]
Message-ID: <20260619094233.CBA9B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260619093531.4038655-1-tmricht@linux.ibm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Unconditionally setting `err=2` when skipping `test_callchain_aslr` masks prior test failures.
- [Medium] Skipping the test incorrectly triggers the test failure cleanup path, leaking the temporary directory in `/tmp/`.
--
commit d772895777a1677561d1802ac157c32ce73e1379
Author: Thomas Richter <tmricht@linux.ibm.com>
perf test: Skip failing 'perf test aslr' test case
The test case 'perf test aslr' fails on s390. This commit fixes the failure
by skipping the subtest test_callchain_aslr and emitting a hint when the
--call-graph dwarf option is selected.
Fixes: 60bc9fbc0589 ("perf test: Add inject ASLR test")
> diff --git a/tools/perf/tests/shell/inject_aslr.sh b/tools/perf/tests/shell/inject_aslr.sh
> index c00461828ea79..7fdb43679dc84 100755
> --- a/tools/perf/tests/shell/inject_aslr.sh
> +++ b/tools/perf/tests/shell/inject_aslr.sh
> @@ -135,8 +135,15 @@ test_callchain_aslr() {
> echo "Callchain ASLR test [Failed - no noploop samples in original file]"
> err=1
> elif [ -z "$new_addr" ]; then
> - echo "Callchain ASLR test [Failed - could not find remapped address]"
> - err=1
> + if perf evlist -v -i "${data}" | grep -q 'sample_type:.*STACK_USER'; then
> + echo "Dropping stack user sample as possible ASLR leak"
> + echo "Call-graph dwarf not supported with 'perf inject --aslr'"
> + echo "Callchain ASLR test [Skip]"
> + err=2
[Severity: Medium]
Does unconditionally setting err=2 here mask prior test failures?
If an earlier subtest fails, the global err variable is set to 1. When
test_callchain_aslr() decides to skip and assigns err=2, it overwrites
this previous failure state.
Since the perf test framework treats an exit code of 2 as a SKIP, the test
suite will report the entire script as skipped, completely hiding the
actual failure from the prior subtest.
[Severity: Medium]
Will skipping this test inadvertently trigger the test failure cleanup path
and leak the temporary directory?
The cleanup() function in tools/perf/tests/shell/inject_aslr.sh explicitly
aborts deletion if the exit code or err is non-zero:
cleanup() {
if [ "${exit_code}" -ne 0 ] || [ "${err}" -ne 0 ]; then
echo "Test failed! Preserving temp directory: ${temp_dir}"
return
fi
...
}
Because cleanup() was not updated to handle the new skip state, it
mistakenly treats err=2 as a test failure. This unconditionally leaves
behind the /tmp/perf-test-aslr.XXXXXX directory every time the test skips.
> + else
> + echo "Callchain ASLR test [Failed - could not find remapped address]"
> + err=1
> + fi
> elif [ "$orig_addr" = "$new_addr" ]; then
> echo "Callchain ASLR test [Failed - addresses are not remapped]"
> err=1
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260619093531.4038655-1-tmricht@linux.ibm.com?part=1
prev parent reply other threads:[~2026-06-19 9:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-19 9:35 [PATCH linux-next] perf test: Skip failing 'perf test aslr' test case Thomas Richter
2026-06-19 9:42 ` sashiko-bot [this message]
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=20260619094233.CBA9B1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tmricht@linux.ibm.com \
/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