[PATCH 13/22] tools/perf/tests: Fix shellcheck warning for coresight.sh shell script
Athira Rajeev
atrajeev at linux.vnet.ibm.com
Wed Jun 21 18:30:12 AEST 2023
From: Kajol Jain <kjain at linux.ibm.com>
Running shellcheck on coresight.sh throws below warning:
In lib/coresight.sh line 1:
^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
In lib/coresight.sh line 13:
PERFRECOPT="$PERFRECMEM -e cs_etm//u"
^--------^ SC2034 (warning): PERFRECOPT appears unused. Verify use (or export if used externally).
Fixed the warnings by:
- Adding shell directive
- Using export for PERFRECOPT variable
Signed-off-by: Athira Rajeev <atrajeev at linux.vnet.ibm.com>
Signed-off-by: Kajol Jain <kjain at linux.ibm.com>
---
tools/perf/tests/shell/lib/coresight.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/tests/shell/lib/coresight.sh b/tools/perf/tests/shell/lib/coresight.sh
index 6c3d34ec64d8..c7d97a0186c7 100644
--- a/tools/perf/tests/shell/lib/coresight.sh
+++ b/tools/perf/tests/shell/lib/coresight.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# Carsten Haitzler <carsten.haitzler at arm.com>, 2021
@@ -10,7 +11,7 @@
# perf record options for the perf tests to use
PERFRECMEM="-m ,16M"
-PERFRECOPT="$PERFRECMEM -e cs_etm//u"
+export PERFRECOPT="$PERFRECMEM -e cs_etm//u"
TOOLS=$(dirname $0)
DIR="$TOOLS/$TEST"
--
2.39.1
More information about the Linuxppc-dev
mailing list