a84260e3 | 25-Aug-2023 |
Namhyung Kim <namhyung@kernel.org> |
perf test stat_bpf_counters_cgrp: Enhance perf stat cgroup BPF counter test
It has system-wide test and cpu-list test but the cpu-list test fails sometimes. It runs sleep command on CPU1 and measur
perf test stat_bpf_counters_cgrp: Enhance perf stat cgroup BPF counter test
It has system-wide test and cpu-list test but the cpu-list test fails sometimes. It runs sleep command on CPU1 and measure both user.slice and system.slice cgroups by default (on systemd-based systems).
But if the system was idle enough, sometime the system.slice gets no count and it makes the test failing. Maybe that's because it only looks at the CPU1, let's add CPU0 to increase the chance it finds some tasks.
Fixes: 7901086014bbaa3a ("perf test: Add a new test for perf stat cgroup BPF counter") Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230825164152.165610-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
68ca249c | 25-Aug-2023 |
Namhyung Kim <namhyung@kernel.org> |
perf test shell stat_bpf_counters: Fix test on Intel
As of now, bpf counters (bperf) don't support event groups. But the default perf stat includes topdown metrics if supported (on recent Intel mac
perf test shell stat_bpf_counters: Fix test on Intel
As of now, bpf counters (bperf) don't support event groups. But the default perf stat includes topdown metrics if supported (on recent Intel machines) which require groups. That makes perf stat exiting.
$ sudo perf stat --bpf-counter true bpf managed perf events do not yet support groups.
Actually the test explicitly uses cycles event only, but it missed to pass the option when it checks the availability of the command.
Fixes: 2c0cb9f56020d2ea ("perf test: Add a shell test for 'perf stat --bpf-counters' new option") Reviewed-by: Song Liu <song@kernel.org> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: bpf@vger.kernel.org Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230825164152.165610-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
6f769c34 | 15-Aug-2023 |
Arnaldo Carvalho de Melo <acme@redhat.com> |
perf tests trace+probe_vfs_getname.sh: Accept quotes surrounding the filename
With augmented_raw_syscalls transformed into a BPF skel made the output have a " around the filenames, which is not what
perf tests trace+probe_vfs_getname.sh: Accept quotes surrounding the filename
With augmented_raw_syscalls transformed into a BPF skel made the output have a " around the filenames, which is not what the old perf probe vfs_getname method of obtaining filenames did, so accept the augmented way, with the quotes.
At this point probably removing all the logic for the vfs_getname method is in order, will do it at some point.
For now lets accept with/without quotes and make that test pass.
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/lkml/ Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
35578a55 | 09-Jul-2023 |
Athira Rajeev <atrajeev@linux.vnet.ibm.com> |
perf tests stat+std_output: Fix shellcheck warnings about word splitting/quoting and local variables
Running shellcheck on stat_std_output testcase throws below warning:
In tests/shell/stat+std_
perf tests stat+std_output: Fix shellcheck warnings about word splitting/quoting and local variables
Running shellcheck on stat_std_output testcase throws below warning:
In tests/shell/stat+std_output.sh line 9: . $(dirname $0)/lib/stat_output.sh ^-----------^ SC2046 (warning): Quote this to prevent word splitting.
In tests/shell/stat+std_output.sh line 32: local -i cnt=0 ^-^ SC2034 (warning): cnt appears unused. Verify use (or export if used externally).
Fixed the warning by adding quotes to avoid word splitting and removed unused variable "cnt" at line 32.
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230709182800.53002-27-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
8439b44a | 09-Jul-2023 |
Athira Rajeev <atrajeev@linux.vnet.ibm.com> |
perf tests stat+std_output: Fix shellcheck warnings about word splitting/quoting
Running shellcheck on stat+csv_output.sh throws below warning:
In tests/shell/stat+csv_output.sh line 9: . $(d
perf tests stat+std_output: Fix shellcheck warnings about word splitting/quoting
Running shellcheck on stat+csv_output.sh throws below warning:
In tests/shell/stat+csv_output.sh line 9: . $(dirname $0)/lib/stat_output.sh ^-----------^ SC2046 (warning): Quote this to prevent word splitting.
Fixed the warning by adding quotes to avoid word splitting.
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230709182800.53002-26-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
eef1fb50 | 09-Jul-2023 |
Kajol Jain <kjain@linux.ibm.com> |
perf tests lib stat_output: Fix shellcheck warning about missing shebang
Running shellcheck on stat_output.sh throws below warning:
In tests/shell/lib/stat_output.sh line 1: ^-- SC2148 (error): Tip
perf tests lib stat_output: Fix shellcheck warning about missing shebang
Running shellcheck on stat_output.sh throws below warning:
In tests/shell/lib/stat_output.sh line 1: ^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
Fixed the warning by adding shell directive.
Signed-off-by: Kajol Jain <kjain@linux.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230709182800.53002-25-atrajeev@linux.vnet.ibm.com Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
1f14b8af | 09-Jul-2023 |
Kajol Jain <kjain@linux.ibm.com> |
perf tests coresight thread_loop_check_tid_2: Fix shellcheck warnings about word splitting/quoting
Running shellcheck on thread_loop_check_tid_2.sh throws below warning:
In tests/shell/coresight/th
perf tests coresight thread_loop_check_tid_2: Fix shellcheck warnings about word splitting/quoting
Running shellcheck on thread_loop_check_tid_2.sh throws below warning:
In tests/shell/coresight/thread_loop_check_tid_2.sh line 8: . $(dirname $0)/../lib/coresight.sh ^-----------^ SC2046 (warning): Quote this to prevent word splitting.
Fixed the warning by adding quotes to avoid word splitting.
Signed-off-by: Kajol Jain <kjain@linux.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230709182800.53002-24-atrajeev@linux.vnet.ibm.com Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
3a4367c1 | 09-Jul-2023 |
Athira Rajeev <atrajeev@linux.vnet.ibm.com> |
perf tests record+zstd_comp_decomp: Fix the shellcheck warnings about word splitting/quoting
Running shellcheck on record+zstd_comp_decomp.sh testcases throws below warning:
In tests/shell/recor
perf tests record+zstd_comp_decomp: Fix the shellcheck warnings about word splitting/quoting
Running shellcheck on record+zstd_comp_decomp.sh testcases throws below warning:
In tests/shell/record+zstd_comp_decomp.sh line 16: $perf_tool record -o $trace_file $gflag -z -F 5000 -- \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean: $perf_tool record -o "$trace_file" $gflag -z -F 5000 -- \
In tests/shell/record+zstd_comp_decomp.sh line 22: $perf_tool report -i $trace_file --header --stats | \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.
Added double quote around file names to fix these shellcheck reported issues.
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230709182800.53002-23-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
1e094f92 | 09-Jul-2023 |
Athira Rajeev <atrajeev@linux.vnet.ibm.com> |
perf tests lib waiting: Fix the shellcheck warnings about missing shebang
Running shellcheck in "lib/waiting.sh" generates below warning:
In ./tools/perf/tests/shell/lib/waiting.sh line 1: #
perf tests lib waiting: Fix the shellcheck warnings about missing shebang
Running shellcheck in "lib/waiting.sh" generates below warning:
In ./tools/perf/tests/shell/lib/waiting.sh line 1: # SPDX-License-Identifier: GPL-2.0 ^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
Fix this by adding shebang in the beginning of the script.
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230709182800.53002-20-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
a5f3171b | 09-Jul-2023 |
Athira Rajeev <atrajeev@linux.vnet.ibm.com> |
perf tests lib probe_vfs_getname: Fix shellcheck warnings about missing shebang/local variables
Running shellcheck on probe_vfs_getname fails with below warning:
In ./tools/perf/tests/shell/lib/
perf tests lib probe_vfs_getname: Fix shellcheck warnings about missing shebang/local variables
Running shellcheck on probe_vfs_getname fails with below warning:
In ./tools/perf/tests/shell/lib/probe_vfs_getname.sh line 1: # Arnaldo Carvalho de Melo <acme@kernel.org>, 2017 ^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
In ./tools/perf/tests/shell/lib/probe_vfs_getname.sh line 14: local verbose=$1 ^-----------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
Fix this: - by adding shebang in the beginning of the file and - rename variable verbose to "add_probe_verbose" after removing local
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230709182800.53002-19-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
b19de09b | 09-Jul-2023 |
Athira Rajeev <atrajeev@linux.vnet.ibm.com> |
perf tests unroll_loop_thread_10: Fix shellcheck warnings about word splitting/quoting
Fix the shellcheck warnings for unroll_loop_thread_10.sh Add quotes to prevent word splitting which are caused
perf tests unroll_loop_thread_10: Fix shellcheck warnings about word splitting/quoting
Fix the shellcheck warnings for unroll_loop_thread_10.sh Add quotes to prevent word splitting which are caused by unquoted command expansions.
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230709182800.53002-18-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
5fe05312 | 09-Jul-2023 |
Athira Rajeev <atrajeev@linux.vnet.ibm.com> |
perf tests thread_loop_check_tid_10: Fix shellcheck warnings bout word splitting/quoting
Fix the shellcheck warnings for thread_loop_check_tid_10.sh
In ./tools/perf/tests/shell/coresight/thread_
perf tests thread_loop_check_tid_10: Fix shellcheck warnings bout word splitting/quoting
Fix the shellcheck warnings for thread_loop_check_tid_10.sh
In ./tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh line 8: . $(dirname $0)/../lib/coresight.sh ^-----------^ SC2046 (warning): Quote this to prevent word splitting.
Add quotes to prevent word splitting which are caused by unquoted command expansions.
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230709182800.53002-17-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
05ef238c | 09-Jul-2023 |
Kajol Jain <kjain@linux.ibm.com> |
perf tests lib probe: Fix shellcheck warning about about missing shebang
Running shellcheck on probe.sh throws below warning:
In lib/probe.sh line 1: ^-- SC2148 (error): Tips depend on target shell
perf tests lib probe: Fix shellcheck warning about about missing shebang
Running shellcheck on probe.sh throws below warning:
In lib/probe.sh line 1: ^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
Fixed the warnings by adding shell directive.
Signed-off-by: Kajol Jain <kjain@linux.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230709182800.53002-14-atrajeev@linux.vnet.ibm.com Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
5f83f1d5 | 09-Jul-2023 |
Kajol Jain <kjain@linux.ibm.com> |
perf tests memcpy_thread_16k_10: Fix shellcheck warning about word splitting/quote
Running shellcheck on memcpy_thread_16k_10.sh throws below warning:
In memcpy_thread_16k_10.sh line 8: . $(dirname
perf tests memcpy_thread_16k_10: Fix shellcheck warning about word splitting/quote
Running shellcheck on memcpy_thread_16k_10.sh throws below warning:
In memcpy_thread_16k_10.sh line 8: . $(dirname $0)/../lib/coresight.sh ^-----------^ SC2046 (warning): Quote this to prevent word splitting.
Fixed the warning by adding quotes to avoid word splitting.
ShellCheck result with patch: # shellcheck -S warning coresight/memcpy_thread_16k_10.sh #
Signed-off-by: Kajol Jain <kjain@linux.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230709182800.53002-13-atrajeev@linux.vnet.ibm.com Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
60f253ea | 09-Jul-2023 |
Kajol Jain <kjain@linux.ibm.com> |
perf tests asm_pure_loop: Fix shellcheck warning about word splitting/quote
Running shellcheck on asm_pure_loop.sh throws below warning:
In coresight/asm_pure_loop.sh line 8: . $(dirname $0)/../lib
perf tests asm_pure_loop: Fix shellcheck warning about word splitting/quote
Running shellcheck on asm_pure_loop.sh throws below warning:
In coresight/asm_pure_loop.sh line 8: . $(dirname $0)/../lib/coresight.sh ^-----------^ SC2046 (warning): Quote this to prevent word splitting.
Fixed the warning by adding quotes to avoid word splitting.
ShellCheck result with patch: # shellcheck -S warning coresight/asm_pure_loop.sh #
Signed-off-by: Kajol Jain <kjain@linux.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230709182800.53002-12-atrajeev@linux.vnet.ibm.com Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
d13841e7 | 09-Jul-2023 |
Athira Rajeev <atrajeev@linux.vnet.ibm.com> |
perf tests stat+shadow_stat: Fix shellcheck warning about unused variable
Running shellcheck on stat+shadow_stat.sh generates below warning:
In tests/shell/stat+shadow_stat.sh line 48: whil
perf tests stat+shadow_stat: Fix shellcheck warning about unused variable
Running shellcheck on stat+shadow_stat.sh generates below warning:
In tests/shell/stat+shadow_stat.sh line 48: while read cpu num evt hash ipc rest ^--^ SC2034 (warning): hash appears unused. Verify use (or export if used externally).
This variable is intentionally unused since it is needed to parse through the output. Use "_" as a prefix for this throw away variable.
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230709182800.53002-11-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
d10eedd8 | 09-Jul-2023 |
Athira Rajeev <atrajeev@linux.vnet.ibm.com> |
perf tests stat_bpf_counters: Fix usage of '==' to address shellcheck warning
Running shellcheck on stat_bpf_counter.sh generates below warning:
In tests/shell/stat_bpf_counters.sh line 34: i
perf tests stat_bpf_counters: Fix usage of '==' to address shellcheck warning
Running shellcheck on stat_bpf_counter.sh generates below warning:
In tests/shell/stat_bpf_counters.sh line 34: if [ "$base_cycles" == "<not" ]; then ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.
In tests/shell/stat_bpf_counters.sh line 39: if [ "$bpf_cycles" == "<not" ]; then ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.
Fix this by using "=" instead of "==" to work for all shells.
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230709182800.53002-10-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
38b3fa07 | 09-Jul-2023 |
Athira Rajeev <atrajeev@linux.vnet.ibm.com> |
perf tests perf_dat _converter_json: Use quoting to avoid word splitting
Running shellcheck on test_perf_data_converter_json.sh throws below warning:
In tests/shell/test_perf_data_converter_json
perf tests perf_dat _converter_json: Use quoting to avoid word splitting
Running shellcheck on test_perf_data_converter_json.sh throws below warning:
In tests/shell/test_perf_data_converter_json.sh line 42: if [ $(cat "${result}" | wc -l) -gt "0" ] ; then ^------------------------^ SC2046 (warning): Quote this to prevent word splitting.
Fixed the warning by adding quotes to avoid word splitting.
ShellCheck result with patch: # shellcheck -S warning test_perf_data_converter_json.sh #
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230709182800.53002-9-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
faae152a | 09-Jul-2023 |
Athira Rajeev <atrajeev@linux.vnet.ibm.com> |
perf tests stat+csv_summary: Fix unused variable references detected via shellcheck
Running shellcheck on stat+csv_summary.sh throws below warnings:
In tests/shell/stat+csv_summary.sh line 26:
perf tests stat+csv_summary: Fix unused variable references detected via shellcheck
Running shellcheck on stat+csv_summary.sh throws below warnings:
In tests/shell/stat+csv_summary.sh line 26: while read num event run pct ^-^ SC2034 (warning): num appears unused. Verify use (or export if used externally). ^---^ SC2034 (warning): event appears unused. Verify use (or export if used externally). ^-^ SC2034 (warning): run appears unused. Verify use (or export if used externally). ^-^ SC2034 (warning): pct appears unused. Verify use (or export if used externally).
These variables are intentionally unused since they are needed to parse through the output. Use "_" as a prefix for these throw away variables.
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230709182800.53002-8-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|