ShellCheck - shell script analysis tool version: 0.10.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net Redirect to /tmp/tmp.cuIvBKWC1m and /tmp/tmp.KoheEhqBYE Tree base: 2c7e4a2663a1 ("Merge tag 'net-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net") Now at: 0504d81fbfd6 ("selftests/net: packetdrill: more xfail changes") ====== Checking before the patch ====== Checking tools/testing/selftests/net/packetdrill/ksft_runner.sh - b44cd6648b9af340281c0bfcfb2e337aafc4c3a7aa9537ed45e0c14d4634b280 In ksft_runner.sh line 4: source "$(dirname $(realpath $0))/../../kselftest/ktap_helpers.sh" ^------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: source "$(dirname $(realpath "$0"))/../../kselftest/ktap_helpers.sh" In ksft_runner.sh line 24: exit "$KSFT_FAIL" ^---------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In ksft_runner.sh line 26: script="$(basename $1)" ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: script="$(basename "$1")" In ksft_runner.sh line 50: readonly xfail_regex="^($(printf '%s|' "${xfail_list[@]}"))$" ^---------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In ksft_runner.sh line 57: unshare -n packetdrill ${ipv4_args[@]} ${optargs[@]} $script > /dev/null \ ^-------------^ SC2068 (error): Double quote array expansions to avoid re-splitting elements. ^-----------^ SC2068 (error): Double quote array expansions to avoid re-splitting elements. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: unshare -n packetdrill ${ipv4_args[@]} ${optargs[@]} "$script" > /dev/null \ In ksft_runner.sh line 58: && ktap_test_pass "ipv4" || $failfunc "ipv4" ^-- SC2015 (info): Note that A && B || C is not if-then-else. C may run when A is true. In ksft_runner.sh line 59: unshare -n packetdrill ${ipv6_args[@]} ${optargs[@]} $script > /dev/null \ ^-------------^ SC2068 (error): Double quote array expansions to avoid re-splitting elements. ^-----------^ SC2068 (error): Double quote array expansions to avoid re-splitting elements. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: unshare -n packetdrill ${ipv6_args[@]} ${optargs[@]} "$script" > /dev/null \ In ksft_runner.sh line 60: && ktap_test_pass "ipv6" || $failfunc "ipv6" ^-- SC2015 (info): Note that A && B || C is not if-then-else. C may run when A is true. For more information: https://www.shellcheck.net/wiki/SC2068 -- Double quote array expansions to ... https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/packetdrill/ksft_runner.sh - b44cd6648b9af340281c0bfcfb2e337aafc4c3a7aa9537ed45e0c14d4634b280 In ksft_runner.sh line 4: source "$(dirname $(realpath $0))/../../kselftest/ktap_helpers.sh" ^------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: source "$(dirname $(realpath "$0"))/../../kselftest/ktap_helpers.sh" In ksft_runner.sh line 24: exit "$KSFT_FAIL" ^---------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In ksft_runner.sh line 26: script="$(basename $1)" ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: script="$(basename "$1")" In ksft_runner.sh line 54: readonly xfail_regex="^($(printf '%s|' "${xfail_list[@]}"))$" ^---------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In ksft_runner.sh line 61: unshare -n packetdrill ${ipv4_args[@]} ${optargs[@]} $script > /dev/null \ ^-------------^ SC2068 (error): Double quote array expansions to avoid re-splitting elements. ^-----------^ SC2068 (error): Double quote array expansions to avoid re-splitting elements. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: unshare -n packetdrill ${ipv4_args[@]} ${optargs[@]} "$script" > /dev/null \ In ksft_runner.sh line 62: && ktap_test_pass "ipv4" || $failfunc "ipv4" ^-- SC2015 (info): Note that A && B || C is not if-then-else. C may run when A is true. In ksft_runner.sh line 63: unshare -n packetdrill ${ipv6_args[@]} ${optargs[@]} $script > /dev/null \ ^-------------^ SC2068 (error): Double quote array expansions to avoid re-splitting elements. ^-----------^ SC2068 (error): Double quote array expansions to avoid re-splitting elements. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: unshare -n packetdrill ${ipv6_args[@]} ${optargs[@]} "$script" > /dev/null \ In ksft_runner.sh line 64: && ktap_test_pass "ipv6" || $failfunc "ipv6" ^-- SC2015 (info): Note that A && B || C is not if-then-else. C may run when A is true. For more information: https://www.shellcheck.net/wiki/SC2068 -- Double quote array expansions to ... https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ...