lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e01eaa21-c335-46b4-ba0f-72dc67997c00@linux.intel.com>
Date: Tue, 2 Dec 2025 09:21:25 +0800
From: "Mi, Dapeng" <dapeng1.mi@...ux.intel.com>
To: Ian Rogers <irogers@...gle.com>, Peter Zijlstra <peterz@...radead.org>,
 Ingo Molnar <mingo@...hat.com>, Arnaldo Carvalho de Melo <acme@...nel.org>,
 Namhyung Kim <namhyung@...nel.org>,
 Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
 Jiri Olsa <jolsa@...nel.org>, Adrian Hunter <adrian.hunter@...el.com>,
 Zide Chen <zide.chen@...el.com>, linux-perf-users@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] perf test: Fix hybrid testing of event fallback test


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@...gle.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@...ux.intel.com>




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ