linux/tools/perf/tests/shell
Namhyung Kim 540c910c65 perf test: Fix perf stat JSON output test
The recent --per-cache option test caused a problem.  According to the
option name, I think it should check args.per_cache instead of
args.per_cache_instance.

  $ sudo ./perf test -v 99
   99: perf stat JSON output linter                                    :
  --- start ---
  test child forked, pid 3086101
  Checking json output: no args [Success]
  Checking json output: system wide [Success]
  Checking json output: interval [Success]
  Checking json output: event [Success]
  Checking json output: per thread [Success]
  Checking json output: per node [Success]
  Checking json output: system wide no aggregation [Success]
  Checking json output: per core [Success]
  Checking json output: per cache_instance Test failed for input:
  ...
  Traceback (most recent call last):
    File "linux/tools/perf/tests/shell/lib/perf_json_output_lint.py", line 88, in <module>
      elif args.per_core or args.per_socket or args.per_node or args.per_die or args.per_cache_instance:
  AttributeError: 'Namespace' object has no attribute 'per_cache_instance'
  test child finished with -1
  ---- end ----
  perf stat JSON output linter: FAILED!

Fixes: bfce728db3 ("pert tests: Add tests for new "perf stat --per-cache" aggregation option")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20230524210600.3095830-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2023-05-26 22:47:51 -03:00
..
coresight perf test coresight: Add unroll thread test shell script 2022-10-06 14:50:55 -03:00
lib perf test: Fix perf stat JSON output test 2023-05-26 22:47:51 -03:00
buildid.sh perf test buildid: Fix shell string substitutions 2023-01-23 10:03:07 -03:00
daemon.sh Merge remote-tracking branch 'torvalds/master' into perf/core 2021-03-29 10:39:10 -03:00
lock_contention.sh perf test: Add more test cases for perf lock contention 2023-02-02 17:18:31 -03:00
pipe_test.sh perf test: Replace pipe test workload with noploop 2022-11-20 11:32:23 -03:00
probe_vfs_getname.sh perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
record_offcpu.sh Revert "perf build: Make BUILD_BPF_SKEL default, rename to NO_BPF_SKEL" 2023-05-06 18:07:37 -03:00
record.sh perf test: Fix record test on KVM guests 2022-11-23 10:35:45 -03:00
record+probe_libc_inet_pton.sh perf test record+probe_libc_inet_pton: Fix call chain match on x86_64 2023-05-03 11:02:21 -03:00
record+script_probe_vfs_getname.sh perf tests shell: Fix check for libtracevent support 2023-02-01 21:44:26 -03:00
record+zstd_comp_decomp.sh perf tests: Remove bash construct from record+zstd_comp_decomp.sh 2021-11-13 18:11:51 -03:00
stat_all_metricgroups.sh perf test: Enable system wide for metricgroups test 2022-01-11 18:46:23 -03:00
stat_all_metrics.sh perf tests stat_all_metrics: Change true workload to sleep workload for system wide check 2023-02-17 17:22:56 -03:00
stat_all_pmu.sh perf test: Fix "all PMU test" to skip parametrized events 2022-12-21 14:52:40 -03:00
stat_bpf_counters_cgrp.sh perf test: Add a new test for perf stat cgroup BPF counter 2022-09-21 10:30:55 -03:00
stat_bpf_counters.sh perf test: Remove bash construct from stat_bpf_counters.sh test 2021-11-13 18:11:51 -03:00
stat.sh perf test: Add cputype testing to perf stat 2023-05-15 09:18:43 -03:00
stat+csv_output.sh pert tests: Add tests for new "perf stat --per-cache" aggregation option 2023-05-23 16:10:13 -03:00
stat+csv_summary.sh perf test: Add CSV summary test 2021-03-24 10:21:57 -03:00
stat+json_output.sh pert tests: Add tests for new "perf stat --per-cache" aggregation option 2023-05-23 16:10:13 -03:00
stat+shadow_stat.sh perf tests: Skip 'perf stat metrics (shadow stat) test' for hybrid 2021-04-29 10:31:00 -03:00
test_arm_callgraph_fp.sh perf test: Replace arm callgraph fp test workload with leafloop 2022-11-23 10:25:31 -03:00
test_arm_coresight.sh perf cs-etm: Add separate decode paths for timeless and per-thread modes 2023-04-24 14:42:20 -03:00
test_arm_spe_fork.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
test_arm_spe.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
test_brstack.sh perf session: Show branch speculation info in raw dump 2023-02-02 17:18:31 -03:00
test_data_symbol.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
test_intel_pt.sh perf test test_intel_pt.sh: Test sample mode with event with PMU name 2023-05-10 14:19:20 -03:00
test_java_symbol.sh perf test java symbol: Remove needless debuginfod queries 2023-05-10 12:54:53 -03:00
test_perf_data_converter_json.sh perf test: Add test validating JSON generated by 'perf data convert --to-json' 2023-05-22 15:47:48 -03:00
test_task_analyzer.sh perf test: add new task-analyzer tests 2022-12-14 11:24:31 -03:00
trace+probe_vfs_getname.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00