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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 5 May 2023 16:43:51 -0700
From:   Namhyung Kim <namhyung@...nel.org>
To:     Sandipan Das <sandipan.das@....com>
Cc:     linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        acme@...nel.org, peterz@...radead.org, mingo@...hat.com,
        mark.rutland@....com, alexander.shishkin@...ux.intel.com,
        jolsa@...nel.org, irogers@...gle.com, adrian.hunter@...el.com,
        terrelln@...com, ravi.bangoria@....com, ananth.narayan@....com
Subject: Re: [PATCH 2/2] perf test: Add stat test for record and script

On Fri, May 5, 2023 at 3:03 AM Sandipan Das <sandipan.das@....com> wrote:
>
> When using the global aggregation mode, running perf script after perf
> stat record can result in a segmentation fault as seen with commit
> 8b76a3188b85 ("perf stat: Remove unused perf_counts.aggr field"). Add a
> basic test to the existing suite of stat-related tests for checking if
> that workflow runs without erroring out.
>
> Signed-off-by: Sandipan Das <sandipan.das@....com>

Acked-by: Namhyung Kim <namhyung@...nel.org>

Thanks,
Namhyung


> ---
>  tools/perf/tests/shell/stat.sh | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/tools/perf/tests/shell/stat.sh b/tools/perf/tests/shell/stat.sh
> index 2c1d3f704995..b154fbb15d54 100755
> --- a/tools/perf/tests/shell/stat.sh
> +++ b/tools/perf/tests/shell/stat.sh
> @@ -28,6 +28,18 @@ test_stat_record_report() {
>    echo "stat record and report test [Success]"
>  }
>
> +test_stat_record_script() {
> +  echo "stat record and script test"
> +  if ! perf stat record -o - true | perf script -i - 2>&1 | \
> +    grep -E -q "CPU[[:space:]]+THREAD[[:space:]]+VAL[[:space:]]+ENA[[:space:]]+RUN[[:space:]]+TIME[[:space:]]+EVENT"
> +  then
> +    echo "stat record and script test [Failed]"
> +    err=1
> +    return
> +  fi
> +  echo "stat record and script test [Success]"
> +}
> +
>  test_stat_repeat_weak_groups() {
>    echo "stat repeat weak groups test"
>    if ! perf stat -e '{cycles,cycles,cycles,cycles,cycles,cycles,cycles,cycles,cycles,cycles}' \
> @@ -93,6 +105,7 @@ test_topdown_weak_groups() {
>
>  test_default_stat
>  test_stat_record_report
> +test_stat_record_script
>  test_stat_repeat_weak_groups
>  test_topdown_groups
>  test_topdown_weak_groups
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ