All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ian Rogers" <irogers@google.com>
Cc: linux-perf-users@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH v3 5/7] perf test: Enhance annotate test coverage and isolate config
Date: Tue, 09 Jun 2026 18:46:52 +0000	[thread overview]
Message-ID: <20260609184653.5F7D71F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260609182108.975586-6-irogers@google.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch adds a test for a non-existent 'libasm' disassembler backend and feature, resulting in permanently skipped dead code due to AI hallucination.
--

commit a204be6f7db310b7e87e271b24c42730bafc0573
Author: Ian Rogers <irogers@google.com>

perf test: Enhance annotate test coverage and isolate config

This commit updates the annotate.sh test to verify different disassembler 
backends like objdump, llvm, and capstone. It also isolates the test script 
from host environment pollution by exporting PERF_CONFIG=/dev/null.

> diff --git a/tools/perf/tests/shell/annotate.sh b/tools/perf/tests/shell/annotate.sh
> index 689de58e92384..eae6a46a247b4 100755
> --- a/tools/perf/tests/shell/annotate.sh
> +++ b/tools/perf/tests/shell/annotate.sh
[ ... ]
> @@ -106,8 +108,66 @@ test_basic() {
[ ... ]
> +# Restore perfdata to a regular format for disassembler tests
> +perf record -o "${perfdata}" ${testprog} > /dev/null 2>&1
> +
> +if [ "${err}" -eq 0 ]
> +then
> +  test_disassembler "objdump" ""
> +  test_disassembler "llvm" "libLLVM"
> +  test_disassembler "capstone" "libcapstone"
> +  test_disassembler "libasm" "libasm"

[Severity: Low]
Is "libasm" a supported feature in perf?

It does not appear to be defined in the supported_features array or as a valid
disassembler backend in perf. Because of this, the check in test_disassembler():

    if ! perf check feature "${feature}" > /dev/null 2>&1
    then
      echo "Skip test for ${disassembler} (feature ${feature} not supported)"
      return 0
    fi

will always fail, causing this subtest to silently print the skip message and
return 0 on every execution. 

Should this test case be removed?

> +fi
> +
>  cleanup
>  exit $err

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260609182108.975586-1-irogers@google.com?part=5

  reply	other threads:[~2026-06-09 18:46 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09  7:07 [PATCH v2 0/7] perf annotate: Add elfutils libasm disassembler support Ian Rogers
2026-06-09  7:07 ` [PATCH v2 1/7] tools build: Add feature check for elfutils libasm Ian Rogers
2026-06-09  7:21   ` sashiko-bot
2026-06-09  7:07 ` [PATCH v2 2/7] perf build: Add build support and capability " Ian Rogers
2026-06-09  7:19   ` sashiko-bot
2026-06-09  7:07 ` [PATCH v2 3/7] perf annotate: Implement elfutils libasm disassembler backend Ian Rogers
2026-06-09  7:07 ` [PATCH v2 4/7] perf annotate: Add --disassembler command-line option Ian Rogers
2026-06-09  7:07 ` [PATCH v2 5/7] perf test: Enhance annotate test coverage and isolate config Ian Rogers
2026-06-09  7:15   ` sashiko-bot
2026-06-09  7:07 ` [PATCH v2 6/7] perf annotate: Support BPF JIT disassembly via genelf Ian Rogers
2026-06-09  7:22   ` sashiko-bot
2026-06-09  7:07 ` [PATCH v2 7/7] perf test: Add BPF JIT annotation test coverage for all disassemblers Ian Rogers
2026-06-09  7:18   ` sashiko-bot
2026-06-09 18:21 ` [PATCH v3 0/7] perf annotate: Add elfutils libasm disassembler and BPF JIT disassembly support Ian Rogers
2026-06-09 18:21   ` [PATCH v3 1/7] tools build: Add feature check for elfutils libasm Ian Rogers
2026-06-09 18:46     ` sashiko-bot
2026-06-09 18:21   ` [PATCH v3 2/7] perf build: Add build support and capability " Ian Rogers
2026-06-09 18:21   ` [PATCH v3 3/7] perf annotate: Implement elfutils libasm disassembler backend Ian Rogers
2026-06-09 18:52     ` sashiko-bot
2026-06-09 18:21   ` [PATCH v3 4/7] perf annotate: Add --disassembler command-line option Ian Rogers
2026-06-09 18:21   ` [PATCH v3 5/7] perf test: Enhance annotate test coverage and isolate config Ian Rogers
2026-06-09 18:46     ` sashiko-bot [this message]
2026-06-09 18:21   ` [PATCH v3 6/7] perf annotate: Support BPF JIT disassembly via genelf Ian Rogers
2026-06-09 18:49     ` sashiko-bot
2026-06-09 18:21   ` [PATCH v3 7/7] perf test: Add BPF JIT annotation test coverage for all disassemblers Ian Rogers

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=20260609184653.5F7D71F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=irogers@google.com \
    --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.