Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Namhyung Kim" <namhyung@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v3 6/6] perf test: Extend perf kvm tests to check default event
Date: Wed, 01 Jul 2026 20:11:42 +0000	[thread overview]
Message-ID: <20260701201142.F342C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260701194153.401218-7-namhyung@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing explicit error handling for the `perf kvm record` command in `test_kvm_default_event` causes an ungraceful script abort on failure.
--

commit 0b371c3387f66fb432d87052c8a94cad8f1c734c
Author: Namhyung Kim <namhyung@kernel.org>

perf test: Extend perf kvm tests to check default event

This commit extends the perf kvm tests by adding a check to verify that
perf kvm record can successfully handle command line arguments like
'sleep 1'.

> diff --git a/tools/perf/tests/shell/kvm.sh b/tools/perf/tests/shell/kvm.sh
> index f88e859025c42..ad208abce0a99 100755
> --- a/tools/perf/tests/shell/kvm.sh
> +++ b/tools/perf/tests/shell/kvm.sh
[ ... ]
> @@ -123,6 +123,15 @@ test_kvm_stat_live() {
>  	echo "perf kvm stat live test [Success]"
>  }
>  
> +test_kvm_default_event() {
> +	echo "Testing perf kvm record default event with command line"
> +
> +	# Check if kvm record with default events handle command line arguments
> +	perf kvm record -p "${qemu_pid}" -o /dev/null sleep 1

[Severity: Low]
Since this script runs with set -e enabled globally, could a failure in this
perf command cause an immediate script abort rather than a graceful test
failure?

Other tests in this file appear to use a conditional error check pattern
(if ! ...; then err=1; return; fi) to catch failures and report them properly
without triggering the EXIT trap prematurely. Would it be better to wrap this
command with similar error handling?

> +
> +	echo "perf kvm record default event [Success]"
> +}
> +

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260701194153.401218-1-namhyung@kernel.org?part=6

  reply	other threads:[~2026-07-01 20:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 19:41 [PATCH v3 0/6] perf kvm: A small update in the default arch event Namhyung Kim
2026-07-01 19:41 ` [PATCH v3 1/6] perf kvm: Factor out kvm_need_default_arch_event() Namhyung Kim
2026-07-01 19:59   ` sashiko-bot
2026-07-01 19:41 ` [PATCH v3 2/6] perf kvm: Check kvm_need_default_arch_event() early Namhyung Kim
2026-07-01 19:41 ` [PATCH v3 3/6] perf kvm: Kill STRDUP_FAIL_EXIT() Namhyung Kim
2026-07-01 19:41 ` [PATCH v3 4/6] perf kvm: Do not copy filename string Namhyung Kim
2026-07-01 19:41 ` [PATCH v3 5/6] perf kvm: Fix a memory leak in the usage string Namhyung Kim
2026-07-01 19:41 ` [PATCH v3 6/6] perf test: Extend perf kvm tests to check default event Namhyung Kim
2026-07-01 20:11   ` sashiko-bot [this message]
2026-07-02  4:09 ` [PATCH v3 0/6] perf kvm: A small update in the default arch event 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=20260701201142.F342C1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox