diff options
| author | Collin Funk <collin.funk1@gmail.com> | 2025-06-28 06:41:25 +0300 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2025-06-30 19:43:06 +0300 |
| commit | 114339ee4d66a328d186264ffa23a766542a9a15 (patch) | |
| tree | f3d373a0e69fd707ed6c3e53eca1137a72345dbc /tools/perf/Build | |
| parent | 146847932278fef1ce13b5a839077e51ca019395 (diff) | |
| download | linux-114339ee4d66a328d186264ffa23a766542a9a15.tar.xz | |
perf build: Specify shellcheck should use bash
When someone has a global shellcheckrc file, for example at
~/.config/shellcheckrc, with the directive 'shell=sh', building perf
will fail with many shellcheck errors like:
In tests/shell/base_probe/test_adding_kernel.sh line 294:
(( TEST_RESULT += $? ))
^---------------------^ SC3006 (warning): In POSIX sh, standalone ((..)) is undefined.
For more information:
https://www.shellcheck.net/wiki/SC3006 -- In POSIX sh, standalone ((..)) is...
make[5]: *** [tests/Build:91: tests/shell/base_probe/test_adding_kernel.sh.shellcheck_log] Error 1
Passing the '-s bash' option ensures that it runs correctly regardless
of a developers global configuration.
This patch adds '-s bash' and other options to the SHELLCHECK variable
in Makefile.perf and makes use of the variable consistently.
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Link: https://lore.kernel.org/r/63491dbc8439edf2e949d80e264b9d22332fea61.1751082075.git.collin.funk1@gmail.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/Build')
| -rw-r--r-- | tools/perf/Build | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/Build b/tools/perf/Build index 06107f1e1d42..b03cc59dabf8 100644 --- a/tools/perf/Build +++ b/tools/perf/Build @@ -73,7 +73,7 @@ endif $(OUTPUT)%.shellcheck_log: % $(call rule_mkdir) - $(Q)$(call echo-cmd,test)shellcheck -s bash -a -S warning "$<" > $@ || (cat $@ && rm $@ && false) + $(Q)$(call echo-cmd,test)$(SHELLCHECK) "$<" > $@ || (cat $@ && rm $@ && false) perf-y += $(SHELL_TEST_LOGS) |
