From: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
To: acme@kernel.org, jolsa@kernel.org, irogers@google.com,
namhyung@kernel.org, ravi.bangoria@amd.com,
john.g.garry@oracle.com
Cc: linux-perf-users@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
maddy@linux.ibm.com, atrajeev@linux.vnet.ibm.com,
kjain@linux.ibm.com, disgoel@linux.vnet.ibm.com,
Akanksha J N <akanksha@linux.ibm.com>
Subject: [PATCH 01/22] tools/perf/tests: Fix shellcheck warnings for trace+probe_vfs_getname.sh
Date: Wed, 21 Jun 2023 14:00:00 +0530 [thread overview]
Message-ID: <20230621083021.71203-2-atrajeev@linux.vnet.ibm.com> (raw)
In-Reply-To: <20230621083021.71203-1-atrajeev@linux.vnet.ibm.com>
From: Akanksha J N <akanksha@linux.ibm.com>
Running shellcheck -S on probe_vfs_getname.sh, throws below warnings:
Before fix:
$ shellcheck -S warning trace+probe_vfs_getname.sh
In trace+probe_vfs_getname.sh line 13:
. $(dirname $0)/lib/probe.sh
^-----------^ SC2046 (warning): Quote this to prevent word splitting.
In trace+probe_vfs_getname.sh line 18:
. $(dirname $0)/lib/probe_vfs_getname.sh
^-----------^ SC2046 (warning): Quote this to prevent word splitting.
In trace+probe_vfs_getname.sh line 21:
evts=$(echo $(perf list syscalls:sys_enter_open* 2>/dev/null | grep -E 'open(at)? ' | sed -r 's/.*sys_enter_([a-z]+) +\[.*$/\1/') | sed 's/ /,/')
^-- SC2046 (warning): Quote this to prevent word splitting.
Fix the shellcheck warnings by adding quotes to prevent word splitting.
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Signed-off-by: Akanksha J N <akanksha@linux.ibm.com>
---
tools/perf/tests/shell/trace+probe_vfs_getname.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf/tests/shell/trace+probe_vfs_getname.sh b/tools/perf/tests/shell/trace+probe_vfs_getname.sh
index 0a4bac3dd77e..db2ff141f703 100755
--- a/tools/perf/tests/shell/trace+probe_vfs_getname.sh
+++ b/tools/perf/tests/shell/trace+probe_vfs_getname.sh
@@ -10,15 +10,15 @@
# SPDX-License-Identifier: GPL-2.0
# Arnaldo Carvalho de Melo <acme@kernel.org>, 2017
-. $(dirname $0)/lib/probe.sh
+. "$(dirname $0)"/lib/probe.sh
skip_if_no_perf_probe || exit 2
skip_if_no_perf_trace || exit 2
-. $(dirname $0)/lib/probe_vfs_getname.sh
+. "$(dirname $0)"/lib/probe_vfs_getname.sh
trace_open_vfs_getname() {
- evts=$(echo $(perf list syscalls:sys_enter_open* 2>/dev/null | grep -E 'open(at)? ' | sed -r 's/.*sys_enter_([a-z]+) +\[.*$/\1/') | sed 's/ /,/')
+ evts="$(echo "$(perf list syscalls:sys_enter_open* 2>/dev/null | grep -E 'open(at)? ' | sed -r 's/.*sys_enter_([a-z]+) +\[.*$/\1/')" | sed ':a;N;s:\n:,:g')"
perf trace -e $evts touch $file 2>&1 | \
grep -E " +[0-9]+\.[0-9]+ +\( +[0-9]+\.[0-9]+ ms\): +touch\/[0-9]+ open(at)?\((dfd: +CWD, +)?filename: +${file}, +flags: CREAT\|NOCTTY\|NONBLOCK\|WRONLY, +mode: +IRUGO\|IWUGO\) += +[0-9]+$"
}
--
2.39.1
next prev parent reply other threads:[~2023-06-21 8:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 8:29 [PATCH 00/22] tools/perf: Fix shellcheck coding/formatting issues of perf tool shell scripts Athira Rajeev
2023-06-21 8:30 ` Athira Rajeev [this message]
2023-06-21 8:30 ` [PATCH 02/22] tools/perf/tests: Fix shellcheck warning for probe_vfs_getname.sh testcase Athira Rajeev
2023-06-21 8:30 ` [PATCH 03/22] tools/perf/tests: Fix shellcheck warning for record_offcpu.sh testcase Athira Rajeev
2023-06-21 8:30 ` [PATCH 04/22] tools/perf/tests: Fix shellcheck issue for lock_contention.sh testcase Athira Rajeev
2023-06-21 8:30 ` [PATCH 05/22] tools/perf/tests: Fix shellcheck issue for stat_bpf_counters_cgrp.sh testcase Athira Rajeev
2023-06-21 8:30 ` [PATCH 06/22] tools/perf/tests: fix test_arm_spe_fork.sh signal case issues Athira Rajeev
2023-06-21 8:30 ` [PATCH 07/22] tools/perf/tests: Fix unused variable references in stat+csv_summary.sh testcase Athira Rajeev
2023-06-21 8:30 ` [PATCH 08/22] tools/perf/tests: fix shellcheck warning for test_perf_data_converter_json.sh testcase Athira Rajeev
2023-06-21 8:30 ` [PATCH 09/22] tools/perf/tests: Fix shellcheck issue for stat_bpf_counters.sh testcase Athira Rajeev
2023-06-21 8:30 ` [PATCH 10/22] tools/perf/tests: Fix shellcheck issues in tests/shell/stat+shadow_stat.sh tetscase Athira Rajeev
2023-06-21 8:30 ` [PATCH 11/22] tools/perf/tests: Fix shellcheck warning for asm_pure_loop.sh shell script Athira Rajeev
2023-06-21 8:30 ` [PATCH 12/22] tools/perf/tests: Fix shellcheck warning for memcpy_thread_16k_10.sh " Athira Rajeev
2023-06-21 8:30 ` [PATCH 13/22] tools/perf/tests: Fix shellcheck warning for coresight.sh " Athira Rajeev
2023-06-27 7:52 ` James Clark
2023-06-21 8:30 ` [PATCH 14/22] tools/perf/tests: Fix shellcheck warning for probe.sh " Athira Rajeev
2023-06-21 8:30 ` [PATCH 15/22] tools/perf/trace: Fix shellcheck issue for arch_errno_names.sh script Athira Rajeev
2023-06-21 8:30 ` [PATCH 16/22] tools/perf: Fix shellcheck issue for check-headers.sh script Athira Rajeev
2023-06-21 8:30 ` [PATCH 17/22] tools/perf/tests: Fix shellcheck warnings for thread_loop_check_tid_10.sh Athira Rajeev
2023-06-21 8:30 ` [PATCH 18/22] tools/perf/tests: Fix shellcheck warnings for unroll_loop_thread_10.sh Athira Rajeev
2023-06-21 8:30 ` [PATCH 19/22] tools/perf/tests: Fix shellcheck warnings for lib/probe_vfs_getname.sh Athira Rajeev
2023-06-21 8:30 ` [PATCH 20/22] tools/perf/tests: Fix the shellcheck wanrings in lib/waiting.sh Athira Rajeev
2023-06-21 8:30 ` [PATCH 21/22] tools/perf/trace: Fix x86_arch_prctl.sh to address shellcheck warnings Athira Rajeev
2023-06-21 8:30 ` [PATCH 22/22] tools/perf/arch/x86: Fix syscalltbl.sh " Athira Rajeev
2023-06-23 23:40 ` [PATCH 00/22] tools/perf: Fix shellcheck coding/formatting issues of perf tool shell scripts Namhyung Kim
2023-06-27 7:12 ` Athira Rajeev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230621083021.71203-2-atrajeev@linux.vnet.ibm.com \
--to=atrajeev@linux.vnet.ibm.com \
--cc=acme@kernel.org \
--cc=akanksha@linux.ibm.com \
--cc=disgoel@linux.vnet.ibm.com \
--cc=irogers@google.com \
--cc=john.g.garry@oracle.com \
--cc=jolsa@kernel.org \
--cc=kjain@linux.ibm.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=namhyung@kernel.org \
--cc=ravi.bangoria@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).