* [PATCH 1/3] tests/shell: Fix shellcheck SC1090 to handle the location of sourced files
2023-09-07 17:15 [PATCH 0/3] Fix for shellcheck issues with version "0.6" Athira Rajeev
@ 2023-09-07 17:15 ` Athira Rajeev
2023-09-07 17:15 ` [PATCH 2/3] tests/shell: Fix shellcheck issues in tests/shell/stat+shadow_stat.sh tetscase Athira Rajeev
` (3 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Athira Rajeev @ 2023-09-07 17:15 UTC (permalink / raw)
To: acme, jolsa, adrian.hunter, irogers, namhyung
Cc: atrajeev, kjain, linux-perf-users, maddy, disgoel, linuxppc-dev
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.
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
---
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(+)
diff --git a/tools/perf/tests/shell/coresight/asm_pure_loop.sh b/tools/perf/tests/shell/coresight/asm_pure_loop.sh
index 779bc8608e1e..04387061e9f3 100755
--- a/tools/perf/tests/shell/coresight/asm_pure_loop.sh
+++ b/tools/perf/tests/shell/coresight/asm_pure_loop.sh
@@ -5,7 +5,10 @@
# Carsten Haitzler <carsten.haitzler@arm.com>, 2021
TEST="asm_pure_loop"
+
+# shellcheck source=../lib/coresight.sh
. "$(dirname $0)"/../lib/coresight.sh
+
ARGS=""
DATV="out"
DATA="$DATD/perf-$TEST-$DATV.data"
diff --git a/tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh b/tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh
index 08a44e52ce9b..c17e442ac741 100755
--- a/tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh
+++ b/tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh
@@ -5,7 +5,10 @@
# Carsten Haitzler <carsten.haitzler@arm.com>, 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"
diff --git a/tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh b/tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh
index c83a200dede4..e47c4e955d0e 100755
--- a/tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh
+++ b/tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh
@@ -5,7 +5,10 @@
# Carsten Haitzler <carsten.haitzler@arm.com>, 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"
diff --git a/tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh b/tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh
index 6346fd5e87c8..8bf94a02e384 100755
--- a/tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh
+++ b/tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh
@@ -5,7 +5,10 @@
# Carsten Haitzler <carsten.haitzler@arm.com>, 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"
diff --git a/tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh b/tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh
index 7304e3d3a6ff..0dc9ef424233 100755
--- a/tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh
+++ b/tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh
@@ -5,7 +5,10 @@
# Carsten Haitzler <carsten.haitzler@arm.com>, 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"
diff --git a/tools/perf/tests/shell/probe_vfs_getname.sh b/tools/perf/tests/shell/probe_vfs_getname.sh
index 871243d6d03a..554e12e83c55 100755
--- a/tools/perf/tests/shell/probe_vfs_getname.sh
+++ b/tools/perf/tests/shell/probe_vfs_getname.sh
@@ -4,10 +4,12 @@
# SPDX-License-Identifier: GPL-2.0
# Arnaldo Carvalho de Melo <acme@kernel.org>, 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
diff --git a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
index 89214a6d9951..eebeea6bdc76 100755
--- a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
+++ b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
@@ -10,7 +10,9 @@
# SPDX-License-Identifier: GPL-2.0
# Arnaldo Carvalho de Melo <acme@kernel.org>, 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')
diff --git a/tools/perf/tests/shell/record+script_probe_vfs_getname.sh b/tools/perf/tests/shell/record+script_probe_vfs_getname.sh
index 7f664f1889d9..5eedbe29bba1 100755
--- a/tools/perf/tests/shell/record+script_probe_vfs_getname.sh
+++ b/tools/perf/tests/shell/record+script_probe_vfs_getname.sh
@@ -9,10 +9,12 @@
# SPDX-License-Identifier: GPL-2.0
# Arnaldo Carvalho de Melo <acme@kernel.org>, 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() {
diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh
index 4fbc74805d52..29443b8e8876 100755
--- a/tools/perf/tests/shell/record.sh
+++ b/tools/perf/tests/shell/record.sh
@@ -5,6 +5,7 @@
set -e
shelldir=$(dirname "$0")
+# shellcheck source=lib/waiting.sh
. "${shelldir}"/lib/waiting.sh
err=0
diff --git a/tools/perf/tests/shell/stat+csv_output.sh b/tools/perf/tests/shell/stat+csv_output.sh
index d890eb26e914..f1818fa6d9ce 100755
--- a/tools/perf/tests/shell/stat+csv_output.sh
+++ b/tools/perf/tests/shell/stat+csv_output.sh
@@ -6,6 +6,7 @@
set -e
+# shellcheck source=lib/stat_output.sh
. "$(dirname $0)"/lib/stat_output.sh
csv_sep=@
diff --git a/tools/perf/tests/shell/stat+std_output.sh b/tools/perf/tests/shell/stat+std_output.sh
index fb2b10547a11..4fcdd1a9142c 100755
--- a/tools/perf/tests/shell/stat+std_output.sh
+++ b/tools/perf/tests/shell/stat+std_output.sh
@@ -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)
diff --git a/tools/perf/tests/shell/test_intel_pt.sh b/tools/perf/tests/shell/test_intel_pt.sh
index 3a8b9bffa022..723ec501f99a 100755
--- a/tools/perf/tests/shell/test_intel_pt.sh
+++ b/tools/perf/tests/shell/test_intel_pt.sh
@@ -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
diff --git a/tools/perf/tests/shell/trace+probe_vfs_getname.sh b/tools/perf/tests/shell/trace+probe_vfs_getname.sh
index 4014487cf4d9..3146a1eece07 100755
--- a/tools/perf/tests/shell/trace+probe_vfs_getname.sh
+++ b/tools/perf/tests/shell/trace+probe_vfs_getname.sh
@@ -10,6 +10,7 @@
# SPDX-License-Identifier: GPL-2.0
# Arnaldo Carvalho de Melo <acme@kernel.org>, 2017
+# shellcheck source=lib/probe.sh
. "$(dirname $0)"/lib/probe.sh
skip_if_no_perf_probe || exit 2
--
2.31.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 2/3] tests/shell: Fix shellcheck issues in tests/shell/stat+shadow_stat.sh tetscase
2023-09-07 17:15 [PATCH 0/3] Fix for shellcheck issues with version "0.6" Athira Rajeev
2023-09-07 17:15 ` [PATCH 1/3] tests/shell: Fix shellcheck SC1090 to handle the location of sourced files Athira Rajeev
@ 2023-09-07 17:15 ` Athira Rajeev
2023-09-07 17:15 ` [PATCH 3/3] tests/shell: Fix shellcheck warnings for SC2153 in multiple scripts Athira Rajeev
` (2 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Athira Rajeev @ 2023-09-07 17:15 UTC (permalink / raw)
To: acme, jolsa, adrian.hunter, irogers, namhyung
Cc: atrajeev, kjain, linux-perf-users, maddy, disgoel, linuxppc-dev
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.
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
---
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(-)
diff --git a/tools/perf/tests/shell/stat+csv_summary.sh b/tools/perf/tests/shell/stat+csv_summary.sh
index 8bae9c8a835e..323123ff4d19 100755
--- a/tools/perf/tests/shell/stat+csv_summary.sh
+++ b/tools/perf/tests/shell/stat+csv_summary.sh
@@ -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
diff --git a/tools/perf/tests/shell/stat+shadow_stat.sh b/tools/perf/tests/shell/stat+shadow_stat.sh
index a1918a15e36a..386821462f3c 100755
--- a/tools/perf/tests/shell/stat+shadow_stat.sh
+++ b/tools/perf/tests/shell/stat+shadow_stat.sh
@@ -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
--
2.31.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 3/3] tests/shell: Fix shellcheck warnings for SC2153 in multiple scripts
2023-09-07 17:15 [PATCH 0/3] Fix for shellcheck issues with version "0.6" Athira Rajeev
2023-09-07 17:15 ` [PATCH 1/3] tests/shell: Fix shellcheck SC1090 to handle the location of sourced files Athira Rajeev
2023-09-07 17:15 ` [PATCH 2/3] tests/shell: Fix shellcheck issues in tests/shell/stat+shadow_stat.sh tetscase Athira Rajeev
@ 2023-09-07 17:15 ` Athira Rajeev
2023-09-07 23:50 ` [PATCH 0/3] Fix for shellcheck issues with version "0.6" Ian Rogers
2023-09-25 8:04 ` kajoljain
4 siblings, 0 replies; 11+ messages in thread
From: Athira Rajeev @ 2023-09-07 17:15 UTC (permalink / raw)
To: acme, jolsa, adrian.hunter, irogers, namhyung
Cc: atrajeev, kjain, linux-perf-users, maddy, disgoel, linuxppc-dev
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.
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
---
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(+)
diff --git a/tools/perf/tests/shell/coresight/asm_pure_loop.sh b/tools/perf/tests/shell/coresight/asm_pure_loop.sh
index 04387061e9f3..2d65defb7e0f 100755
--- a/tools/perf/tests/shell/coresight/asm_pure_loop.sh
+++ b/tools/perf/tests/shell/coresight/asm_pure_loop.sh
@@ -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
diff --git a/tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh b/tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh
index c17e442ac741..ddcc9bb850f5 100755
--- a/tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh
+++ b/tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh
@@ -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
diff --git a/tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh b/tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh
index e47c4e955d0e..2ce5e139b2fd 100755
--- a/tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh
+++ b/tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh
@@ -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"
diff --git a/tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh b/tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh
index 8bf94a02e384..3ad9498753d7 100755
--- a/tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh
+++ b/tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh
@@ -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"
diff --git a/tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh b/tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh
index 0dc9ef424233..4fbb4a29aad3 100755
--- a/tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh
+++ b/tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh
@@ -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
--
2.31.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 0/3] Fix for shellcheck issues with version "0.6"
2023-09-07 17:15 [PATCH 0/3] Fix for shellcheck issues with version "0.6" Athira Rajeev
` (2 preceding siblings ...)
2023-09-07 17:15 ` [PATCH 3/3] tests/shell: Fix shellcheck warnings for SC2153 in multiple scripts Athira Rajeev
@ 2023-09-07 23:50 ` Ian Rogers
2023-09-08 14:17 ` Athira Rajeev
2023-09-25 8:04 ` kajoljain
4 siblings, 1 reply; 11+ messages in thread
From: Ian Rogers @ 2023-09-07 23:50 UTC (permalink / raw)
To: Athira Rajeev
Cc: maddy, kjain, adrian.hunter, acme, linux-perf-users, jolsa,
namhyung, disgoel, linuxppc-dev, root
On Thu, Sep 7, 2023 at 10:17 AM Athira Rajeev
<atrajeev@linux.vnet.ibm.com> wrote:
>
> From: root <root@ltcden13-lp4.aus.stglabs.ibm.com>
>
> 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/20230613164145.50488-1-atrajeev@linux.vnet.ibm.com/
> https://lore.kernel.org/linux-perf-users/20230709182800.53002-1-atrajeev@linux.vnet.ibm.com/
>
> 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
Series:
Tested-by: Ian Rogers <irogers@google.com>
Thanks,
Ian
> 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
>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 0/3] Fix for shellcheck issues with version "0.6"
2023-09-07 23:50 ` [PATCH 0/3] Fix for shellcheck issues with version "0.6" Ian Rogers
@ 2023-09-08 14:17 ` Athira Rajeev
2023-09-13 5:02 ` Athira Rajeev
0 siblings, 1 reply; 11+ messages in thread
From: Athira Rajeev @ 2023-09-08 14:17 UTC (permalink / raw)
To: Ian Rogers, Arnaldo Carvalho de Melo
Cc: Madhavan Srinivasan, Kajol Jain, Adrian Hunter, linux-perf-users,
Jiri Olsa, Namhyung Kim, Disha Goel, linuxppc-dev
> On 08-Sep-2023, at 5:20 AM, Ian Rogers <irogers@google.com> wrote:
>
> On Thu, Sep 7, 2023 at 10:17 AM Athira Rajeev
> <atrajeev@linux.vnet.ibm.com> wrote:
>>
>> From: root <root@ltcden13-lp4.aus.stglabs.ibm.com>
>>
>> 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/20230613164145.50488-1-atrajeev@linux.vnet.ibm.com/
>> https://lore.kernel.org/linux-perf-users/20230709182800.53002-1-atrajeev@linux.vnet.ibm.com/
>>
>> 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
>
> Series:
> Tested-by: Ian Rogers <irogers@google.com>
>
> Thanks,
> Ian
Thanks Ian for checking the patch series
Athira
>
>> 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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/3] Fix for shellcheck issues with version "0.6"
2023-09-08 14:17 ` Athira Rajeev
@ 2023-09-13 5:02 ` Athira Rajeev
0 siblings, 0 replies; 11+ messages in thread
From: Athira Rajeev @ 2023-09-13 5:02 UTC (permalink / raw)
To: Ian Rogers, Arnaldo Carvalho de Melo
Cc: Madhavan Srinivasan, Kajol Jain, Adrian Hunter, linux-perf-users,
Jiri Olsa, Namhyung Kim, Disha Goel, linuxppc-dev
> On 08-Sep-2023, at 7:47 PM, Athira Rajeev <atrajeev@linux.vnet.ibm.com> wrote:
>
>
>
>> On 08-Sep-2023, at 5:20 AM, Ian Rogers <irogers@google.com> wrote:
>>
>> On Thu, Sep 7, 2023 at 10:17 AM Athira Rajeev
>> <atrajeev@linux.vnet.ibm.com> wrote:
>>>
>>> From: root <root@ltcden13-lp4.aus.stglabs.ibm.com>
>>>
>>> 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/20230613164145.50488-1-atrajeev@linux.vnet.ibm.com/
>>> https://lore.kernel.org/linux-perf-users/20230709182800.53002-1-atrajeev@linux.vnet.ibm.com/
>>>
>>> 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
>>
>> Series:
>> Tested-by: Ian Rogers <irogers@google.com>
>>
>> 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
>>
>>> 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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/3] Fix for shellcheck issues with version "0.6"
2023-09-07 17:15 [PATCH 0/3] Fix for shellcheck issues with version "0.6" Athira Rajeev
` (3 preceding siblings ...)
2023-09-07 23:50 ` [PATCH 0/3] Fix for shellcheck issues with version "0.6" Ian Rogers
@ 2023-09-25 8:04 ` kajoljain
2023-09-27 4:27 ` Athira Rajeev
4 siblings, 1 reply; 11+ messages in thread
From: kajoljain @ 2023-09-25 8:04 UTC (permalink / raw)
To: Athira Rajeev, acme, jolsa, adrian.hunter, irogers, namhyung
Cc: linux-perf-users, maddy, linuxppc-dev, root, disgoel
On 9/7/23 22:45, Athira Rajeev wrote:
> From: root <root@ltcden13-lp4.aus.stglabs.ibm.com>
>
> 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/20230613164145.50488-1-atrajeev@linux.vnet.ibm.com/
> https://lore.kernel.org/linux-perf-users/20230709182800.53002-1-atrajeev@linux.vnet.ibm.com/
>
> 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.
Reviewed-by: Kajol Jain <kjain@linux.ibm.com>
Thanks,
Kajol Jain
> 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(-)
>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 0/3] Fix for shellcheck issues with version "0.6"
2023-09-25 8:04 ` kajoljain
@ 2023-09-27 4:27 ` Athira Rajeev
2023-09-28 3:54 ` Namhyung Kim
0 siblings, 1 reply; 11+ messages in thread
From: Athira Rajeev @ 2023-09-27 4:27 UTC (permalink / raw)
To: kajoljain, Namhyung Kim
Cc: Ian Rogers, Madhavan Srinivasan, Adrian Hunter,
Arnaldo Carvalho de Melo, linux-perf-users, Jiri Olsa,
Namhyung Kim, disgoel, linuxppc-dev, root
> On 25-Sep-2023, at 1:34 PM, kajoljain <kjain@linux.ibm.com> wrote:
>
>
>
> On 9/7/23 22:45, Athira Rajeev wrote:
>> From: root <root@ltcden13-lp4.aus.stglabs.ibm.com>
>>
>> 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/20230613164145.50488-1-atrajeev@linux.vnet.ibm.com/
>> https://lore.kernel.org/linux-perf-users/20230709182800.53002-1-atrajeev@linux.vnet.ibm.com/
>>
>> 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.
>
> Reviewed-by: Kajol Jain <kjain@linux.ibm.com>
>
> Thanks,
> Kajol Jain
>
Hi Namhyunbg,
Can you please check for this patchset also
Thanks
Athira
>> 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(-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/3] Fix for shellcheck issues with version "0.6"
2023-09-27 4:27 ` Athira Rajeev
@ 2023-09-28 3:54 ` Namhyung Kim
2023-09-30 6:02 ` Athira Rajeev
0 siblings, 1 reply; 11+ messages in thread
From: Namhyung Kim @ 2023-09-28 3:54 UTC (permalink / raw)
To: Athira Rajeev
Cc: Ian Rogers, Madhavan Srinivasan, kajoljain, Adrian Hunter,
Arnaldo Carvalho de Melo, linux-perf-users, Jiri Olsa, disgoel,
linuxppc-dev, root
On Tue, Sep 26, 2023 at 9:29 PM Athira Rajeev
<atrajeev@linux.vnet.ibm.com> wrote:
>
>
>
> > On 25-Sep-2023, at 1:34 PM, kajoljain <kjain@linux.ibm.com> wrote:
> >
> >
> >
> > On 9/7/23 22:45, Athira Rajeev wrote:
> >> From: root <root@ltcden13-lp4.aus.stglabs.ibm.com>
> >>
> >> 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/20230613164145.50488-1-atrajeev@linux.vnet.ibm.com/
> >> https://lore.kernel.org/linux-perf-users/20230709182800.53002-1-atrajeev@linux.vnet.ibm.com/
> >>
> >> 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.
> >
> > Reviewed-by: Kajol Jain <kjain@linux.ibm.com>
> >
> > Thanks,
> > Kajol Jain
> >
>
> Hi Namhyunbg,
>
> Can you please check for this patchset also
Sure, it's applied to perf-tools-next, thanks!
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/3] Fix for shellcheck issues with version "0.6"
2023-09-28 3:54 ` Namhyung Kim
@ 2023-09-30 6:02 ` Athira Rajeev
0 siblings, 0 replies; 11+ messages in thread
From: Athira Rajeev @ 2023-09-30 6:02 UTC (permalink / raw)
To: Namhyung Kim
Cc: Ian Rogers, Madhavan Srinivasan, kajoljain, Adrian Hunter,
Arnaldo Carvalho de Melo, linux-perf-users, Jiri Olsa, Disha Goel,
linuxppc-dev, root
> On 28-Sep-2023, at 9:24 AM, Namhyung Kim <namhyung@kernel.org> wrote:
>
> On Tue, Sep 26, 2023 at 9:29 PM Athira Rajeev
> <atrajeev@linux.vnet.ibm.com> wrote:
>>
>>
>>
>>> On 25-Sep-2023, at 1:34 PM, kajoljain <kjain@linux.ibm.com> wrote:
>>>
>>>
>>>
>>> On 9/7/23 22:45, Athira Rajeev wrote:
>>>> From: root <root@ltcden13-lp4.aus.stglabs.ibm.com>
>>>>
>>>> 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/20230613164145.50488-1-atrajeev@linux.vnet.ibm.com/
>>>> https://lore.kernel.org/linux-perf-users/20230709182800.53002-1-atrajeev@linux.vnet.ibm.com/
>>>>
>>>> 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.
>>>
>>> Reviewed-by: Kajol Jain <kjain@linux.ibm.com>
>>>
>>> Thanks,
>>> Kajol Jain
>>>
>>
>> Hi Namhyunbg,
>>
>> Can you please check for this patchset also
>
> Sure, it's applied to perf-tools-next, thanks!
Thanks Namhyung
Athira
^ permalink raw reply [flat|nested] 11+ messages in thread