ShellCheck - shell script analysis tool version: 0.11.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net Redirect to /tmp/tmp.nZcqA6Hu3s and /tmp/tmp.XiKEpGZ4SP Tree base: 4d137b68779a ("ipv6: use the right ifindex when replying to icmpv6 from localhost") Now at: f2507b7ae534 ("selftests: ipv6_icmp: add tests for ICMPv6 handling") ====== Checking before the patch ====== ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/ipv6_icmp.sh - 78bf4ca91fbcff463ae8f4346a8a3fde0675c89eb520b9d7f315111ae681bf3e In ipv6_icmp.sh line 23: if [ ${rc} -eq ${expected} ]; then ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "${rc}" -eq "${expected}" ]; then In ipv6_icmp.sh line 33: read a ^--^ SC2162 (info): read without -r will mangle backslashes. In ipv6_icmp.sh line 41: read a ^--^ SC2162 (info): read without -r will mangle backslashes. In ipv6_icmp.sh line 50: IP="$(which ip) -netns $ns1" ^--^ SC2154 (warning): ns1 is referenced but not assigned. In ipv6_icmp.sh line 62: cleanup_ns $ns1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: cleanup_ns "$ns1" In ipv6_icmp.sh line 70: addr=$($IP -6 -br addr show dev ${dev} | \ ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: addr=$($IP -6 -br addr show dev "${dev}" | \ In ipv6_icmp.sh line 82: echo $addr ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$addr" In ipv6_icmp.sh line 94: printf " COMMAND: $cmd\n" ^-------------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In ipv6_icmp.sh line 98: out=$(eval $cmd $stderr) ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$(eval "$cmd" $stderr) In ipv6_icmp.sh line 100: if [ "$VERBOSE" = "1" -a -n "$out" ]; then ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In ipv6_icmp.sh line 118: local lldummy=$(get_linklocal dummy0) ^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In ipv6_icmp.sh line 169: v) VERBOSE=$(($VERBOSE + 1));; ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In ipv6_icmp.sh line 200: printf "\nTests passed: %3d\n" ${nsuccess} ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: printf "\nTests passed: %3d\n" "${nsuccess}" In ipv6_icmp.sh line 201: printf "Tests failed: %3d\n" ${nfail} ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: printf "Tests failed: %3d\n" "${nfail}" For more information: https://www.shellcheck.net/wiki/SC2154 -- ns1 is referenced but not assigned. https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC2166 -- Prefer [ p ] && [ q ] as [ p -a q...