Skip to contentSkip to conversation

Fix for shellcheck issues with version "0.6"

PATCH In review Athira Rajeev 4 participants 11 messages Sep 7, 2023 – Sep 30, 2023

Subsystems (2)
lore
Share & tools
lore
#2 lore raw

PATCH 2/3 tests/shell: Fix shellcheck issues in tests/shell/stat+shadow_stat.sh tetscase

In reply to Athira Rajeev

Running shellcheck on stat+shadow_stat.sh generates below warning

In tests/shell/stat+csv_summary.sh line 26:
while read _num _event _run _pct
^--^ SC2034: _num appears unused. Verify use (or export if used externally).
^----^ SC2034: _event appears unused. Verify use (or export if used externally).
^--^ SC2034: _run appears unused. Verify use (or export if used externally).
^--^ SC2034: _pct appears unused. Verify use (or export if used externally).

This variable is intentionally unused since it is needed to parse through the output. commit used "_" as a prefix for this throw away variable. But this stil shows warning with shellcheck v0.6. Fix this by only using "_" instead of prefix and variable name.

---
 tools/perf/tests/shell/stat+csv_summary.sh | 4 ++--
 tools/perf/tests/shell/stat+shadow_stat.sh | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
tools/perf/tests/shell/stat+csv_summary.sh +2 -2
index 8bae9c8a835e..323123ff4d19 100755
@@ -10,7 +10,7 @@ set -e
 #
 perf stat -e cycles  -x' ' -I1000 --interval-count 1 --summary 2>&1 | \
 grep -e summary | \
-while read summary _num _event _run _pct
+while read summary _ _ _ _
 do
 	if [ $summary != "summary" ]; then
 		exit 1
@@ -23,7 +23,7 @@ done
 #
 perf stat -e cycles  -x' ' -I1000 --interval-count 1 --summary --no-csv-summary 2>&1 | \
 grep -e summary | \
-while read _num _event _run _pct
+while read _ _ _ _
 do
 	exit 1
 done
tools/perf/tests/shell/stat+shadow_stat.sh +2 -2
index a1918a15e36a..386821462f3c 100755
@@ -14,7 +14,7 @@ test_global_aggr()
 {
 	perf stat -a --no-big-num -e cycles,instructions sleep 1  2>&1 | \
 	grep -e cycles -e instructions | \
-	while read num evt _hash ipc rest
+	while read num evt _ ipc rest
 	do
 		# skip not counted events
 		if [ "$num" = "<not" ]; then
@@ -45,7 +45,7 @@ test_no_aggr()
 {
 	perf stat -a -A --no-big-num -e cycles,instructions sleep 1  2>&1 | \
 	grep ^CPU | \
-	while read cpu num evt _hash ipc rest
+	while read cpu num evt _ ipc rest
 	do
 		# skip not counted events
 		if [ "$num" = "<not" ]; then
Signature · 1 line
2.31.1
#1 lore raw

PATCH 1/3 tests/shell: Fix shellcheck SC1090 to handle the location of sourced files

In reply to Athira Rajeev

Running shellcheck on some of the shell scripts throws below error:

In tests/shell/coresight/unroll_loop_thread_10.sh line 8:
. "$(dirname $0)"/../lib/coresight.sh
^-- SC1090: Can't follow non-constant source. Use a directive to specify location.

This happens on shellcheck version "0.6.0". Fix shellcheck warning for SC1090 using "shellcheck source="i option to mention the location of sourced files.

---
 tools/perf/tests/shell/coresight/asm_pure_loop.sh            | 3 +++
 tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh     | 3 +++
 tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh | 3 +++
 tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh  | 3 +++
 tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh    | 3 +++
 tools/perf/tests/shell/probe_vfs_getname.sh                  | 2 ++
 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                             | 1 +
 tools/perf/tests/shell/stat+csv_output.sh                    | 1 +
 tools/perf/tests/shell/stat+std_output.sh                    | 1 +
 tools/perf/tests/shell/test_intel_pt.sh                      | 1 +
 tools/perf/tests/shell/trace+probe_vfs_getname.sh            | 1 +
 13 files changed, 26 insertions(+)
tools/perf/tests/shell/coresight/asm_pure_loop.sh +3 -0
index 779bc8608e1e..04387061e9f3 100755
@@ -5,7 +5,10 @@
 # Carsten Haitzler <[email protected]>, 2021
 
 TEST="asm_pure_loop"
+
+# shellcheck source=../lib/coresight.sh
 . "$(dirname $0)"/../lib/coresight.sh
+
 ARGS=""
 DATV="out"
 DATA="$DATD/perf-$TEST-$DATV.data"
tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh +3 -0
index 08a44e52ce9b..c17e442ac741 100755
@@ -5,7 +5,10 @@
 # Carsten Haitzler <[email protected]>, 2021
 
 TEST="memcpy_thread"
+
+# shellcheck source=../lib/coresight.sh
 . "$(dirname $0)"/../lib/coresight.sh
+
 ARGS="16 10 1"
 DATV="16k_10"
 DATA="$DATD/perf-$TEST-$DATV.data"
tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh +3 -0
index c83a200dede4..e47c4e955d0e 100755
@@ -5,7 +5,10 @@
 # Carsten Haitzler <[email protected]>, 2021
 
 TEST="thread_loop"
+
+# shellcheck source=../lib/coresight.sh
 . "$(dirname $0)"/../lib/coresight.sh
+
 ARGS="10 1"
 DATV="check-tid-10th"
 DATA="$DATD/perf-$TEST-$DATV.data"
tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh +3 -0
index 6346fd5e87c8..8bf94a02e384 100755
@@ -5,7 +5,10 @@
 # Carsten Haitzler <[email protected]>, 2021
 
 TEST="thread_loop"
+
+# shellcheck source=../lib/coresight.sh
 . "$(dirname $0)"/../lib/coresight.sh
+
 ARGS="2 20"
 DATV="check-tid-2th"
 DATA="$DATD/perf-$TEST-$DATV.data"
tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh +3 -0
index 7304e3d3a6ff..0dc9ef424233 100755
@@ -5,7 +5,10 @@
 # Carsten Haitzler <[email protected]>, 2021
 
 TEST="unroll_loop_thread"
+
+# shellcheck source=../lib/coresight.sh
 . "$(dirname $0)"/../lib/coresight.sh
+
 ARGS="10"
 DATV="10"
 DATA="$DATD/perf-$TEST-$DATV.data"
tools/perf/tests/shell/probe_vfs_getname.sh +2 -0
index 871243d6d03a..554e12e83c55 100755
@@ -4,10 +4,12 @@
 # SPDX-License-Identifier: GPL-2.0
 # Arnaldo Carvalho de Melo <[email protected]>, 2017
 
+# shellcheck source=lib/probe.sh
 . "$(dirname $0)"/lib/probe.sh
 
 skip_if_no_perf_probe || exit 2
 
+# shellcheck source=lib/probe_vfs_getname.sh
 . "$(dirname $0)"/lib/probe_vfs_getname.sh
 
 add_probe_vfs_getname || skip_if_no_debuginfo
tools/perf/tests/shell/record+probe_libc_inet_pton.sh +2 -0
index 89214a6d9951..eebeea6bdc76 100755
@@ -10,7 +10,9 @@
 # SPDX-License-Identifier: GPL-2.0
 # Arnaldo Carvalho de Melo <[email protected]>, 2017
 
+# shellcheck source=lib/probe.sh
 . "$(dirname "$0")/lib/probe.sh"
+# shellcheck source=lib/probe_vfs_getname.sh
 . "$(dirname "$0")/lib/probe_vfs_getname.sh"
 
 libc=$(grep -w libc /proc/self/maps | head -1 | sed -r 's/.*[[:space:]](\/.*)/\1/g')
tools/perf/tests/shell/record+script_probe_vfs_getname.sh +2 -0
index 7f664f1889d9..5eedbe29bba1 100755
@@ -9,10 +9,12 @@
 # SPDX-License-Identifier: GPL-2.0
 # Arnaldo Carvalho de Melo <[email protected]>, 2017
 
+# shellcheck source=lib/probe.sh
 . "$(dirname "$0")/lib/probe.sh"
 
 skip_if_no_perf_probe || exit 2
 
+# shellcheck source=lib/probe_vfs_getname.sh
 . "$(dirname "$0")/lib/probe_vfs_getname.sh"
 
 record_open_file() {
tools/perf/tests/shell/record.sh +1 -0
index 4fbc74805d52..29443b8e8876 100755
@@ -5,6 +5,7 @@
 set -e
 
 shelldir=$(dirname "$0")
+# shellcheck source=lib/waiting.sh
 . "${shelldir}"/lib/waiting.sh
 
 err=0
tools/perf/tests/shell/stat+csv_output.sh +1 -0
index d890eb26e914..f1818fa6d9ce 100755
@@ -6,6 +6,7 @@
 
 set -e
 
+# shellcheck source=lib/stat_output.sh
 . "$(dirname $0)"/lib/stat_output.sh
 
 csv_sep=@
tools/perf/tests/shell/stat+std_output.sh +1 -0
index fb2b10547a11..4fcdd1a9142c 100755
@@ -6,6 +6,7 @@
 
 set -e
 
+# shellcheck source=lib/stat_output.sh
 . "$(dirname $0)"/lib/stat_output.sh
 
 stat_output=$(mktemp /tmp/__perf_test.stat_output.std.XXXXX)
tools/perf/tests/shell/test_intel_pt.sh +1 -0
index 3a8b9bffa022..723ec501f99a 100755
@@ -8,6 +8,7 @@ set -e
 perf list | grep -q 'intel_pt//' || exit 2
 
 shelldir=$(dirname "$0")
+# shellcheck source=lib/waiting.sh
 . "${shelldir}"/lib/waiting.sh
 
 skip_cnt=0
tools/perf/tests/shell/trace+probe_vfs_getname.sh +1 -0
index 4014487cf4d9..3146a1eece07 100755
@@ -10,6 +10,7 @@
 # SPDX-License-Identifier: GPL-2.0
 # Arnaldo Carvalho de Melo <[email protected]>, 2017
 
+# shellcheck source=lib/probe.sh
 . "$(dirname $0)"/lib/probe.sh
 
 skip_if_no_perf_probe || exit 2
Signature · 1 line
2.31.1
#3 lore raw

PATCH 3/3 tests/shell: Fix shellcheck warnings for SC2153 in multiple scripts

In reply to Athira Rajeev

Running shellcheck on some of the shell scripts, throws below warning on shellcheck v0.6. Example:

In tests/shell/coresight/asm_pure_loop.sh line 14:
DATA="$DATD/perf-$TEST-$DATV.data"
^---^ SC2153: Possible misspelling: DATD may not be assigned, but DATA is.

Here, DATD is exported from "lib/coresight.sh" and this warning can be ignored. Use "shellcheck disable=" to ignore this check.

---
 tools/perf/tests/shell/coresight/asm_pure_loop.sh            | 1 +
 tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh     | 1 +
 tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh | 1 +
 tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh  | 1 +
 tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh    | 1 +
 5 files changed, 5 insertions(+)
tools/perf/tests/shell/coresight/asm_pure_loop.sh +1 -0
index 04387061e9f3..2d65defb7e0f 100755
@@ -11,6 +11,7 @@ TEST="asm_pure_loop"
 
 ARGS=""
 DATV="out"
+# shellcheck disable=SC2153
 DATA="$DATD/perf-$TEST-$DATV.data"
 
 perf record $PERFRECOPT -o "$DATA" "$BIN" $ARGS
tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh +1 -0
index c17e442ac741..ddcc9bb850f5 100755
@@ -11,6 +11,7 @@ TEST="memcpy_thread"
 
 ARGS="16 10 1"
 DATV="16k_10"
+# shellcheck disable=SC2153
 DATA="$DATD/perf-$TEST-$DATV.data"
 
 perf record $PERFRECOPT -o "$DATA" "$BIN" $ARGS
tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh +1 -0
index e47c4e955d0e..2ce5e139b2fd 100755
@@ -11,6 +11,7 @@ TEST="thread_loop"
 
 ARGS="10 1"
 DATV="check-tid-10th"
+# shellcheck disable=SC2153
 DATA="$DATD/perf-$TEST-$DATV.data"
 STDO="$DATD/perf-$TEST-$DATV.stdout"
 
tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh +1 -0
index 8bf94a02e384..3ad9498753d7 100755
@@ -11,6 +11,7 @@ TEST="thread_loop"
 
 ARGS="2 20"
 DATV="check-tid-2th"
+# shellcheck disable=SC2153
 DATA="$DATD/perf-$TEST-$DATV.data"
 STDO="$DATD/perf-$TEST-$DATV.stdout"
 
tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh +1 -0
index 0dc9ef424233..4fbb4a29aad3 100755
@@ -11,6 +11,7 @@ TEST="unroll_loop_thread"
 
 ARGS="10"
 DATV="10"
+# shellcheck disable=SC2153
 DATA="$DATD/perf-$TEST-$DATV.data"
 
 perf record $PERFRECOPT -o "$DATA" "$BIN" $ARGS
Signature · 1 line
2.31.1
#0 lore raw

cover Fix for shellcheck issues with version "0.6"

From: root <[email protected]>

shellcheck was run on perf tool shell scripts s a pre-requisite to include a build option for shellcheck discussed here:
https://www.spinics.net/lists/linux-perf-users/msg25553.html

And fixes were added for the coding/formatting issues in two patchsets:
https://lore.kernel.org/linux-perf-users/[email protected]/
https://lore.kernel.org/linux-perf-users/[email protected]/

Three additional issues are observed with shellcheck "0.6" and this patchset covers those. With this patchset,

# for F in $(find tests/shell/ -perm -o=x -name '*.sh'); do shellcheck -S warning $F; done
# echo $?
0

Athira Rajeev (3):
tests/shell: Fix shellcheck SC1090 to handle the location of sourced
files
tests/shell: Fix shellcheck issues in tests/shell/stat+shadow_stat.sh
tetscase
tests/shell: Fix shellcheck warnings for SC2153 in multiple scripts

 tools/perf/tests/shell/coresight/asm_pure_loop.sh            | 4 ++++
 tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh     | 4 ++++
 tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh | 4 ++++
 tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh  | 4 ++++
 tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh    | 4 ++++
 tools/perf/tests/shell/probe_vfs_getname.sh                  | 2 ++
 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                             | 1 +
 tools/perf/tests/shell/stat+csv_output.sh                    | 1 +
 tools/perf/tests/shell/stat+csv_summary.sh                   | 4 ++--
 tools/perf/tests/shell/stat+shadow_stat.sh                   | 4 ++--
 tools/perf/tests/shell/stat+std_output.sh                    | 1 +
 tools/perf/tests/shell/test_intel_pt.sh                      | 1 +
 tools/perf/tests/shell/trace+probe_vfs_getname.sh            | 1 +
 15 files changed, 35 insertions(+), 4 deletions(-)
Signature · 1 line
2.31.1
reviewer Tested-by on the v1 series
#4 lore raw
Quoted 19 lines · Athira Rajeev

From: root <[email protected]>

shellcheck was run on perf tool shell scripts s a pre-requisite to include a build option for shellcheck discussed here:
https://www.spinics.net/lists/linux-perf-users/msg25553.html

And fixes were added for the coding/formatting issues in two patchsets:
https://lore.kernel.org/linux-perf-users/[email protected]/
https://lore.kernel.org/linux-perf-users/[email protected]/

Three additional issues are observed with shellcheck "0.6" and this patchset covers those. With this patchset,

# for F in $(find tests/shell/ -perm -o=x -name '*.sh'); do shellcheck -S warning $F; done
# echo $?
0
Quoted 6 lines

Athira Rajeev (3):
tests/shell: Fix shellcheck SC1090 to handle the location of sourced
files
tests/shell: Fix shellcheck issues in tests/shell/stat+shadow_stat.sh
tetscase
tests/shell: Fix shellcheck warnings for SC2153 in multiple scripts

Series:

Thanks,
Ian

Quoted 20 lines
 tools/perf/tests/shell/coresight/asm_pure_loop.sh            | 4 ++++
 tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh     | 4 ++++
 tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh | 4 ++++
 tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh  | 4 ++++
 tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh    | 4 ++++
 tools/perf/tests/shell/probe_vfs_getname.sh                  | 2 ++
 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                             | 1 +
 tools/perf/tests/shell/stat+csv_output.sh                    | 1 +
 tools/perf/tests/shell/stat+csv_summary.sh                   | 4 ++--
 tools/perf/tests/shell/stat+shadow_stat.sh                   | 4 ++--
 tools/perf/tests/shell/stat+std_output.sh                    | 1 +
 tools/perf/tests/shell/test_intel_pt.sh                      | 1 +
 tools/perf/tests/shell/trace+probe_vfs_getname.sh            | 1 +
 15 files changed, 35 insertions(+), 4 deletions(-)

--
2.31.1

#5 lore raw
Quoted 32 lines · Ian Rogers
Quoted 19 lines · Athira Rajeev

From: root <[email protected]>

shellcheck was run on perf tool shell scripts s a pre-requisite to include a build option for shellcheck discussed here:
https://www.spinics.net/lists/linux-perf-users/msg25553.html

And fixes were added for the coding/formatting issues in two patchsets:
https://lore.kernel.org/linux-perf-users/[email protected]/
https://lore.kernel.org/linux-perf-users/[email protected]/

Three additional issues are observed with shellcheck "0.6" and this patchset covers those. With this patchset,

# for F in $(find tests/shell/ -perm -o=x -name '*.sh'); do shellcheck -S warning $F; done
# echo $?
0
Quoted 6 lines

Athira Rajeev (3):
tests/shell: Fix shellcheck SC1090 to handle the location of sourced
files
tests/shell: Fix shellcheck issues in tests/shell/stat+shadow_stat.sh
tetscase
tests/shell: Fix shellcheck warnings for SC2153 in multiple scripts

Quoted 5 lines

Series:

Thanks,
Ian

Thanks Ian for checking the patch series

Athira

Quoted 20 lines
Quoted 20 lines
tools/perf/tests/shell/coresight/asm_pure_loop.sh            | 4 ++++
tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh     | 4 ++++
tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh | 4 ++++
tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh  | 4 ++++
tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh    | 4 ++++
tools/perf/tests/shell/probe_vfs_getname.sh                  | 2 ++
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                             | 1 +
tools/perf/tests/shell/stat+csv_output.sh                    | 1 +
tools/perf/tests/shell/stat+csv_summary.sh                   | 4 ++--
tools/perf/tests/shell/stat+shadow_stat.sh                   | 4 ++--
tools/perf/tests/shell/stat+std_output.sh                    | 1 +
tools/perf/tests/shell/test_intel_pt.sh                      | 1 +
tools/perf/tests/shell/trace+probe_vfs_getname.sh            | 1 +
15 files changed, 35 insertions(+), 4 deletions(-)

--
2.31.1

#6 lore raw
Quoted 39 lines · Athira Rajeev
Quoted 36 lines · Ian Rogers
Quoted 19 lines · Athira Rajeev

From: root <[email protected]>

shellcheck was run on perf tool shell scripts s a pre-requisite to include a build option for shellcheck discussed here:
https://www.spinics.net/lists/linux-perf-users/msg25553.html

And fixes were added for the coding/formatting issues in two patchsets:
https://lore.kernel.org/linux-perf-users/[email protected]/
https://lore.kernel.org/linux-perf-users/[email protected]/

Three additional issues are observed with shellcheck "0.6" and this patchset covers those. With this patchset,

# for F in $(find tests/shell/ -perm -o=x -name '*.sh'); do shellcheck -S warning $F; done
# echo $?
0
Quoted 6 lines

Athira Rajeev (3):
tests/shell: Fix shellcheck SC1090 to handle the location of sourced
files
tests/shell: Fix shellcheck issues in tests/shell/stat+shadow_stat.sh
tetscase
tests/shell: Fix shellcheck warnings for SC2153 in multiple scripts

Series:

Quoted 6 lines
Quoted 2 lines

Thanks,
Ian

Thanks Ian for checking the patch series

Athira

Hi Arnaldo

Can you please check and pull this if it looks good to go .

Thanks
Athira

Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
tools/perf/tests/shell/coresight/asm_pure_loop.sh            | 4 ++++
tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh     | 4 ++++
tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh | 4 ++++
tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh  | 4 ++++
tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh    | 4 ++++
tools/perf/tests/shell/probe_vfs_getname.sh                  | 2 ++
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                             | 1 +
tools/perf/tests/shell/stat+csv_output.sh                    | 1 +
tools/perf/tests/shell/stat+csv_summary.sh                   | 4 ++--
tools/perf/tests/shell/stat+shadow_stat.sh                   | 4 ++--
tools/perf/tests/shell/stat+std_output.sh                    | 1 +
tools/perf/tests/shell/test_intel_pt.sh                      | 1 +
tools/perf/tests/shell/trace+probe_vfs_getname.sh            | 1 +
15 files changed, 35 insertions(+), 4 deletions(-)

--
2.31.1

Reviewed-by on the v1 series
#7 lore raw
In reply to Athira Rajeev
Quoted 11 lines · Athira Rajeev

From: root <[email protected]>

shellcheck was run on perf tool shell scripts s a pre-requisite to include a build option for shellcheck discussed here:
https://www.spinics.net/lists/linux-perf-users/msg25553.html

And fixes were added for the coding/formatting issues in two patchsets:
https://lore.kernel.org/linux-perf-users/[email protected]/
https://lore.kernel.org/linux-perf-users/[email protected]/

Quoted 7 lines

Three additional issues are observed with shellcheck "0.6" and this patchset covers those. With this patchset,

# for F in $(find tests/shell/ -perm -o=x -name '*.sh'); do shellcheck -S warning $F; done
# echo $?
0

Patchset looks good to me.

Thanks,
Kajol Jain

Quoted 24 lines

Athira Rajeev (3):
tests/shell: Fix shellcheck SC1090 to handle the location of sourced
files
tests/shell: Fix shellcheck issues in tests/shell/stat+shadow_stat.sh
tetscase
tests/shell: Fix shellcheck warnings for SC2153 in multiple scripts

 tools/perf/tests/shell/coresight/asm_pure_loop.sh            | 4 ++++
 tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh     | 4 ++++
 tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh | 4 ++++
 tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh  | 4 ++++
 tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh    | 4 ++++
 tools/perf/tests/shell/probe_vfs_getname.sh                  | 2 ++
 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                             | 1 +
 tools/perf/tests/shell/stat+csv_output.sh                    | 1 +
 tools/perf/tests/shell/stat+csv_summary.sh                   | 4 ++--
 tools/perf/tests/shell/stat+shadow_stat.sh                   | 4 ++--
 tools/perf/tests/shell/stat+std_output.sh                    | 1 +
 tools/perf/tests/shell/test_intel_pt.sh                      | 1 +
 tools/perf/tests/shell/trace+probe_vfs_getname.sh            | 1 +
 15 files changed, 35 insertions(+), 4 deletions(-)
#8 lore raw
Quoted 26 lines · kajoljain
Quoted 11 lines · Athira Rajeev

From: root <[email protected]>

shellcheck was run on perf tool shell scripts s a pre-requisite to include a build option for shellcheck discussed here:
https://www.spinics.net/lists/linux-perf-users/msg25553.html

And fixes were added for the coding/formatting issues in two patchsets:
https://lore.kernel.org/linux-perf-users/[email protected]/
https://lore.kernel.org/linux-perf-users/[email protected]/

Quoted 7 lines

Three additional issues are observed with shellcheck "0.6" and this patchset covers those. With this patchset,

# for F in $(find tests/shell/ -perm -o=x -name '*.sh'); do shellcheck -S warning $F; done
# echo $?
0
Quoted 7 lines

Patchset looks good to me.

Thanks,
Kajol Jain

Hi Namhyunbg,

Can you please check for this patchset also

Thanks
Athira

Quoted 23 lines
Quoted 23 lines

Athira Rajeev (3):
tests/shell: Fix shellcheck SC1090 to handle the location of sourced
files
tests/shell: Fix shellcheck issues in tests/shell/stat+shadow_stat.sh
tetscase
tests/shell: Fix shellcheck warnings for SC2153 in multiple scripts

tools/perf/tests/shell/coresight/asm_pure_loop.sh            | 4 ++++
tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh     | 4 ++++
tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh | 4 ++++
tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh  | 4 ++++
tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh    | 4 ++++
tools/perf/tests/shell/probe_vfs_getname.sh                  | 2 ++
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                             | 1 +
tools/perf/tests/shell/stat+csv_output.sh                    | 1 +
tools/perf/tests/shell/stat+csv_summary.sh                   | 4 ++--
tools/perf/tests/shell/stat+shadow_stat.sh                   | 4 ++--
tools/perf/tests/shell/stat+std_output.sh                    | 1 +
tools/perf/tests/shell/test_intel_pt.sh                      | 1 +
tools/perf/tests/shell/trace+probe_vfs_getname.sh            | 1 +
15 files changed, 35 insertions(+), 4 deletions(-)
maintainer
#9 lore raw
Quoted 31 lines · Athira Rajeev
Quoted 31 lines · kajoljain
Quoted 11 lines · Athira Rajeev

From: root <[email protected]>

shellcheck was run on perf tool shell scripts s a pre-requisite to include a build option for shellcheck discussed here:
https://www.spinics.net/lists/linux-perf-users/msg25553.html

And fixes were added for the coding/formatting issues in two patchsets:
https://lore.kernel.org/linux-perf-users/[email protected]/
https://lore.kernel.org/linux-perf-users/[email protected]/

Quoted 7 lines

Three additional issues are observed with shellcheck "0.6" and this patchset covers those. With this patchset,

# for F in $(find tests/shell/ -perm -o=x -name '*.sh'); do shellcheck -S warning $F; done
# echo $?
0

Patchset looks good to me.

Quoted 7 lines
Quoted 3 lines

Thanks,
Kajol Jain

Hi Namhyunbg,

Can you please check for this patchset also

Sure, it's applied to perf-tools-next, thanks!

#10 lore raw
Quoted 41 lines · Namhyung Kim
Quoted 35 lines · Athira Rajeev
Quoted 34 lines · kajoljain
Quoted 11 lines · Athira Rajeev

From: root <[email protected]>

shellcheck was run on perf tool shell scripts s a pre-requisite to include a build option for shellcheck discussed here:
https://www.spinics.net/lists/linux-perf-users/msg25553.html

And fixes were added for the coding/formatting issues in two patchsets:
https://lore.kernel.org/linux-perf-users/[email protected]/
https://lore.kernel.org/linux-perf-users/[email protected]/

Quoted 7 lines

Three additional issues are observed with shellcheck "0.6" and this patchset covers those. With this patchset,

# for F in $(find tests/shell/ -perm -o=x -name '*.sh'); do shellcheck -S warning $F; done
# echo $?
0

Patchset looks good to me.

Thanks,
Kajol Jain

Quoted 5 lines
Quoted 3 lines

Hi Namhyunbg,

Can you please check for this patchset also

Sure, it's applied to perf-tools-next, thanks!

Thanks Namhyung

Athira