perf test: Improve shellcheck source directives
Status from this message: Thanks, applied to perf-tools-next, for v7.4.
Get series with b4
b4 am 20260921-james-perf-shellcheck-source-v1-0-adcfc107c997@linaro.org change-id 20260921-james-perf-shellcheck-source-f48df891cd4fVersions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | perf test: Remove redundant shellcheck source pathstools/ tools/ tools/ +28 more | +0 | 0 replies | |
| 2/2 | perf build: Follow sourced files when running shellchecktools/ | +1 | 0 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Namhyung Kim |
|---|---|
| Series | A-b |
| 1/2 | |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] perf test: Improve shellcheck source directives
I was hacking away when I got blocked by a shellcheck warning about an unassigned variable, despite that variable being assigned in a sourced file and having visibly correct source= directive.
Confusingly two things turned out to be relevant to this. One is that -a doesn't make shellcheck follow "external" paths, which these are treated as. You need -x for that. Secondly, the source= directives don't cause it to follow the path either, they just suppress a warning message about dynamic paths in versions of shellcheck before 0.7.2. This warning can be silenced with "source=/dev/null" and doesn't require any particular path to be provided if -x isn't used.
---
James Clark (2):
perf test: Remove redundant shellcheck source paths perf build: Follow sourced files when running shellcheck
tools/perf/Makefile.perf | 2 +- tools/perf/tests/shell/annotate.sh | 1 - tools/perf/tests/shell/base_probe/test_adding_kernel.sh | 1 - tools/perf/tests/shell/diff.sh | 1 - tools/perf/tests/shell/inject_aslr.sh | 1 - tools/perf/tests/shell/jitdump-python.sh | 1 - tools/perf/tests/shell/list.sh | 1 - tools/perf/tests/shell/pipe_test.sh | 1 - tools/perf/tests/shell/probe_vfs_getname.sh | 2 -- tools/perf/tests/shell/python-use.sh | 1 - tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 2 -- tools/perf/tests/shell/record+script_probe_vfs_getname.sh | 2 -- tools/perf/tests/shell/record.sh | 2 -- tools/perf/tests/shell/record_weak_term.sh | 1 - tools/perf/tests/shell/script_dlfilter.sh | 1 - tools/perf/tests/shell/stat+csv_output.sh | 1 - tools/perf/tests/shell/stat+json_output.sh | 1 - tools/perf/tests/shell/stat+std_output.sh | 1 - tools/perf/tests/shell/stat_metrics_values.sh | 1 - tools/perf/tests/shell/test_arm_callgraph_fp.sh | 1 - tools/perf/tests/shell/test_brstack.sh | 1 - tools/perf/tests/shell/test_data_symbol.sh | 1 - tools/perf/tests/shell/test_intel_pt.sh | 1 - tools/perf/tests/shell/test_perf_data_converter_json.sh | 1 - tools/perf/tests/shell/test_test_junit_output.sh | 1 - tools/perf/tests/shell/test_uprobe_from_different_cu.sh | 1 - tools/perf/tests/shell/trace+probe_vfs_getname.sh | 1 - tools/perf/tests/shell/trace_btf_enum.sh | 1 - tools/perf/tests/shell/trace_btf_general.sh | 1 - tools/perf/tests/shell/trace_exit_race.sh | 1 - tools/perf/tests/shell/trace_record_replay.sh | 2 -- tools/perf/tests/shell/trace_summary.sh | 1 - 32 files changed, 1 insertion(+), 37 deletions(-)
---
base-commit: 9453bc6a69ef43755f1c28d5688cacdd69fa16bd
change-id: 20260921-james-perf-shellcheck-source-f48df891cd4f
Best regards,
Signature · 1 line
James Clark <[email protected]>