From: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
To: acme@kernel.org, jolsa@kernel.org, adrian.hunter@intel.com,
irogers@google.com, namhyung@kernel.org
Cc: atrajeev@linux.vnet.ibm.com, kjain@linux.ibm.com,
linux-perf-users@vger.kernel.org, maddy@linux.ibm.com,
disgoel@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH V2 3/3] tools/perf/tests/shell: Fix shellcheck warning SC2112 with stat_all_metricgroups
Date: Fri, 13 Oct 2023 13:00:21 +0530 [thread overview]
Message-ID: <20231013073021.99794-4-atrajeev@linux.vnet.ibm.com> (raw)
In-Reply-To: <20231013073021.99794-1-atrajeev@linux.vnet.ibm.com>
Running shellcheck on stat_all_metricgroups.sh reports
below warning:
In ./tests/shell/stat_all_metricgroups.sh line 7:
function ParanoidAndNotRoot()
^-- SC2112: 'function' keyword is non-standard. Delete it.
As per the format, "function" is a non-standard keyword that
can be used to declare functions. Fix this by removing the
"function" keyword from ParanoidAndNotRoot function
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
---
Changelog:
This is a new patch added in V2
tools/perf/tests/shell/stat_all_metricgroups.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/tests/shell/stat_all_metricgroups.sh b/tools/perf/tests/shell/stat_all_metricgroups.sh
index f3e305649e2c..55ef9c9ded2d 100755
--- a/tools/perf/tests/shell/stat_all_metricgroups.sh
+++ b/tools/perf/tests/shell/stat_all_metricgroups.sh
@@ -4,7 +4,7 @@
set -e
-function ParanoidAndNotRoot()
+ParanoidAndNotRoot()
{
[ "$(id -u)" != 0 ] && [ "$(cat /proc/sys/kernel/perf_event_paranoid)" -gt $1 ]
}
--
2.31.1
next prev parent reply other threads:[~2023-10-13 7:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 7:30 [PATCH V2 0/3] Fix for shellcheck issues with latest scripts in tests/shell Athira Rajeev
2023-10-13 7:30 ` [PATCH V2 1/3] tools/perf/tests Ignore the shellcheck SC2046 warning in lock_contention Athira Rajeev
2023-10-13 7:30 ` [PATCH V2 2/3] tools/perf/tests: Fix shellcheck warning in record_sideband.sh test Athira Rajeev
2023-10-13 7:30 ` Athira Rajeev [this message]
2023-10-17 2:04 ` [PATCH V2 0/3] Fix for shellcheck issues with latest scripts in tests/shell Namhyung Kim
2023-10-17 19:55 ` Namhyung Kim
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=20231013073021.99794-4-atrajeev@linux.vnet.ibm.com \
--to=atrajeev@linux.vnet.ibm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=disgoel@linux.vnet.ibm.com \
--cc=irogers@google.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 \
/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).