From nobody Thu Sep 24 20:02:46 2026 Received: from mail-wm2-f12.google.com (mail-wm2-f12.google.com [74.125.225.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA806475357 for ; Mon, 21 Sep 2026 15:47:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.140 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790005669; cv=none; b=Eqqk+ao20pi3wJS1kaD+GkMZAUz8QwQCiHu17BrlZyKGGerV+GxuG8+r6hwQDMbgGoAii2xZpXa6Q92LsXWPJTbGQp0LRTQJlMXzmId28eQnPwvXvUxKE27PrCcG5jtBShDgENerrS2WmKXEytPm/MqTdM9s/8rXEjmQQ/c6ZS4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790005669; c=relaxed/simple; bh=wJj5GXZvrtIY5U1jzMBIIobCu779Aq8NC9i0Ztxqe+c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=U40jYIsnn4N6MZAZiL8/TidhF6jsQP1EjRy1CzmBa2gSAgHy5Nrs3fHvXH2fn1OTwYueTxQCSw3uCR7lmW2WK6prxzhPfvtz+GCQ3HqgO+jV3om02mdQ8vFuHutAqFs31UITe27vAyXjAMI1jkQHQkEbvxr7wDlQoOaitjfJtBg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=O3FDlMtg; arc=none smtp.client-ip=74.125.225.140 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="O3FDlMtg" Received: by mail-wm2-f12.google.com with SMTP id 5b1f17b1804b1-49ccead2aecso15388155e9.0 for ; Mon, 21 Sep 2026 08:47:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1790005664; x=1790610464; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=nNk3gKnBrsdOSw55H+tL4fJGQ9ze+6N52EZUoCt+Fu4=; b=O3FDlMtgkUqoHL3PAr8+3nO/jEG5HLsvbSJQQXpa3ajCH5MYEF5Z+ReR4F+/CfQ0qm E12NTxWF+rmvDGNsu4+CSLYGk4k0aqaFJH63wMoVHdA6uMQxWpChNPjVq62LBuGwaGQA V18GZlQWpfBFM007y88ndqpnI2JY4hEXgGooT4fDgr6XiWymXn7hUjWjH+hWbng+i7eu hgmGJH+I7uT93g6R7L9nIGfCydypUNZKIZzMCdv51V5OSeVaY5xCEH/dVRO6XjI+Wk7I 2H2RR7E/1TejKEZ++KWaaNF/oK/bSYWJMpNAG8iwvu1pdYV4I+6+fa796eegn6xRImig sEPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790005664; x=1790610464; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=nNk3gKnBrsdOSw55H+tL4fJGQ9ze+6N52EZUoCt+Fu4=; b=s+FTnFbfncT8mcRMcJ7g9iblSC37DTaO1vKUHbKTZpyq2PnWnqH7ZuUGk5E5x7u53z yl8vhHfrGcsOsvOr+O1NxGUzy4ao1Ns9LY0S/VNfZMNDvpkro+7xw9s0/McIA0KM/fYv AfNOmJdoZnaCaaDON//hmg5pCnBo5SGUUxp67kcxFZq1+TE2/i8Il/VKNsgsxkaKjNL7 iMZEq/W/ToWej2JxErq2VTEmgYx/UQBlo1Tyl8B8c0VXGDekOUqZBpRexWNNIgQGz2Jo /RU304lxJbbA0wmmuYoa73Ek55fm9HPGrQcceu6blJ3OAyqsWaqwt8JNLeOGPMa9/hI3 n52A== X-Forwarded-Encrypted: i=1; AKwUvBxLI/bCjdGRxeIsKR1wsLu+QUiNxWdofR488L7z9QAnswmE0cichijvj1I8vwRoTXIxBV3C1OXNUz6h7zk=@vger.kernel.org X-Gm-Message-State: AFuF++loCBB+9FxLxxp5KinvdCQn+o/g1OiK3JFeubZCFB9BC1XZyC2O lRALEUUDs7PqI5CzCJl2TiasY7SFOWITnh4a16jx8nB0nF3UsDpnmdQfIDAJEtitSmNBgDnUAta MQ9kw7wk= X-Gm-Gg: AYBFou04cbNLFDt3XboCeRyogWcYEUGNITb/kB/kz6FdTQU9Jq7Y1Mg4/p410eId0A6 0JUw9Jkw1IfyoqNhbr3mKMFaRNacwR4EoiUp+KwDqwZ+yZVtEtSFQX3DzbA1QwxMiRJFc6jQWKm /+5TwTB3mXnJ3ytpUGgPw8uAOH5vLapN4BFraoeuV7BwICiS0bVMxH6VohRNnW9Lyw+L9ls8ZqW 08dP7o/VKB0cXPgb2VzrXlHQ/Z6KSmIeUTSHXIWZArjZUq8dN9RIEjcZBFGSbGCswT4lEfSmyEq TR2OOaxOGiB6w3yKp5Xh4J4ShTC6jUNizDke/hOjowbdhRyEYGdXSmFF7vg4daZ6dPVNaiPMReg ai+MowQNdNaFAbzyUbZev3mAJkWnK/IAECTJCT5SKvcqjYYeVrJKSQcCyiCgmKoMv1JCqR1sGKQ 9TQJG4rkrjnr+BsgjucZMQOw+e4zCuKEfyJrkVRFudnV1ycitzNqgnWtjQDKlukjygvbQPsrh+6 mY= X-Received: by 2002:a05:600c:3b8e:b0:49f:bc43:9e96 with SMTP id 5b1f17b1804b1-49fc57144aamr200308715e9.8.1790005663884; Mon, 21 Sep 2026 08:47:43 -0700 (PDT) Received: from pop-os.local ([37.18.141.193]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49fcd103325sm279287355e9.9.2026.09.21.08.47.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2026 08:47:43 -0700 (PDT) From: James Clark Date: Mon, 21 Sep 2026 16:47:28 +0100 Subject: [PATCH 1/2] perf test: Remove redundant shellcheck source paths Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260921-james-perf-shellcheck-source-v1-1-adcfc107c997@linaro.org> References: <20260921-james-perf-shellcheck-source-v1-0-adcfc107c997@linaro.org> In-Reply-To: <20260921-james-perf-shellcheck-source-v1-0-adcfc107c997@linaro.org> To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, James Clark X-Mailer: b4 0.15.2 The minimum required shellcheck version treats paths with leading variables as starting from the script's current directory, so shellcheck is able to source all of these files without needing the extra directives: v0.7.2 - 2021-04-19 Changed * SC1090: A leading $x/ or $(x)/ is now treated as ./ when locating files Remove them to avoid future copy pasting and confusion that they are required. Because the paths weren't actually followed, they didn't have to be accurate and accepted any string to silence the warning. Signed-off-by: James Clark Acked-by: Namhyung Kim --- tools/perf/tests/shell/annotate.sh | 1 - tools/perf/tests/shell/base_probe/test_adding_kernel.sh | 1 - tools/perf/tests/shell/diff.sh | 1 - tools/perf/tests/shell/inject_aslr.sh | 1 - tools/perf/tests/shell/jitdump-python.sh | 1 - tools/perf/tests/shell/list.sh | 1 - tools/perf/tests/shell/pipe_test.sh | 1 - tools/perf/tests/shell/probe_vfs_getname.sh | 2 -- tools/perf/tests/shell/python-use.sh | 1 - tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 2 -- tools/perf/tests/shell/record+script_probe_vfs_getname.sh | 2 -- tools/perf/tests/shell/record.sh | 2 -- tools/perf/tests/shell/record_weak_term.sh | 1 - tools/perf/tests/shell/script_dlfilter.sh | 1 - tools/perf/tests/shell/stat+csv_output.sh | 1 - tools/perf/tests/shell/stat+json_output.sh | 1 - tools/perf/tests/shell/stat+std_output.sh | 1 - tools/perf/tests/shell/stat_metrics_values.sh | 1 - tools/perf/tests/shell/test_arm_callgraph_fp.sh | 1 - tools/perf/tests/shell/test_brstack.sh | 1 - tools/perf/tests/shell/test_data_symbol.sh | 1 - tools/perf/tests/shell/test_intel_pt.sh | 1 - tools/perf/tests/shell/test_perf_data_converter_json.sh | 1 - tools/perf/tests/shell/test_test_junit_output.sh | 1 - tools/perf/tests/shell/test_uprobe_from_different_cu.sh | 1 - tools/perf/tests/shell/trace+probe_vfs_getname.sh | 1 - tools/perf/tests/shell/trace_btf_enum.sh | 1 - tools/perf/tests/shell/trace_btf_general.sh | 1 - tools/perf/tests/shell/trace_exit_race.sh | 1 - tools/perf/tests/shell/trace_record_replay.sh | 2 -- tools/perf/tests/shell/trace_summary.sh | 1 - 31 files changed, 36 deletions(-) diff --git a/tools/perf/tests/shell/annotate.sh b/tools/perf/tests/shell/an= notate.sh index 689de58e9238..26411edf5cb4 100755 --- a/tools/perf/tests/shell/annotate.sh +++ b/tools/perf/tests/shell/annotate.sh @@ -6,7 +6,6 @@ set -e =20 shelldir=3D$(dirname "$0") =20 -# shellcheck source=3Dlib/perf_has_symbol.sh . "${shelldir}"/lib/perf_has_symbol.sh =20 testsym=3D"noploop" diff --git a/tools/perf/tests/shell/base_probe/test_adding_kernel.sh b/tool= s/perf/tests/shell/base_probe/test_adding_kernel.sh index 555a825d55f2..eadac837f108 100755 --- a/tools/perf/tests/shell/base_probe/test_adding_kernel.sh +++ b/tools/perf/tests/shell/base_probe/test_adding_kernel.sh @@ -19,7 +19,6 @@ TEST_RESULT=3D0 # include working environment . "$DIR_PATH/../common/init.sh" =20 -# shellcheck source=3Dlib/probe_vfs_getname.sh . "$DIR_PATH/../lib/probe_vfs_getname.sh" =20 TEST_PROBE=3D${TEST_PROBE:-"inode_permission"} diff --git a/tools/perf/tests/shell/diff.sh b/tools/perf/tests/shell/diff.sh index fe05fdebcab5..88f37b8ef893 100755 --- a/tools/perf/tests/shell/diff.sh +++ b/tools/perf/tests/shell/diff.sh @@ -11,7 +11,6 @@ perfdata3=3D$(mktemp /tmp/__perf_test.perf.data.XXXXX) testprog=3D"perf test -w thloop" =20 shelldir=3D$(dirname "$0") -# shellcheck source=3Dlib/perf_has_symbol.sh . "${shelldir}"/lib/perf_has_symbol.sh =20 testsym=3D"test_loop" diff --git a/tools/perf/tests/shell/inject_aslr.sh b/tools/perf/tests/shell= /inject_aslr.sh index d83c2591db8f..6ee4c8b5c850 100755 --- a/tools/perf/tests/shell/inject_aslr.sh +++ b/tools/perf/tests/shell/inject_aslr.sh @@ -6,7 +6,6 @@ set -e set -o pipefail =20 shelldir=3D$(dirname "$0") -# shellcheck source=3Dlib/perf_has_symbol.sh . "${shelldir}"/lib/perf_has_symbol.sh =20 sym=3D"noploop" diff --git a/tools/perf/tests/shell/jitdump-python.sh b/tools/perf/tests/sh= ell/jitdump-python.sh index 05aaa3bd900b..ad345a35c16d 100755 --- a/tools/perf/tests/shell/jitdump-python.sh +++ b/tools/perf/tests/shell/jitdump-python.sh @@ -3,7 +3,6 @@ # SPDX-License-Identifier: GPL-2.0 =20 SHELLDIR=3D$(dirname $0) -# shellcheck source=3Dlib/setup_python.sh . "${SHELLDIR}"/lib/setup_python.sh =20 OUTPUT=3D$(${PYTHON} -Xperf_jit -c 'import os, sys; print(os.getpid(), sys= .is_stack_trampoline_active())' 2> /dev/null) diff --git a/tools/perf/tests/shell/list.sh b/tools/perf/tests/shell/list.sh index 0c04b3159cef..14a03e0290ed 100755 --- a/tools/perf/tests/shell/list.sh +++ b/tools/perf/tests/shell/list.sh @@ -5,7 +5,6 @@ set -e =20 shelldir=3D$(dirname "$0") -# shellcheck source=3Dlib/setup_python.sh . "${shelldir}"/lib/setup_python.sh =20 list_output=3D$(mktemp /tmp/__perf_test.list_output.json.XXXXX) diff --git a/tools/perf/tests/shell/pipe_test.sh b/tools/perf/tests/shell/p= ipe_test.sh index ce68d850c983..f4eb129afda2 100755 --- a/tools/perf/tests/shell/pipe_test.sh +++ b/tools/perf/tests/shell/pipe_test.sh @@ -3,7 +3,6 @@ # SPDX-License-Identifier: GPL-2.0 =20 shelldir=3D$(dirname "$0") -# shellcheck source=3Dlib/perf_has_symbol.sh . "${shelldir}"/lib/perf_has_symbol.sh =20 sym=3D"noploop" diff --git a/tools/perf/tests/shell/probe_vfs_getname.sh b/tools/perf/tests= /shell/probe_vfs_getname.sh index 5fe5682c28ce..36dc319eea0e 100755 --- a/tools/perf/tests/shell/probe_vfs_getname.sh +++ b/tools/perf/tests/shell/probe_vfs_getname.sh @@ -4,13 +4,11 @@ # SPDX-License-Identifier: GPL-2.0 # Arnaldo Carvalho de Melo , 2017 =20 -# shellcheck source=3Dlib/probe.sh . "$(dirname $0)"/lib/probe.sh =20 skip_if_no_perf_probe || exit 2 [ "$(id -u)" =3D 0 ] || exit 2 =20 -# shellcheck source=3Dlib/probe_vfs_getname.sh . "$(dirname $0)"/lib/probe_vfs_getname.sh =20 add_probe_vfs_getname diff --git a/tools/perf/tests/shell/python-use.sh b/tools/perf/tests/shell/= python-use.sh index fd2ee5390060..2d6017d5dd9d 100755 --- a/tools/perf/tests/shell/python-use.sh +++ b/tools/perf/tests/shell/python-use.sh @@ -5,7 +5,6 @@ set -e =20 shelldir=3D$(dirname "$0") -# shellcheck source=3Dlib/setup_python.sh . "${shelldir}"/lib/setup_python.sh =20 MODULE_DIR=3D$(dirname "$(which perf)")/python diff --git a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh b/tools/= perf/tests/shell/record+probe_libc_inet_pton.sh index eca629ee83f0..4c9a308a450d 100755 --- a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh +++ b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh @@ -10,9 +10,7 @@ # SPDX-License-Identifier: GPL-2.0 # Arnaldo Carvalho de Melo , 2017 =20 -# shellcheck source=3Dlib/probe.sh . "$(dirname "$0")/lib/probe.sh" -# shellcheck source=3Dlib/probe_vfs_getname.sh . "$(dirname "$0")/lib/probe_vfs_getname.sh" =20 libc=3D$(grep -w libc /proc/self/maps | head -1 | sed -r 's/.*[[:space:]](= \/.*)/\1/g') diff --git a/tools/perf/tests/shell/record+script_probe_vfs_getname.sh b/to= ols/perf/tests/shell/record+script_probe_vfs_getname.sh index 002f7037f182..ce20663601dc 100755 --- a/tools/perf/tests/shell/record+script_probe_vfs_getname.sh +++ b/tools/perf/tests/shell/record+script_probe_vfs_getname.sh @@ -9,13 +9,11 @@ # SPDX-License-Identifier: GPL-2.0 # Arnaldo Carvalho de Melo , 2017 =20 -# shellcheck source=3Dlib/probe.sh . "$(dirname "$0")/lib/probe.sh" =20 skip_if_no_perf_probe || exit 2 [ "$(id -u)" =3D 0 ] || exit 2 =20 -# shellcheck source=3Dlib/probe_vfs_getname.sh . "$(dirname "$0")/lib/probe_vfs_getname.sh" =20 record_open_file() { diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/reco= rd.sh index 625240809fce..7c6657aa1c52 100755 --- a/tools/perf/tests/shell/record.sh +++ b/tools/perf/tests/shell/record.sh @@ -8,10 +8,8 @@ shelldir=3D$(dirname "$0") . "${shelldir}"/lib/perf_record.sh =20 =20 -# shellcheck source=3Dlib/waiting.sh . "${shelldir}"/lib/waiting.sh =20 -# shellcheck source=3Dlib/perf_has_symbol.sh . "${shelldir}"/lib/perf_has_symbol.sh =20 testsym=3D"test_loop" diff --git a/tools/perf/tests/shell/record_weak_term.sh b/tools/perf/tests/= shell/record_weak_term.sh index 811b00ffb47a..da418669ab52 100755 --- a/tools/perf/tests/shell/record_weak_term.sh +++ b/tools/perf/tests/shell/record_weak_term.sh @@ -5,7 +5,6 @@ set -e =20 shelldir=3D$(dirname "$0") -# shellcheck source=3Dlib/setup_python.sh . "${shelldir}"/lib/setup_python.sh =20 # Find the first event with a specified period, such as diff --git a/tools/perf/tests/shell/script_dlfilter.sh b/tools/perf/tests/s= hell/script_dlfilter.sh index aaed92bb7828..88222280f609 100755 --- a/tools/perf/tests/shell/script_dlfilter.sh +++ b/tools/perf/tests/shell/script_dlfilter.sh @@ -5,7 +5,6 @@ set -e =20 shelldir=3D$(dirname "$0") -# shellcheck source=3Dlib/setup_python.sh . "${shelldir}"/lib/setup_python.sh =20 # skip if there's no compiler diff --git a/tools/perf/tests/shell/stat+csv_output.sh b/tools/perf/tests/s= hell/stat+csv_output.sh index cd6fff597091..a5b34c42e8d7 100755 --- a/tools/perf/tests/shell/stat+csv_output.sh +++ b/tools/perf/tests/shell/stat+csv_output.sh @@ -6,7 +6,6 @@ =20 set -e =20 -# shellcheck source=3Dlib/stat_output.sh . "$(dirname $0)"/lib/stat_output.sh =20 csv_sep=3D@ diff --git a/tools/perf/tests/shell/stat+json_output.sh b/tools/perf/tests/= shell/stat+json_output.sh index 85d1ad7186c6..4969ad70b67b 100755 --- a/tools/perf/tests/shell/stat+json_output.sh +++ b/tools/perf/tests/shell/stat+json_output.sh @@ -9,7 +9,6 @@ set -e skip_test=3D0 =20 shelldir=3D$(dirname "$0") -# shellcheck source=3Dlib/setup_python.sh . "${shelldir}"/lib/setup_python.sh pythonchecker=3D$(dirname $0)/lib/perf_json_output_lint.py =20 diff --git a/tools/perf/tests/shell/stat+std_output.sh b/tools/perf/tests/s= hell/stat+std_output.sh index 9c4b92ecf448..64c2b81f02de 100755 --- a/tools/perf/tests/shell/stat+std_output.sh +++ b/tools/perf/tests/shell/stat+std_output.sh @@ -6,7 +6,6 @@ =20 set -e =20 -# shellcheck source=3Dlib/stat_output.sh . "$(dirname $0)"/lib/stat_output.sh =20 stat_output=3D$(mktemp /tmp/__perf_test.stat_output.std.XXXXX) diff --git a/tools/perf/tests/shell/stat_metrics_values.sh b/tools/perf/tes= ts/shell/stat_metrics_values.sh index 86c5c7f70933..0982f6b9737a 100755 --- a/tools/perf/tests/shell/stat_metrics_values.sh +++ b/tools/perf/tests/shell/stat_metrics_values.sh @@ -3,7 +3,6 @@ # SPDX-License-Identifier: GPL-2.0 =20 shelldir=3D$(dirname "$0") -# shellcheck source=3Dlib/setup_python.sh . "${shelldir}"/lib/setup_python.sh =20 grep -q GenuineIntel /proc/cpuinfo || { echo Skipping non-Intel; exit 2; } diff --git a/tools/perf/tests/shell/test_arm_callgraph_fp.sh b/tools/perf/t= ests/shell/test_arm_callgraph_fp.sh index 9172dd68a81d..8adfe81fa8dc 100755 --- a/tools/perf/tests/shell/test_arm_callgraph_fp.sh +++ b/tools/perf/tests/shell/test_arm_callgraph_fp.sh @@ -3,7 +3,6 @@ # SPDX-License-Identifier: GPL-2.0 =20 shelldir=3D$(dirname "$0") -# shellcheck source=3Dlib/perf_has_symbol.sh . "${shelldir}"/lib/perf_has_symbol.sh =20 if [ "$(uname -m)" !=3D "aarch64" ]; then diff --git a/tools/perf/tests/shell/test_brstack.sh b/tools/perf/tests/shel= l/test_brstack.sh index 71550e0b37ba..fd05ebb5ae74 100755 --- a/tools/perf/tests/shell/test_brstack.sh +++ b/tools/perf/tests/shell/test_brstack.sh @@ -5,7 +5,6 @@ # German Gomez , 2022 =20 shelldir=3D$(dirname "$0") -# shellcheck source=3Dlib/perf_has_symbol.sh . "${shelldir}"/lib/perf_has_symbol.sh =20 # skip the test if the hardware doesn't support branch stack sampling diff --git a/tools/perf/tests/shell/test_data_symbol.sh b/tools/perf/tests/= shell/test_data_symbol.sh index d61b5659a46d..edc528c11dda 100755 --- a/tools/perf/tests/shell/test_data_symbol.sh +++ b/tools/perf/tests/shell/test_data_symbol.sh @@ -6,7 +6,6 @@ =20 shelldir=3D$(dirname "$0") =20 -# shellcheck source=3Dlib/perf_has_symbol.sh . "${shelldir}"/lib/perf_has_symbol.sh =20 skip_if_no_mem_event() { diff --git a/tools/perf/tests/shell/test_intel_pt.sh b/tools/perf/tests/she= ll/test_intel_pt.sh index 26243ff760ec..a2e87ef09593 100755 --- a/tools/perf/tests/shell/test_intel_pt.sh +++ b/tools/perf/tests/shell/test_intel_pt.sh @@ -8,7 +8,6 @@ set -e perf list pmu | grep -q 'intel_pt//' || exit 2 =20 shelldir=3D$(dirname "$0") -# shellcheck source=3Dlib/waiting.sh . "${shelldir}"/lib/waiting.sh =20 skip_cnt=3D0 diff --git a/tools/perf/tests/shell/test_perf_data_converter_json.sh b/tool= s/perf/tests/shell/test_perf_data_converter_json.sh index 35d81e39a26c..c2c4ade7609a 100755 --- a/tools/perf/tests/shell/test_perf_data_converter_json.sh +++ b/tools/perf/tests/shell/test_perf_data_converter_json.sh @@ -7,7 +7,6 @@ set -e err=3D0 =20 shelldir=3D$(dirname "$0") -# shellcheck source=3Dlib/setup_python.sh . "${shelldir}"/lib/setup_python.sh =20 perfdata=3D$(mktemp /tmp/__perf_test.perf.data.XXXXX) diff --git a/tools/perf/tests/shell/test_test_junit_output.sh b/tools/perf/= tests/shell/test_test_junit_output.sh index 5104ac1e1e6d..38a29e646906 100755 --- a/tools/perf/tests/shell/test_test_junit_output.sh +++ b/tools/perf/tests/shell/test_test_junit_output.sh @@ -7,7 +7,6 @@ set -e err=3D0 =20 shelldir=3D$(dirname "$0") -# shellcheck source=3Dlib/setup_python.sh . "${shelldir}"/lib/setup_python.sh =20 result=3D$(mktemp /tmp/__perf_test.output.xml.XXXXX) diff --git a/tools/perf/tests/shell/test_uprobe_from_different_cu.sh b/tool= s/perf/tests/shell/test_uprobe_from_different_cu.sh index 7adf9755d6de..83505093257d 100755 --- a/tools/perf/tests/shell/test_uprobe_from_different_cu.sh +++ b/tools/perf/tests/shell/test_uprobe_from_different_cu.sh @@ -4,7 +4,6 @@ =20 set -e =20 -# shellcheck source=3Dlib/probe.sh . "$(dirname $0)"/lib/probe.sh =20 skip_if_no_perf_probe || exit 2 diff --git a/tools/perf/tests/shell/trace+probe_vfs_getname.sh b/tools/perf= /tests/shell/trace+probe_vfs_getname.sh index 7a0b1145d0cd..28d3aa8a9e33 100755 --- a/tools/perf/tests/shell/trace+probe_vfs_getname.sh +++ b/tools/perf/tests/shell/trace+probe_vfs_getname.sh @@ -10,7 +10,6 @@ # SPDX-License-Identifier: GPL-2.0 # Arnaldo Carvalho de Melo , 2017 =20 -# shellcheck source=3Dlib/probe.sh . "$(dirname $0)"/lib/probe.sh =20 skip_if_no_perf_probe || exit 2 diff --git a/tools/perf/tests/shell/trace_btf_enum.sh b/tools/perf/tests/sh= ell/trace_btf_enum.sh index 03e9f680a4a6..b1a659e0245f 100755 --- a/tools/perf/tests/shell/trace_btf_enum.sh +++ b/tools/perf/tests/shell/trace_btf_enum.sh @@ -9,7 +9,6 @@ non_syscall=3D"timer:hrtimer_start" =20 TESTPROG=3D"perf test -w landlock" =20 -# shellcheck source=3Dlib/probe.sh . "$(dirname $0)"/lib/probe.sh skip_if_no_perf_trace || exit 2 [ "$(id -u)" =3D 0 ] || exit 2 diff --git a/tools/perf/tests/shell/trace_btf_general.sh b/tools/perf/tests= /shell/trace_btf_general.sh index 7a94a5743924..06f4a704daf8 100755 --- a/tools/perf/tests/shell/trace_btf_general.sh +++ b/tools/perf/tests/shell/trace_btf_general.sh @@ -4,7 +4,6 @@ =20 err=3D0 =20 -# shellcheck source=3Dlib/probe.sh . "$(dirname $0)"/lib/probe.sh =20 file1=3D$(mktemp /tmp/file1_XXXX) diff --git a/tools/perf/tests/shell/trace_exit_race.sh b/tools/perf/tests/s= hell/trace_exit_race.sh index db300cde94fb..024ff8f1d388 100755 --- a/tools/perf/tests/shell/trace_exit_race.sh +++ b/tools/perf/tests/shell/trace_exit_race.sh @@ -6,7 +6,6 @@ # lost. Specifically, trace the exiting syscall of "true" 10 times and ens= ure # the output contains 10 correct lines. =20 -# shellcheck source=3Dlib/probe.sh . "$(dirname $0)"/lib/probe.sh =20 skip_if_no_perf_trace || exit 2 diff --git a/tools/perf/tests/shell/trace_record_replay.sh b/tools/perf/tes= ts/shell/trace_record_replay.sh index 38fcafcdfb91..76a7bba6ef23 100755 --- a/tools/perf/tests/shell/trace_record_replay.sh +++ b/tools/perf/tests/shell/trace_record_replay.sh @@ -4,9 +4,7 @@ =20 # Check that perf trace works with record and replay =20 -# shellcheck source=3Dlib/probe.sh . "$(dirname $0)"/lib/probe.sh -# shellcheck source=3Dlib/perf_record.sh . "$(dirname $0)"/lib/perf_record.sh =20 skip_if_no_perf_trace || exit 2 diff --git a/tools/perf/tests/shell/trace_summary.sh b/tools/perf/tests/she= ll/trace_summary.sh index b80dea77cec6..d5da1d7d8d88 100755 --- a/tools/perf/tests/shell/trace_summary.sh +++ b/tools/perf/tests/shell/trace_summary.sh @@ -4,7 +4,6 @@ =20 # Check that perf trace works with various summary mode =20 -# shellcheck source=3Dlib/probe.sh . "$(dirname $0)"/lib/probe.sh =20 skip_if_no_perf_trace || exit 2 --=20 2.43.0 From nobody Thu Sep 24 20:02:46 2026 Received: from mail-wm2-f12.google.com (mail-wm2-f12.google.com [74.125.225.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 618014BF94C for ; Mon, 21 Sep 2026 15:47:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.140 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790005670; cv=none; b=QIpuNyihXtEd43o1J+B7OsfDMx/p6LDr6RLwbDXX+eipAN7JidaLwAXkQNTOdKvoSD22K+uj7AlWqXjBu57y+E27NAqnpBJOejvZP4NDx2hU/qSoPYgj5nma7coguQQpWEkz3dG9ugP6k1ArkXUIrRkSkMjYwOsSABEp7JARVMY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790005670; c=relaxed/simple; bh=nHVksdY8w4wF3N08fRE1ytwkMeXTDgOSdB45U/VyuoU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=AHhS/K/J2j6DawEzg3nDEDdvx+Q1DQnKPVmdQNv3Dyvm582GpVP6Off7UsRnNrpMuVMmC1M7EGu9gdT4kOHkrvBQptHZPfJTyqFqvDZnCrto2ATF2f0rsTR+bPgxKKcOrBXILnKzOAz0yz0U6SASM1YiUO1AHN/L8J/NxNUcLHY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=HgyGkpR0; arc=none smtp.client-ip=74.125.225.140 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HgyGkpR0" Received: by mail-wm2-f12.google.com with SMTP id 5b1f17b1804b1-49cd5462b69so17003865e9.1 for ; Mon, 21 Sep 2026 08:47:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1790005665; x=1790610465; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=pOnOOGEA+4+JPvESbiYqMHc15VbAUTSR17XouVJ46Ss=; b=HgyGkpR0V8r3OeGpaQSOmgrsHFOaIYS6UCItXj8uaAtfKStrj/0BslYIphst7UooTS 5mcHLtpUYuuy0XdzyKLZQ5/rGyAbcPk4aX9IhyXZYge6GZlRa9mZ1M54WyjLLftYUGWD t9qKtpAqMlfKXFs3Qqg9DqyDS3r1UPA0WwvQ1QupNvNyFzDNoY7sgpbCgcnUEB0WkTrp /e4xP5c0/A9tJ9wkDai0OCQaIHrXwoHX78YRE4TN0iikLxfwvnAisbuC7XBCZMRof6wh NxXPJaGy+ST6cJFl9qTy/dMiLY5XkIiZ2uqb+S531E6+Sg80otehLilUj4ar9Wi//Yf5 yh6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790005665; x=1790610465; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=pOnOOGEA+4+JPvESbiYqMHc15VbAUTSR17XouVJ46Ss=; b=h0YtqZ8lQzyFB1M9GoEfKx2HHi3WrcRcGgpxeAw8ie8kYz2BO0KNjGJfb71SypiX11 PXwb9RpNuaRTElabuwcrhGsvQF8tLUQCue7bPUQ3/c3V9943ZloslqJZlmOaX0zpFlAH BMzTNaMjf7tv782Ad4FyGZXd2JJZoLuvtd4/LHxwLy806Ero2Nuru0fK5P/1nwUJPXV5 AhfVMBOalCHrn7r03W37OkM+sQNx155OhvTgoILuDoOIn5HltG2ra12g6hpQyuOib6XM JlqPxXIjbwLvqNG3Iw2c4FrfO5njccjtrltyHK3CkeQC9sbnVmqNlzeDk3GmkvGqIU+D aAgQ== X-Forwarded-Encrypted: i=1; AKwUvBzCPivezSo40YKdlyd7ErJ+5nIkhLURwRyuJmFS0F0H61nyUA9zawsQ6j3rO0yDAm7A26dvgjzyDKCJRSg=@vger.kernel.org X-Gm-Message-State: AFuF++mo3bmAkeMV0MOIKYlfAFT4ZUxO58c+D8PjBGIqYTu+jv+7Tm6E PlAU1AG14o2PNUJ+v4dv1kbHRQ8wPdOlfmuueG5fRfcEtofRJVeFLl1c/Two2zMLTbA= X-Gm-Gg: AYBFou2lVYIIeKvc54UpvZZhzYnsEOC30FE8ITd+O8ds2bUncWzw57j9h5hSqr/SeuJ R1DzKzKflbfJEhDhfsmsU31cdosA2hFAYGUIBQPL+bsXlditRUWI7x9hJWNXArhtJVKOGcRIiwp MyxUIKiz7aDjXS0v5Z10DpcC19vnWP7wEx6hkwnBwFFd8ImYKQjXPgXzK7+BJre02KvTNvjfYWj hwYOYUlNh3j7k8Ezw9o29rsFi5rhWqjByD6DTwAZb2hRbkHWyFOQ4Sroc4lU1yyq4KoRydaPhAl yXn5UEc9QkwLvKL5sN5c0J1UHRJxmIetgxUsgKZ0BPFH5pOfDQzVKxUnJmowIzm21fo1Sg9hi2W 9n2KwEA4eMbPV73dY85OiD/Zm51IrUq1mRxAVrKPYN57lIUNYvhWqVjPeq5Gq33Can5cSqrMB+E 14E2wIjDm7OcIZ8nVA3lQzSWg9/zbbJx3RE8byZ9btYtFrUzSzWNhlhH/+DMl3Tg52zH+eGgXxT ug= X-Received: by 2002:a05:600c:620e:b0:49f:ce78:3560 with SMTP id 5b1f17b1804b1-49fce7835e0mr135252035e9.17.1790005664767; Mon, 21 Sep 2026 08:47:44 -0700 (PDT) Received: from pop-os.local ([37.18.141.193]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49fcd103325sm279287355e9.9.2026.09.21.08.47.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2026 08:47:44 -0700 (PDT) From: James Clark Date: Mon, 21 Sep 2026 16:47:29 +0100 Subject: [PATCH 2/2] perf build: Follow sourced files when running shellcheck Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260921-james-perf-shellcheck-source-v1-2-adcfc107c997@linaro.org> References: <20260921-james-perf-shellcheck-source-v1-0-adcfc107c997@linaro.org> In-Reply-To: <20260921-james-perf-shellcheck-source-v1-0-adcfc107c997@linaro.org> To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, James Clark X-Mailer: b4 0.15.2 Shellcheck follows sourced scripts when -a is provided, but only when that file is also provided on the command line along with the one being checked. We only ever provide one file at a time to shellcheck, so -a does nothing. Improve coverage by following sources using the script's directory as the base path. Signed-off-by: James Clark Acked-by: Namhyung Kim --- tools/perf/Makefile.perf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 29cfd44c427f..76a17d3614a6 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -258,7 +258,7 @@ ifneq ($(SHELLCHECK),) sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \< 07= 2), 1) SHELLCHECK :=3D else - SHELLCHECK :=3D $(SHELLCHECK) -s bash -a -S warning + SHELLCHECK :=3D $(SHELLCHECK) -s bash -a -S warning -x -P SCRIPTDIR endif endif =20 --=20 2.43.0