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.wxQjaX6SDS and /tmp/tmp.ryu5o3sRSh Tree base: 0f19519fdd22 ("Merge branch 'net-mlx5-enable-sub-page-allocations-for-mlx5_frag_buf'") Now at: 236ad63cf278 ("selftests: net: fib_nexthops: detect kernel splats from torture tests") ====== Checking before the patch ====== Checking tools/testing/selftests/net/fib_nexthops.sh - a72f6161a9f400cdc01726640375d2edd0a2bb5fcf38138ba2533b40675874c1 In fib_nexthops.sh line 64: nsid=100 ^--^ SC2034 (warning): nsid appears unused. Verify use (or export if used externally). In fib_nexthops.sh line 75: 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 fib_nexthops.sh line 96: read a ^--^ SC2162 (info): read without -r will mangle backslashes. In fib_nexthops.sh line 104: read a ^--^ SC2162 (info): read without -r will mangle backslashes. In fib_nexthops.sh line 118: printf "COMMAND: $cmd\n" ^---------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_nexthops.sh line 122: out=$(eval $cmd $stderr) ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$(eval "$cmd" "$stderr") In fib_nexthops.sh line 124: if [ "$VERBOSE" = "1" -a -n "$out" ]; then ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In fib_nexthops.sh line 128: return $rc ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$rc" In fib_nexthops.sh line 138: addr=$(ip $ns -6 -br addr show dev ${dev} | \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: addr=$(ip "$ns" -6 -br addr show dev "${dev}" | \ In fib_nexthops.sh line 150: echo $addr ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$addr" In fib_nexthops.sh line 161: ip netns exec ${n} sysctl -qw net.ipv4.ip_forward=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv4.ip_forward=1 In fib_nexthops.sh line 162: ip netns exec ${n} sysctl -qw net.ipv4.fib_multipath_use_neigh=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv4.fib_multipath_use_neigh=1 In fib_nexthops.sh line 163: ip netns exec ${n} sysctl -qw net.ipv4.conf.default.ignore_routes_with_linkdown=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv4.conf.default.ignore_routes_with_linkdown=1 In fib_nexthops.sh line 164: ip netns exec ${n} sysctl -qw net.ipv6.conf.all.keep_addr_on_down=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv6.conf.all.keep_addr_on_down=1 In fib_nexthops.sh line 165: ip netns exec ${n} sysctl -qw net.ipv6.conf.all.forwarding=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv6.conf.all.forwarding=1 In fib_nexthops.sh line 166: ip netns exec ${n} sysctl -qw net.ipv6.conf.default.forwarding=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv6.conf.default.forwarding=1 In fib_nexthops.sh line 167: ip netns exec ${n} sysctl -qw net.ipv6.conf.default.ignore_routes_with_linkdown=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv6.conf.default.ignore_routes_with_linkdown=1 In fib_nexthops.sh line 168: ip netns exec ${n} sysctl -qw net.ipv6.conf.all.accept_dad=0 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv6.conf.all.accept_dad=0 In fib_nexthops.sh line 169: ip netns exec ${n} sysctl -qw net.ipv6.conf.default.accept_dad=0 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv6.conf.default.accept_dad=0 In fib_nexthops.sh line 179: create_ns $me ^-^ SC2154 (warning): me is referenced but not assigned. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$me" In fib_nexthops.sh line 180: create_ns $peer ^---^ SC2154 (warning): peer is referenced but not assigned. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$peer" In fib_nexthops.sh line 181: create_ns $remote ^-----^ SC2154 (warning): remote is referenced but not assigned. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$remote" In fib_nexthops.sh line 196: $IP li set veth2 netns $peer up ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP li set veth2 netns "$peer" up In fib_nexthops.sh line 197: ip -netns $peer addr add 172.16.1.2/24 dev veth2 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$peer" addr add 172.16.1.2/24 dev veth2 In fib_nexthops.sh line 198: ip -netns $peer -6 addr add 2001:db8:91::2/64 dev veth2 nodad ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$peer" -6 addr add 2001:db8:91::2/64 dev veth2 nodad In fib_nexthops.sh line 200: $IP li set veth4 netns $peer up ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP li set veth4 netns "$peer" up In fib_nexthops.sh line 201: ip -netns $peer addr add 172.16.2.2/24 dev veth4 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$peer" addr add 172.16.2.2/24 dev veth4 In fib_nexthops.sh line 202: ip -netns $peer -6 addr add 2001:db8:92::2/64 dev veth4 nodad ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$peer" -6 addr add 2001:db8:92::2/64 dev veth4 nodad In fib_nexthops.sh line 204: ip -netns $remote li add veth5 type veth peer name veth6 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$remote" li add veth5 type veth peer name veth6 In fib_nexthops.sh line 205: ip -netns $remote li set veth5 up ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$remote" li set veth5 up In fib_nexthops.sh line 206: ip -netns $remote addr add dev veth5 172.16.101.1/24 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$remote" addr add dev veth5 172.16.101.1/24 In fib_nexthops.sh line 207: ip -netns $remote -6 addr add dev veth5 2001:db8:101::1/64 nodad ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$remote" -6 addr add dev veth5 2001:db8:101::1/64 nodad In fib_nexthops.sh line 208: ip -netns $remote ro add 172.16.0.0/22 via 172.16.101.2 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$remote" ro add 172.16.0.0/22 via 172.16.101.2 In fib_nexthops.sh line 209: ip -netns $remote -6 ro add 2001:db8:90::/40 via 2001:db8:101::2 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$remote" -6 ro add 2001:db8:90::/40 via 2001:db8:101::2 In fib_nexthops.sh line 211: ip -netns $remote li set veth6 netns $peer up ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$remote" li set veth6 netns "$peer" up In fib_nexthops.sh line 212: ip -netns $peer addr add dev veth6 172.16.101.2/24 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$peer" addr add dev veth6 172.16.101.2/24 In fib_nexthops.sh line 213: ip -netns $peer -6 addr add dev veth6 2001:db8:101::2/64 nodad ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$peer" -6 addr add dev veth6 2001:db8:101::2/64 nodad In fib_nexthops.sh line 222: ip netns del ${ns} 2>/dev/null ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns del "${ns}" 2>/dev/null In fib_nexthops.sh line 238: printf " ${expected}\n" ^-----------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_nexthops.sh line 243: out=$(echo ${out}) ^------------^ SC2116 (style): Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$(echo "${out}") In fib_nexthops.sh line 248: printf " ${out}\n" ^----------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_nexthops.sh line 250: printf " ${expected}\n\n" ^-----------------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_nexthops.sh line 256: return $rc ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$rc" In fib_nexthops.sh line 265: out=$($IP nexthop ls ${nharg} 2>/dev/null) ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP nexthop ls "${nharg}" 2>/dev/null) In fib_nexthops.sh line 277: out=$($IP nexthop bucket ${nharg} \ ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP nexthop bucket "${nharg}" \ In fib_nexthops.sh line 289: out=$($IP route ls match ${pfx} 2>/dev/null) ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP route ls match "${pfx}" 2>/dev/null) In fib_nexthops.sh line 300: out=$($IP -6 route ls match ${pfx} 2>/dev/null | sed -e 's/pref medium//') ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP -6 route ls match "${pfx}" 2>/dev/null | sed -e 's/pref medium//') In fib_nexthops.sh line 318: if [ $ipv -eq 4 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$ipv" -eq 4 ]; then In fib_nexthops.sh line 330: while [ $iter -le $(($ecmp + 1)) ] ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2004 (style): $/${} is unnecessary on arithmetic variables. Did you mean: while [ "$iter" -le $(($ecmp + 1)) ] In fib_nexthops.sh line 332: nhidstr="$(($nhidstart + $iter))" ^--------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. ^---^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In fib_nexthops.sh line 336: if [ $iter -le $ecmp ]; 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 [ "$iter" -le "$ecmp" ]; then In fib_nexthops.sh line 346: while [ $iter -le $grpnum ] ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: while [ "$iter" -le "$grpnum" ] In fib_nexthops.sh line 348: grpidstr="$(($grpidstart + $iter))" ^---------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. ^---^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In fib_nexthops.sh line 365: if [ $ipv -eq 4 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$ipv" -eq 4 ]; then In fib_nexthops.sh line 404: tmpfile=`mktemp /var/run/nexthoptestXXX` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. Did you mean: tmpfile=$(mktemp /var/run/nexthoptestXXX) In fib_nexthops.sh line 405: mpid=`($IP monitor $mtype > $tmpfile & echo $!) 2>/dev/null` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: mpid=$(($IP monitor "$mtype" > "$tmpfile" & echo $!) 2>/dev/null) In fib_nexthops.sh line 417: kill $mpid ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill "$mpid" In fib_nexthops.sh line 418: lines=`wc -l $tmpfile | cut "-d " -f1` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: lines=$(wc -l "$tmpfile" | cut "-d " -f1) In fib_nexthops.sh line 419: test $lines -eq $el ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: test "$lines" -eq "$el" In fib_nexthops.sh line 421: rm -rf $tmpfile ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm -rf "$tmpfile" In fib_nexthops.sh line 423: return $rc ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$rc" In fib_nexthops.sh line 429: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 431: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 438: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 440: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 453: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 454: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 553: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 554: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 653: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 679: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 688: log_test $rc 0 "Use valid neighbor during multipath selection" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "Use valid neighbor during multipath selection" In fib_nexthops.sh line 694: log_test $rc 0 "Multipath selection with no valid neighbor" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "Multipath selection with no valid neighbor" In fib_nexthops.sh line 706: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 724: addr=$(printf "2001:db8:101::%x" $h) ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: addr=$(printf "2001:db8:101::%x" "$h") In fib_nexthops.sh line 732: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 741: log_test $rc 0 "Use valid neighbor during multipath selection" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "Use valid neighbor during multipath selection" In fib_nexthops.sh line 747: log_test $rc 0 "Multipath selection with no valid neighbor" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "Multipath selection with no valid neighbor" In fib_nexthops.sh line 765: log_test $rc 0 "Create nexthop with id, gw, dev" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "Create nexthop with id, gw, dev" In fib_nexthops.sh line 766: if [ $rc -ne 0 ]; then ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$rc" -ne 0 ]; then In fib_nexthops.sh line 859: timeout -s KILL 5 ip netns exec $me ip link del veth1.10 >/dev/null 2>&1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: timeout -s KILL 5 ip netns exec "$me" ip link del veth1.10 >/dev/null 2>&1 In fib_nexthops.sh line 958: [ $? -ne 0 ] && return 1 ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 992: if [[ $? == 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1003: log_test $rc 0 "16-bit weights" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "16-bit weights" In fib_nexthops.sh line 1015: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 1016: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1079: if [[ $? == 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1080: local GRP="id 103 group 62,254/63,255/64,256/65,257/66,65535 $(: ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_nexthops.sh line 1092: log_test $rc 0 "16-bit weights" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "16-bit weights" In fib_nexthops.sh line 1141: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1278: check_large_grp 6 $ecmp ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_large_grp 6 "$ecmp" In fib_nexthops.sh line 1290: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 1291: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1340: ip netns exec $me ping -f 2001:db8:101::1 >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" ping -f 2001:db8:101::1 >/dev/null 2>&1 & In fib_nexthops.sh line 1342: ip netns exec $me ping -f 2001:db8:101::2 >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" ping -f 2001:db8:101::2 >/dev/null 2>&1 & In fib_nexthops.sh line 1344: ip netns exec $me mausezahn -6 veth1 -B 2001:db8:101::2 -A 2001:db8:91::1 -c 0 -t tcp "dp=1-1023, flags=syn" >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" mausezahn -6 veth1 -B 2001:db8:101::2 -A 2001:db8:91::1 -c 0 -t tcp "dp=1-1023, flags=syn" >/dev/null 2>&1 & In fib_nexthops.sh line 1348: kill -9 $pid1 $pid2 $pid3 $pid4 $pid5 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill -9 "$pid1" "$pid2" "$pid3" "$pid4" "$pid5" In fib_nexthops.sh line 1349: wait $pid1 $pid2 $pid3 $pid4 $pid5 2>/dev/null ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: wait "$pid1" "$pid2" "$pid3" "$pid4" "$pid5" 2>/dev/null In fib_nexthops.sh line 1375: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 1376: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1394: ip netns exec $me ping -f 2001:db8:101::1 >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" ping -f 2001:db8:101::1 >/dev/null 2>&1 & In fib_nexthops.sh line 1396: ip netns exec $me ping -f 2001:db8:101::2 >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" ping -f 2001:db8:101::2 >/dev/null 2>&1 & In fib_nexthops.sh line 1398: ip netns exec $me mausezahn -6 veth1 \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" mausezahn -6 veth1 \ In fib_nexthops.sh line 1404: kill -9 $pid1 $pid2 $pid3 $pid4 $pid5 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill -9 "$pid1" "$pid2" "$pid3" "$pid4" "$pid5" In fib_nexthops.sh line 1405: wait $pid1 $pid2 $pid3 $pid4 $pid5 2>/dev/null ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: wait "$pid1" "$pid2" "$pid3" "$pid4" "$pid5" 2>/dev/null In fib_nexthops.sh line 1424: log_test $rc 0 "Create nexthop with id, gw, dev" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "Create nexthop with id, gw, dev" In fib_nexthops.sh line 1425: if [ $rc -ne 0 ]; then ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$rc" -ne 0 ]; then In fib_nexthops.sh line 1467: out1=`dmesg | grep "WARNING:.*fib_nh_match.*" | wc -l` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^-----------------------------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. Did you mean: out1=$(dmesg | grep "WARNING:.*fib_nh_match.*" | wc -l) In fib_nexthops.sh line 1470: out2=`dmesg | grep "WARNING:.*fib_nh_match.*" | wc -l` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^-----------------------------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. Did you mean: out2=$(dmesg | grep "WARNING:.*fib_nh_match.*" | wc -l) In fib_nexthops.sh line 1471: [ $out1 -eq $out2 ] ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$out1" -eq "$out2" ] In fib_nexthops.sh line 1473: log_test $rc 0 "Delete nexthop route warning" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "Delete nexthop route warning" In fib_nexthops.sh line 1584: [ $? -ne 0 ] && return 1 ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 1615: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 1616: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1675: lladdr=$(get_linklocal veth2 $peer) ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: lladdr=$(get_linklocal veth2 "$peer") In fib_nexthops.sh line 1798: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1827: lladdr=$(get_linklocal veth2 $peer) ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: lladdr=$(get_linklocal veth2 "$peer") In fib_nexthops.sh line 1841: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1869: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1901: check_large_grp 4 $ecmp ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_large_grp 4 "$ecmp" In fib_nexthops.sh line 1913: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 1914: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1929: $IPE sysctl -q $sysctlname 2>&1 >/dev/null ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2069 (warning): To redirect stdout+stderr, 2>&1 must be last (or use '{ cmd > file; } 2>&1' to clarify). Did you mean: $IPE sysctl -q "$sysctlname" 2>&1 >/dev/null In fib_nexthops.sh line 1930: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 1932: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1935: out=$($IPE sysctl $sysctlname 2>/dev/null) ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IPE sysctl "$sysctlname" 2>/dev/null) In fib_nexthops.sh line 1948: out=$($IPE sysctl -w $sysctlname=$mode) ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IPE sysctl -w "$sysctlname"="$mode") In fib_nexthops.sh line 1962: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 1963: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1973: stop_ip_monitor $ipmout 3 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 3 In fib_nexthops.sh line 1984: stop_ip_monitor $ipmout 3 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 3 In fib_nexthops.sh line 2000: stop_ip_monitor $ipmout 1 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 1 In fib_nexthops.sh line 2011: stop_ip_monitor $ipmout 0 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 0 In fib_nexthops.sh line 2017: stop_ip_monitor $ipmout 0 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 0 In fib_nexthops.sh line 2033: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 2034: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 2043: stop_ip_monitor $ipmout 3 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 3 In fib_nexthops.sh line 2056: stop_ip_monitor $ipmout 3 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 3 In fib_nexthops.sh line 2066: stop_ip_monitor $ipmout 1 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 1 In fib_nexthops.sh line 2077: stop_ip_monitor $ipmout 0 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 0 In fib_nexthops.sh line 2083: stop_ip_monitor $ipmout 0 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 0 In fib_nexthops.sh line 2130: ip netns exec $me ping -f 172.16.101.1 >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" ping -f 172.16.101.1 >/dev/null 2>&1 & In fib_nexthops.sh line 2132: ip netns exec $me ping -f 172.16.101.2 >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" ping -f 172.16.101.2 >/dev/null 2>&1 & In fib_nexthops.sh line 2134: ip netns exec $me mausezahn veth1 -B 172.16.101.2 -A 172.16.1.1 -c 0 -t tcp "dp=1-1023, flags=syn" >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" mausezahn veth1 -B 172.16.101.2 -A 172.16.1.1 -c 0 -t tcp "dp=1-1023, flags=syn" >/dev/null 2>&1 & In fib_nexthops.sh line 2138: kill -9 $pid1 $pid2 $pid3 $pid4 $pid5 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill -9 "$pid1" "$pid2" "$pid3" "$pid4" "$pid5" In fib_nexthops.sh line 2139: wait $pid1 $pid2 $pid3 $pid4 $pid5 2>/dev/null ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: wait "$pid1" "$pid2" "$pid3" "$pid4" "$pid5" 2>/dev/null In fib_nexthops.sh line 2165: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 2166: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 2184: ip netns exec $me ping -f 172.16.101.1 >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" ping -f 172.16.101.1 >/dev/null 2>&1 & In fib_nexthops.sh line 2186: ip netns exec $me ping -f 172.16.101.2 >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" ping -f 172.16.101.2 >/dev/null 2>&1 & In fib_nexthops.sh line 2188: ip netns exec $me mausezahn veth1 \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" mausezahn veth1 \ In fib_nexthops.sh line 2194: kill -9 $pid1 $pid2 $pid3 $pid4 $pid5 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill -9 "$pid1" "$pid2" "$pid3" "$pid4" "$pid5" In fib_nexthops.sh line 2195: wait $pid1 $pid2 $pid3 $pid4 $pid5 2>/dev/null ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: wait "$pid1" "$pid2" "$pid3" "$pid4" "$pid5" 2>/dev/null In fib_nexthops.sh line 2229: ip -netns $peer li set veth2 down ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$peer" li set veth2 down In fib_nexthops.sh line 2232: ip -netns $peer li set veth2 up ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$peer" li set veth2 up In fib_nexthops.sh line 2324: local batch_file=$(mktemp) ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_nexthops.sh line 2327: echo "nexthop add id $i blackhole" >> $batch_file ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "nexthop add id $i blackhole" >> "$batch_file" In fib_nexthops.sh line 2330: $IP -b $batch_file ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -b "$batch_file" In fib_nexthops.sh line 2335: rm $batch_file ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$batch_file" In fib_nexthops.sh line 2348: count=$($IP -j nexthop bucket ${nharg} ${selector} | jq length) ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: count=$($IP -j nexthop bucket "${nharg}" "${selector}" | jq length) In fib_nexthops.sh line 2349: (( $count $condition )) ^-- SC1105 (error): Shells disambiguate (( differently or not at all. For subshell, add spaces around ( . For ((, fix parsing errors. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: (( $count "$condition" )) In fib_nexthops.sh line 2352: return $ret ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ret" In fib_nexthops.sh line 2366: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 2367: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 2578: v) VERBOSE=$(($VERBOSE + 1));; ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In fib_nexthops.sh line 2599: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 2605: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 2619: 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 fib_nexthops.sh line 2620: 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}" In fib_nexthops.sh line 2621: printf "Tests skipped: %2d\n" ${nskip} ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: printf "Tests skipped: %2d\n" "${nskip}" For more information: https://www.shellcheck.net/wiki/SC1105 -- Shells disambiguate (( differentl... https://www.shellcheck.net/wiki/SC2034 -- nsid appears unused. Verify use (... https://www.shellcheck.net/wiki/SC2069 -- To redirect stdout+stderr, 2>&1 m... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/fib_nexthops.sh - a72f6161a9f400cdc01726640375d2edd0a2bb5fcf38138ba2533b40675874c1 In fib_nexthops.sh line 64: nsid=100 ^--^ SC2034 (warning): nsid appears unused. Verify use (or export if used externally). In fib_nexthops.sh line 75: 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 fib_nexthops.sh line 96: read a ^--^ SC2162 (info): read without -r will mangle backslashes. In fib_nexthops.sh line 104: read a ^--^ SC2162 (info): read without -r will mangle backslashes. In fib_nexthops.sh line 118: printf "COMMAND: $cmd\n" ^---------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_nexthops.sh line 122: out=$(eval $cmd $stderr) ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$(eval "$cmd" "$stderr") In fib_nexthops.sh line 124: if [ "$VERBOSE" = "1" -a -n "$out" ]; then ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In fib_nexthops.sh line 128: return $rc ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$rc" In fib_nexthops.sh line 168: echo "$found" | sed 's/^/ /' ^-----------------------------^ SC2001 (style): See if you can use ${variable//search/replace} instead. In fib_nexthops.sh line 179: addr=$(ip $ns -6 -br addr show dev ${dev} | \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: addr=$(ip "$ns" -6 -br addr show dev "${dev}" | \ In fib_nexthops.sh line 191: echo $addr ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$addr" In fib_nexthops.sh line 202: ip netns exec ${n} sysctl -qw net.ipv4.ip_forward=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv4.ip_forward=1 In fib_nexthops.sh line 203: ip netns exec ${n} sysctl -qw net.ipv4.fib_multipath_use_neigh=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv4.fib_multipath_use_neigh=1 In fib_nexthops.sh line 204: ip netns exec ${n} sysctl -qw net.ipv4.conf.default.ignore_routes_with_linkdown=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv4.conf.default.ignore_routes_with_linkdown=1 In fib_nexthops.sh line 205: ip netns exec ${n} sysctl -qw net.ipv6.conf.all.keep_addr_on_down=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv6.conf.all.keep_addr_on_down=1 In fib_nexthops.sh line 206: ip netns exec ${n} sysctl -qw net.ipv6.conf.all.forwarding=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv6.conf.all.forwarding=1 In fib_nexthops.sh line 207: ip netns exec ${n} sysctl -qw net.ipv6.conf.default.forwarding=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv6.conf.default.forwarding=1 In fib_nexthops.sh line 208: ip netns exec ${n} sysctl -qw net.ipv6.conf.default.ignore_routes_with_linkdown=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv6.conf.default.ignore_routes_with_linkdown=1 In fib_nexthops.sh line 209: ip netns exec ${n} sysctl -qw net.ipv6.conf.all.accept_dad=0 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv6.conf.all.accept_dad=0 In fib_nexthops.sh line 210: ip netns exec ${n} sysctl -qw net.ipv6.conf.default.accept_dad=0 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${n}" sysctl -qw net.ipv6.conf.default.accept_dad=0 In fib_nexthops.sh line 220: create_ns $me ^-^ SC2154 (warning): me is referenced but not assigned. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$me" In fib_nexthops.sh line 221: create_ns $peer ^---^ SC2154 (warning): peer is referenced but not assigned. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$peer" In fib_nexthops.sh line 222: create_ns $remote ^-----^ SC2154 (warning): remote is referenced but not assigned. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$remote" In fib_nexthops.sh line 237: $IP li set veth2 netns $peer up ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP li set veth2 netns "$peer" up In fib_nexthops.sh line 238: ip -netns $peer addr add 172.16.1.2/24 dev veth2 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$peer" addr add 172.16.1.2/24 dev veth2 In fib_nexthops.sh line 239: ip -netns $peer -6 addr add 2001:db8:91::2/64 dev veth2 nodad ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$peer" -6 addr add 2001:db8:91::2/64 dev veth2 nodad In fib_nexthops.sh line 241: $IP li set veth4 netns $peer up ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP li set veth4 netns "$peer" up In fib_nexthops.sh line 242: ip -netns $peer addr add 172.16.2.2/24 dev veth4 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$peer" addr add 172.16.2.2/24 dev veth4 In fib_nexthops.sh line 243: ip -netns $peer -6 addr add 2001:db8:92::2/64 dev veth4 nodad ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$peer" -6 addr add 2001:db8:92::2/64 dev veth4 nodad In fib_nexthops.sh line 245: ip -netns $remote li add veth5 type veth peer name veth6 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$remote" li add veth5 type veth peer name veth6 In fib_nexthops.sh line 246: ip -netns $remote li set veth5 up ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$remote" li set veth5 up In fib_nexthops.sh line 247: ip -netns $remote addr add dev veth5 172.16.101.1/24 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$remote" addr add dev veth5 172.16.101.1/24 In fib_nexthops.sh line 248: ip -netns $remote -6 addr add dev veth5 2001:db8:101::1/64 nodad ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$remote" -6 addr add dev veth5 2001:db8:101::1/64 nodad In fib_nexthops.sh line 249: ip -netns $remote ro add 172.16.0.0/22 via 172.16.101.2 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$remote" ro add 172.16.0.0/22 via 172.16.101.2 In fib_nexthops.sh line 250: ip -netns $remote -6 ro add 2001:db8:90::/40 via 2001:db8:101::2 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$remote" -6 ro add 2001:db8:90::/40 via 2001:db8:101::2 In fib_nexthops.sh line 252: ip -netns $remote li set veth6 netns $peer up ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$remote" li set veth6 netns "$peer" up In fib_nexthops.sh line 253: ip -netns $peer addr add dev veth6 172.16.101.2/24 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$peer" addr add dev veth6 172.16.101.2/24 In fib_nexthops.sh line 254: ip -netns $peer -6 addr add dev veth6 2001:db8:101::2/64 nodad ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$peer" -6 addr add dev veth6 2001:db8:101::2/64 nodad In fib_nexthops.sh line 263: ip netns del ${ns} 2>/dev/null ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns del "${ns}" 2>/dev/null In fib_nexthops.sh line 279: printf " ${expected}\n" ^-----------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_nexthops.sh line 284: out=$(echo ${out}) ^------------^ SC2116 (style): Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$(echo "${out}") In fib_nexthops.sh line 289: printf " ${out}\n" ^----------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_nexthops.sh line 291: printf " ${expected}\n\n" ^-----------------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_nexthops.sh line 297: return $rc ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$rc" In fib_nexthops.sh line 306: out=$($IP nexthop ls ${nharg} 2>/dev/null) ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP nexthop ls "${nharg}" 2>/dev/null) In fib_nexthops.sh line 318: out=$($IP nexthop bucket ${nharg} \ ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP nexthop bucket "${nharg}" \ In fib_nexthops.sh line 330: out=$($IP route ls match ${pfx} 2>/dev/null) ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP route ls match "${pfx}" 2>/dev/null) In fib_nexthops.sh line 341: out=$($IP -6 route ls match ${pfx} 2>/dev/null | sed -e 's/pref medium//') ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP -6 route ls match "${pfx}" 2>/dev/null | sed -e 's/pref medium//') In fib_nexthops.sh line 359: if [ $ipv -eq 4 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$ipv" -eq 4 ]; then In fib_nexthops.sh line 371: while [ $iter -le $(($ecmp + 1)) ] ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2004 (style): $/${} is unnecessary on arithmetic variables. Did you mean: while [ "$iter" -le $(($ecmp + 1)) ] In fib_nexthops.sh line 373: nhidstr="$(($nhidstart + $iter))" ^--------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. ^---^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In fib_nexthops.sh line 377: if [ $iter -le $ecmp ]; 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 [ "$iter" -le "$ecmp" ]; then In fib_nexthops.sh line 387: while [ $iter -le $grpnum ] ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: while [ "$iter" -le "$grpnum" ] In fib_nexthops.sh line 389: grpidstr="$(($grpidstart + $iter))" ^---------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. ^---^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In fib_nexthops.sh line 406: if [ $ipv -eq 4 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$ipv" -eq 4 ]; then In fib_nexthops.sh line 445: tmpfile=`mktemp /var/run/nexthoptestXXX` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. Did you mean: tmpfile=$(mktemp /var/run/nexthoptestXXX) In fib_nexthops.sh line 446: mpid=`($IP monitor $mtype > $tmpfile & echo $!) 2>/dev/null` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: mpid=$(($IP monitor "$mtype" > "$tmpfile" & echo $!) 2>/dev/null) In fib_nexthops.sh line 458: kill $mpid ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill "$mpid" In fib_nexthops.sh line 459: lines=`wc -l $tmpfile | cut "-d " -f1` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: lines=$(wc -l "$tmpfile" | cut "-d " -f1) In fib_nexthops.sh line 460: test $lines -eq $el ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: test "$lines" -eq "$el" In fib_nexthops.sh line 462: rm -rf $tmpfile ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm -rf "$tmpfile" In fib_nexthops.sh line 464: return $rc ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$rc" In fib_nexthops.sh line 470: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 472: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 479: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 481: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 494: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 495: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 594: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 595: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 694: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 720: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 729: log_test $rc 0 "Use valid neighbor during multipath selection" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "Use valid neighbor during multipath selection" In fib_nexthops.sh line 735: log_test $rc 0 "Multipath selection with no valid neighbor" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "Multipath selection with no valid neighbor" In fib_nexthops.sh line 747: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 765: addr=$(printf "2001:db8:101::%x" $h) ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: addr=$(printf "2001:db8:101::%x" "$h") In fib_nexthops.sh line 773: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 782: log_test $rc 0 "Use valid neighbor during multipath selection" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "Use valid neighbor during multipath selection" In fib_nexthops.sh line 788: log_test $rc 0 "Multipath selection with no valid neighbor" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "Multipath selection with no valid neighbor" In fib_nexthops.sh line 806: log_test $rc 0 "Create nexthop with id, gw, dev" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "Create nexthop with id, gw, dev" In fib_nexthops.sh line 807: if [ $rc -ne 0 ]; then ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$rc" -ne 0 ]; then In fib_nexthops.sh line 900: timeout -s KILL 5 ip netns exec $me ip link del veth1.10 >/dev/null 2>&1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: timeout -s KILL 5 ip netns exec "$me" ip link del veth1.10 >/dev/null 2>&1 In fib_nexthops.sh line 999: [ $? -ne 0 ] && return 1 ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 1033: if [[ $? == 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1044: log_test $rc 0 "16-bit weights" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "16-bit weights" In fib_nexthops.sh line 1056: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 1057: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1120: if [[ $? == 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1121: local GRP="id 103 group 62,254/63,255/64,256/65,257/66,65535 $(: ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_nexthops.sh line 1133: log_test $rc 0 "16-bit weights" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "16-bit weights" In fib_nexthops.sh line 1182: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1319: check_large_grp 6 $ecmp ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_large_grp 6 "$ecmp" In fib_nexthops.sh line 1331: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 1332: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1383: ip netns exec $me ping -f 2001:db8:101::1 >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" ping -f 2001:db8:101::1 >/dev/null 2>&1 & In fib_nexthops.sh line 1385: ip netns exec $me ping -f 2001:db8:101::2 >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" ping -f 2001:db8:101::2 >/dev/null 2>&1 & In fib_nexthops.sh line 1387: ip netns exec $me mausezahn -6 veth1 -B 2001:db8:101::2 -A 2001:db8:91::1 -c 0 -t tcp "dp=1-1023, flags=syn" >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" mausezahn -6 veth1 -B 2001:db8:101::2 -A 2001:db8:91::1 -c 0 -t tcp "dp=1-1023, flags=syn" >/dev/null 2>&1 & In fib_nexthops.sh line 1391: kill -9 $pid1 $pid2 $pid3 $pid4 $pid5 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill -9 "$pid1" "$pid2" "$pid3" "$pid4" "$pid5" In fib_nexthops.sh line 1392: wait $pid1 $pid2 $pid3 $pid4 $pid5 2>/dev/null ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: wait "$pid1" "$pid2" "$pid3" "$pid4" "$pid5" 2>/dev/null In fib_nexthops.sh line 1419: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 1420: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1440: ip netns exec $me ping -f 2001:db8:101::1 >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" ping -f 2001:db8:101::1 >/dev/null 2>&1 & In fib_nexthops.sh line 1442: ip netns exec $me ping -f 2001:db8:101::2 >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" ping -f 2001:db8:101::2 >/dev/null 2>&1 & In fib_nexthops.sh line 1444: ip netns exec $me mausezahn -6 veth1 \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" mausezahn -6 veth1 \ In fib_nexthops.sh line 1450: kill -9 $pid1 $pid2 $pid3 $pid4 $pid5 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill -9 "$pid1" "$pid2" "$pid3" "$pid4" "$pid5" In fib_nexthops.sh line 1451: wait $pid1 $pid2 $pid3 $pid4 $pid5 2>/dev/null ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: wait "$pid1" "$pid2" "$pid3" "$pid4" "$pid5" 2>/dev/null In fib_nexthops.sh line 1471: log_test $rc 0 "Create nexthop with id, gw, dev" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "Create nexthop with id, gw, dev" In fib_nexthops.sh line 1472: if [ $rc -ne 0 ]; then ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$rc" -ne 0 ]; then In fib_nexthops.sh line 1514: out1=`dmesg | grep "WARNING:.*fib_nh_match.*" | wc -l` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^-----------------------------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. Did you mean: out1=$(dmesg | grep "WARNING:.*fib_nh_match.*" | wc -l) In fib_nexthops.sh line 1517: out2=`dmesg | grep "WARNING:.*fib_nh_match.*" | wc -l` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^-----------------------------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. Did you mean: out2=$(dmesg | grep "WARNING:.*fib_nh_match.*" | wc -l) In fib_nexthops.sh line 1518: [ $out1 -eq $out2 ] ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$out1" -eq "$out2" ] In fib_nexthops.sh line 1520: log_test $rc 0 "Delete nexthop route warning" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test "$rc" 0 "Delete nexthop route warning" In fib_nexthops.sh line 1631: [ $? -ne 0 ] && return 1 ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 1662: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 1663: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1722: lladdr=$(get_linklocal veth2 $peer) ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: lladdr=$(get_linklocal veth2 "$peer") In fib_nexthops.sh line 1845: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1874: lladdr=$(get_linklocal veth2 $peer) ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: lladdr=$(get_linklocal veth2 "$peer") In fib_nexthops.sh line 1888: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1916: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1948: check_large_grp 4 $ecmp ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_large_grp 4 "$ecmp" In fib_nexthops.sh line 1960: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 1961: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1976: $IPE sysctl -q $sysctlname 2>&1 >/dev/null ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2069 (warning): To redirect stdout+stderr, 2>&1 must be last (or use '{ cmd > file; } 2>&1' to clarify). Did you mean: $IPE sysctl -q "$sysctlname" 2>&1 >/dev/null In fib_nexthops.sh line 1977: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 1979: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1982: out=$($IPE sysctl $sysctlname 2>/dev/null) ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IPE sysctl "$sysctlname" 2>/dev/null) In fib_nexthops.sh line 1995: out=$($IPE sysctl -w $sysctlname=$mode) ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IPE sysctl -w "$sysctlname"="$mode") In fib_nexthops.sh line 2009: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 2010: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 2020: stop_ip_monitor $ipmout 3 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 3 In fib_nexthops.sh line 2031: stop_ip_monitor $ipmout 3 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 3 In fib_nexthops.sh line 2047: stop_ip_monitor $ipmout 1 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 1 In fib_nexthops.sh line 2058: stop_ip_monitor $ipmout 0 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 0 In fib_nexthops.sh line 2064: stop_ip_monitor $ipmout 0 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 0 In fib_nexthops.sh line 2080: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 2081: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 2090: stop_ip_monitor $ipmout 3 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 3 In fib_nexthops.sh line 2103: stop_ip_monitor $ipmout 3 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 3 In fib_nexthops.sh line 2113: stop_ip_monitor $ipmout 1 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 1 In fib_nexthops.sh line 2124: stop_ip_monitor $ipmout 0 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 0 In fib_nexthops.sh line 2130: stop_ip_monitor $ipmout 0 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stop_ip_monitor "$ipmout" 0 In fib_nexthops.sh line 2179: ip netns exec $me ping -f 172.16.101.1 >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" ping -f 172.16.101.1 >/dev/null 2>&1 & In fib_nexthops.sh line 2181: ip netns exec $me ping -f 172.16.101.2 >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" ping -f 172.16.101.2 >/dev/null 2>&1 & In fib_nexthops.sh line 2183: ip netns exec $me mausezahn veth1 -B 172.16.101.2 -A 172.16.1.1 -c 0 -t tcp "dp=1-1023, flags=syn" >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" mausezahn veth1 -B 172.16.101.2 -A 172.16.1.1 -c 0 -t tcp "dp=1-1023, flags=syn" >/dev/null 2>&1 & In fib_nexthops.sh line 2187: kill -9 $pid1 $pid2 $pid3 $pid4 $pid5 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill -9 "$pid1" "$pid2" "$pid3" "$pid4" "$pid5" In fib_nexthops.sh line 2188: wait $pid1 $pid2 $pid3 $pid4 $pid5 2>/dev/null ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: wait "$pid1" "$pid2" "$pid3" "$pid4" "$pid5" 2>/dev/null In fib_nexthops.sh line 2215: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 2216: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 2236: ip netns exec $me ping -f 172.16.101.1 >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" ping -f 172.16.101.1 >/dev/null 2>&1 & In fib_nexthops.sh line 2238: ip netns exec $me ping -f 172.16.101.2 >/dev/null 2>&1 & ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" ping -f 172.16.101.2 >/dev/null 2>&1 & In fib_nexthops.sh line 2240: ip netns exec $me mausezahn veth1 \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$me" mausezahn veth1 \ In fib_nexthops.sh line 2246: kill -9 $pid1 $pid2 $pid3 $pid4 $pid5 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill -9 "$pid1" "$pid2" "$pid3" "$pid4" "$pid5" In fib_nexthops.sh line 2247: wait $pid1 $pid2 $pid3 $pid4 $pid5 2>/dev/null ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: wait "$pid1" "$pid2" "$pid3" "$pid4" "$pid5" 2>/dev/null In fib_nexthops.sh line 2282: ip -netns $peer li set veth2 down ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$peer" li set veth2 down In fib_nexthops.sh line 2285: ip -netns $peer li set veth2 up ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$peer" li set veth2 up In fib_nexthops.sh line 2377: local batch_file=$(mktemp) ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_nexthops.sh line 2380: echo "nexthop add id $i blackhole" >> $batch_file ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "nexthop add id $i blackhole" >> "$batch_file" In fib_nexthops.sh line 2383: $IP -b $batch_file ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -b "$batch_file" In fib_nexthops.sh line 2388: rm $batch_file ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$batch_file" In fib_nexthops.sh line 2401: count=$($IP -j nexthop bucket ${nharg} ${selector} | jq length) ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: count=$($IP -j nexthop bucket "${nharg}" "${selector}" | jq length) In fib_nexthops.sh line 2402: (( $count $condition )) ^-- SC1105 (error): Shells disambiguate (( differently or not at all. For subshell, add spaces around ( . For ((, fix parsing errors. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: (( $count "$condition" )) In fib_nexthops.sh line 2405: return $ret ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ret" In fib_nexthops.sh line 2419: if [ $? -eq $ksft_skip ]; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ $? -eq "$ksft_skip" ]; then In fib_nexthops.sh line 2420: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 2631: v) VERBOSE=$(($VERBOSE + 1));; ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In fib_nexthops.sh line 2652: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 2658: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 2672: 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 fib_nexthops.sh line 2673: 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}" In fib_nexthops.sh line 2674: printf "Tests skipped: %2d\n" ${nskip} ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: printf "Tests skipped: %2d\n" "${nskip}" For more information: https://www.shellcheck.net/wiki/SC1105 -- Shells disambiguate (( differentl... https://www.shellcheck.net/wiki/SC2034 -- nsid appears unused. Verify use (... https://www.shellcheck.net/wiki/SC2069 -- To redirect stdout+stderr, 2>&1 m...