linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Mi, Dapeng" <dapeng1.mi@linux.intel.com>
To: Ian Rogers <irogers@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Zide Chen <zide.chen@intel.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] perf test: Fix hybrid testing of event fallback test
Date: Tue, 2 Dec 2025 09:21:25 +0800	[thread overview]
Message-ID: <e01eaa21-c335-46b4-ba0f-72dc67997c00@linux.intel.com> (raw)
In-Reply-To: <20251201231136.293248-1-irogers@google.com>


On 12/2/2025 7:11 AM, Ian Rogers wrote:
> The mem-loads-aux event exists on hybrid systems but the "cpu" PMU
> does not. This causes an event parsing error which erroneously makes
> the test look like it is failing. Avoid naming the PMU to avoid
> this. Rather than cleaning up perf.data in the directory the test is
> run, explicitly send the 'perf record' output to /dev/null and avoid
> any cleanup scripts.
>
> Fixes: fc9c17b22352 ("perf test: Add a perf event fallback test")
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  .../tests/shell/test_event_open_fallback.sh   | 19 ++-----------------
>  1 file changed, 2 insertions(+), 17 deletions(-)
>
> diff --git a/tools/perf/tests/shell/test_event_open_fallback.sh b/tools/perf/tests/shell/test_event_open_fallback.sh
> index 9c411153c01b..9420a7557c13 100755
> --- a/tools/perf/tests/shell/test_event_open_fallback.sh
> +++ b/tools/perf/tests/shell/test_event_open_fallback.sh
> @@ -6,24 +6,9 @@ skip_cnt=0
>  ok_cnt=0
>  err_cnt=0
>  
> -cleanup()
> -{
> -	rm -f perf.data
> -	rm -f perf.data.old
> -	trap - EXIT TERM INT
> -}
> -
> -trap_cleanup()
> -{
> -	cleanup
> -	exit 1
> -}
> -
> -trap trap_cleanup EXIT TERM INT
> -
>  perf_record()
>  {
> -	perf record "$@" -- true 1>/dev/null 2>&1
> +	perf record -o /dev/null "$@" -- true 1>/dev/null 2>&1
>  }
>  
>  test_decrease_precise_ip()
> @@ -49,7 +34,7 @@ test_decrease_precise_ip_complicated()
>  
>  	perf list pmu | grep -q 'mem-loads-aux' || return 2
>  
> -	if ! perf_record -e '{cpu/mem-loads-aux/S,cpu/mem-loads/PS}'; then
> +	if ! perf_record -e '{mem-loads-aux:S,mem-loads:PS}'; then
>  		return 1
>  	fi
>  	return 0

Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>




  reply	other threads:[~2025-12-02  1:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-01 23:11 [PATCH v1] perf test: Fix hybrid testing of event fallback test Ian Rogers
2025-12-02  1:21 ` Mi, Dapeng [this message]
2025-12-02 21:41 ` Namhyung Kim
2025-12-02 23:05   ` Ian Rogers
2025-12-02 23:59     ` Namhyung Kim
2025-12-03 17:58 ` Namhyung Kim

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=e01eaa21-c335-46b4-ba0f-72dc67997c00@linux.intel.com \
    --to=dapeng1.mi@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=zide.chen@intel.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;
as well as URLs for NNTP newsgroup(s).