aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAthira Rajeev <[email protected]>2023-10-13 13:00:21 +0530
committerNamhyung Kim <[email protected]>2023-10-17 12:40:51 -0700
commita20fca2c5db19a09260827e526f37397ba698ce0 (patch)
tree05c00698cf5731cd1da1e99fce3f4bd2e93bfc5b
parenteff65ee26ed73f3ca635bac13c386a4538a608d8 (diff)
perf tests: Fix shellcheck warning in stat_all_metricgroups
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 <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
-rwxr-xr-xtools/perf/tests/shell/stat_all_metricgroups.sh2
1 files changed, 1 insertions, 1 deletions
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 ]
}