Skip to contentSkip to conversation

perf build: Raise minimum shellcheck version to 0.7.2

PATCH Superseded Nicolas Schier 2 participants 3 messages Jan 7 perf events

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 perf build: Raise minimum shellcheck version to 0.7.2

Raise the minimum shellcheck version for perf builds to 0.7.2, so that systems with shellcheck versions below 0.7.2 will automatically skip the shell script checking, even if NO_SHELLCHECK is unset.

Since commit 241f21be7d0f ("perf test perftool_testsuite: Use absolute paths"), shellcheck versions before 0.7.2 break the perf build with several SC1090 [2] warnings due to its too strict dynamic source handling [1], e.g.:

In tests/shell/base_probe/test_line_semantics.sh line 20:
. "$DIR_PATH/../common/init.sh"

    ^---------------------------^ SC1090: Can't follow non-constant source. Use a directive to specify location.
Fixes 241f21be7d0f ("perf test perftool_testsuite: Use absolute paths")

---
Changes in v2:
* Add one of the shellcheck messages to commit message (Namhyung Kim)
* Link to v1: https://lore.kernel.org/r/20260106-perf-raise-minimum-shellcheck-version-v1-1-b46739a78888@avm.de

---
 tools/perf/Makefile.perf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile.perf +1 -1
index b3f481a626afa314632876449a11eb79b2978824..e2d668fb7f439befd6d1d9cbf66765f8b815e3c6 100644
@@ -255,7 +255,7 @@ endif
 # minimal shellcheck version as v0.6.0.
 ifneq ($(SHELLCHECK),)
   ifeq ($(shell expr $(shell $(SHELLCHECK) --version | grep version: | \
-        sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \< 060), 1)
+        sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \< 072), 1)
     SHELLCHECK :=
   else
     SHELLCHECK := $(SHELLCHECK) -s bash -a -S warning

---
base-commit: 9ace4753a5202b02191d54e9fdf7f9e3d02b85eb
change-id: 20260106-perf-raise-minimum-shellcheck-version-5d684fe90a39

Best regards,

Signature · 1 line
Nicolas Schier
#1 lore raw
Quoted 31 lines · Nicolas Schier

Raise the minimum shellcheck version for perf builds to 0.7.2, so that systems with shellcheck versions below 0.7.2 will automatically skip the shell script checking, even if NO_SHELLCHECK is unset.

Since commit 241f21be7d0f ("perf test perftool_testsuite: Use absolute paths"), shellcheck versions before 0.7.2 break the perf build with several SC1090 [2] warnings due to its too strict dynamic source handling [1], e.g.:

In tests/shell/base_probe/test_line_semantics.sh line 20:
. "$DIR_PATH/../common/init.sh"
^---------------------------^ SC1090: Can't follow non-constant source. Use a directive to specify location.

Fixes 241f21be7d0f ("perf test perftool_testsuite: Use absolute paths")

---
Changes in v2:
* Add one of the shellcheck messages to commit message (Namhyung Kim)
* Link to v1: https://lore.kernel.org/r/20260106-perf-raise-minimum-shellcheck-version-v1-1-b46739a78888@avm.de
---
tools/perf/Makefile.perf | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile.perf +0 -0
index b3f481a626afa314632876449a11eb79b2978824..e2d668fb7f439befd6d1d9cbf66765f8b815e3c6 100644

tools/perf/Makefile.perf endif · line 255

Quoted 1 line
tools/perf/Makefile.perf +0 -0
@@ -255,7 +255,7 @@ endif
 # minimal shellcheck version as v0.6.0.

I'm looking just add this patch, from the smartphone, but shouldn't the above comment need to be updated as well?

- Arnaldo

Quoted 12 lines
tools/perf/Makefile.perf +1 -2
 ifneq ($(SHELLCHECK),)
  ifeq ($(shell expr $(shell $(SHELLCHECK) --version | grep version: | \
-        sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \< 060), 1)
+        sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \< 072), 1)
    SHELLCHECK :=
  else
    SHELLCHECK := $(SHELLCHECK) -s bash -a -S warning
 
---

base-commit: 9ace4753a5202b02191d54e9fdf7f9e3d02b85eb
change-id: 20260106-perf-raise-minimum-shellcheck-version-5d684fe90a39

Quoted 1 line

Best regards,

- Arnaldo

#2 lore raw
Quoted 27 lines · Arnaldo Melo
Quoted 26 lines · Nicolas Schier

Raise the minimum shellcheck version for perf builds to 0.7.2, so that systems with shellcheck versions below 0.7.2 will automatically skip the shell script checking, even if NO_SHELLCHECK is unset.

Since commit 241f21be7d0f ("perf test perftool_testsuite: Use absolute paths"), shellcheck versions before 0.7.2 break the perf build with several SC1090 [2] warnings due to its too strict dynamic source handling [1], e.g.:

In tests/shell/base_probe/test_line_semantics.sh line 20:
. "$DIR_PATH/../common/init.sh"
^---------------------------^ SC1090: Can't follow non-constant source. Use a directive to specify location.

Fixes 241f21be7d0f ("perf test perftool_testsuite: Use absolute paths")

---
Changes in v2:
* Add one of the shellcheck messages to commit message (Namhyung Kim)
* Link to v1: https://lore.kernel.org/r/20260106-perf-raise-minimum-shellcheck-version-v1-1-b46739a78888@avm.de
---
tools/perf/Makefile.perf | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 8 lines

tools/perf/Makefile.perf endif · line 255

Quoted 6 lines
tools/perf/Makefile.perf +0 -0
index b3f481a626afa314632876449a11eb79b2978824..e2d668fb7f439befd6d1d9cbf66765f8b815e3c6 100644
@@ -255,7 +255,7 @@ endif
 # minimal shellcheck version as v0.6.0.

I'm looking just add this patch, from the smartphone, but shouldn't the above comment need to be updated as well?

ups. Yes, sure; thanks for spotting. I'll send a v3 tomorrow.

Kind regards,
Nicolas