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.mCalLW9Kor and /tmp/tmp.tRgag7N52a Tree base: 5c69e0b395c1 ("Merge branch 'stmmac-stop-silently-dropping-bad-checksum-packets'") Now at: d513f614c187 ("selftests/net: packetdrill: Support single protocol test.") ====== 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 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 44: 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 45: && 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 46: 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 47: && 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/SC2015 -- Note that A && B || C is not if-t... ====== 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 27: script="$(basename $1)" ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: script="$(basename "$1")" In ksft_runner.sh line 42: ip_versions=$(grep -E '^--ip_version=' $script | cut -d '=' -f 2) ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip_versions=$(grep -E '^--ip_version=' "$script" | cut -d '=' -f 2) In ksft_runner.sh line 54: unshare -n packetdrill ${ip_args[$ip_version]} ${optargs[@]} $script > /dev/null \ ^---------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----------^ 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 "${ip_args[$ip_version]}" ${optargs[@]} "$script" > /dev/null \ In ksft_runner.sh line 55: && ktap_test_pass $ip_version || $failfunc $ip_version ^-- SC2015 (info): Note that A && B || C is not if-then-else. C may run when A is true. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: && ktap_test_pass "$ip_version" || $failfunc "$ip_version" 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/SC2015 -- Note that A && B || C is not if-t...