From: sashiko-bot@kernel.org
To: "Arnaldo Carvalho de Melo" <acme@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v9 04/13] perf tests: Exercise DW_OP_addrx global variables
Date: Fri, 20 Nov 2026 01:45:11 +0000 [thread overview]
Message-ID: <sashiko-outbox-224336@kernel.org> (raw)
In-Reply-To: <20261120013211.1510-5-acme@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] perf tests: unguarded failure grep under set -e triggers EXIT
trap
--
commit 85567045cfa714e73c50921ddd5598aea7a2e83d
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
perf tests: Exercise DW_OP_addrx global variables
This commit adds a global_data test workload and a shell test that checks
DWARF global variable data-type resolution via perf mem record and perf
annotate --code-with-type.
> diff --git a/tools/perf/tests/shell/data_type_global.sh b/tools/perf/tests/shell/data_type_global.sh
> new file mode 100755
> index 0000000000000..11fbf852b44cf
> --- /dev/null
> +++ b/tools/perf/tests/shell/data_type_global.sh
> @@ -0,0 +1,73 @@
> +#!/bin/bash
> +# perf data type profiling test for a global variable
> +# SPDX-License-Identifier: GPL-2.0
> +
> +set -e
> +
> +perfdata=$(mktemp /tmp/__perf_test.perf.data.XXXXX)
> +perfout=$(mktemp /tmp/__perf_test.perf.out.XXXXX)
> +perferr=$(mktemp /tmp/__perf_test.perf.err.XXXXX)
> +
> +cleanup()
> +{
> + rm -f "$perfdata" "$perfout" "$perferr"
> + trap - EXIT TERM INT
> +}
> +
> +trap_cleanup()
> +{
> + echo "Unexpected signal in ${FUNCNAME[1]}"
> + cleanup
> + exit 1
> +}
> +trap trap_cleanup EXIT TERM INT
[ ... ]
> +for member in "+0 (saddr)" "+0x4 (daddr)" "+0x8 (bytes)"; do
> + if ! grep -Fq "# data-type: struct conn ${member}" "$perfout"; then
> + echo "FAIL: member ${member} not resolved"
> + grep 'struct conn' "$perfout"
> + cleanup
> + exit 1
> + fi
> +done
[Severity: Low]
Will the diagnostic grep 'struct conn' "$perfout" trigger trap_cleanup()
when struct conn is not resolved at all? With set -e enabled, a
non-matching grep exits before cleanup() can disarm the EXIT trap,
causing trap_cleanup() to print "Unexpected signal in main". Appending
"|| true" to the grep avoids this.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120013211.1510-1-acme@kernel.org?part=4
next prev parent reply other threads:[~2026-11-20 1:45 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 1:31 [PATCH v9 00/13] perf coverage: A harness for perf, and the fixes it found Arnaldo Carvalho de Melo
2026-11-20 1:31 ` [PATCH v9 01/13] perf build: Link the GTK UI with EXTRA_CFLAGS Arnaldo Carvalho de Melo
2026-11-20 1:38 ` sashiko-bot
2026-11-20 1:31 ` [PATCH v9 02/13] perf scripts: Add a coverage harness for perf Arnaldo Carvalho de Melo
2026-11-20 1:40 ` sashiko-bot
2026-11-20 1:31 ` [PATCH v9 03/13] perf annotate: Handle absolute addressing in data type profiling Arnaldo Carvalho de Melo
2026-11-20 1:49 ` sashiko-bot
2026-11-20 1:31 ` [PATCH v9 04/13] perf tests: Exercise DW_OP_addrx global variables Arnaldo Carvalho de Melo
2026-11-20 1:45 ` sashiko-bot [this message]
2026-11-20 1:32 ` [PATCH v9 05/13] perf tests: Exercise the flexible array member path Arnaldo Carvalho de Melo
2026-11-20 1:38 ` sashiko-bot
2026-11-20 1:32 ` [PATCH v9 06/13] perf annotate-data: Count flexible array accesses for the whole struct Arnaldo Carvalho de Melo
2026-11-20 1:41 ` sashiko-bot
2026-11-20 1:32 ` [PATCH v9 07/13] perf tests: Exercise data type resolution from a register Arnaldo Carvalho de Melo
2026-11-20 1:39 ` sashiko-bot
2026-11-20 1:32 ` [PATCH v9 08/13] perf annotate: Print the stats after the annotations Arnaldo Carvalho de Melo
2026-11-20 1:37 ` sashiko-bot
2026-11-20 1:32 ` [PATCH v9 09/13] perf tests: Silence the libbfd probe in build-test Arnaldo Carvalho de Melo
2026-11-20 1:35 ` sashiko-bot
2026-11-20 1:32 ` [PATCH v9 10/13] perf build: Record the features checked outside FEATURE_TESTS Arnaldo Carvalho de Melo
2026-11-20 1:40 ` sashiko-bot
2026-11-20 1:32 ` [PATCH v9 11/13] perf tests: Fix the Intel PT virtual LBR check Arnaldo Carvalho de Melo
2026-11-20 1:39 ` sashiko-bot
2026-11-20 1:32 ` [PATCH v9 12/13] perf test: Drop samples without an IP in the dlfilter test Arnaldo Carvalho de Melo
2026-11-20 1:39 ` sashiko-bot
2026-11-20 1:32 ` [PATCH v9 13/13] perf test: Skip the LBR inline unwinding check when unsupported Arnaldo Carvalho de Melo
2026-11-20 1:39 ` sashiko-bot
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=sashiko-outbox-224336@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=acme@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.