mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-01 08:04:22 +08:00
tests/shell: Fix shellcheck SC1090 to handle the location of sourced files
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> Tested-by: Ian Rogers <irogers@google.com> Reviewed-by: Kajol Jain <kjain@linux.ibm.com> Cc: maddy@linux.ibm.com Cc: disgoel@linux.vnet.ibm.com Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230907171540.36736-2-atrajeev@linux.vnet.ibm.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
parent
cd0f9e3f7e
commit
35de80c709
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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')
|
||||
|
@ -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() {
|
||||
|
@ -5,6 +5,7 @@
|
||||
set -e
|
||||
|
||||
shelldir=$(dirname "$0")
|
||||
# shellcheck source=lib/waiting.sh
|
||||
. "${shelldir}"/lib/waiting.sh
|
||||
|
||||
err=0
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
# shellcheck source=lib/stat_output.sh
|
||||
. "$(dirname $0)"/lib/stat_output.sh
|
||||
|
||||
csv_sep=@
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user