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.9pikQFpwCq and /tmp/tmp.PegAcgr3aC Tree base: da00345e36e2 ("nexthop: Forbid FDB status change while nexthop is in a group") Now at: c5717b1f1b6e ("selftests: fib_nexthops: Fix creation of non-FDB nexthops") ====== 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 533: 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 534: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 613: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 639: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 648: 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 654: 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 666: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 684: 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 692: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 701: 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 707: 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 725: 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 726: 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 811: 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 910: [ $? -ne 0 ] && return 1 ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 944: if [[ $? == 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 955: 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 967: 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 968: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1031: if [[ $? == 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1032: 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 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 1093: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1208: 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 1220: 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 1221: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1270: 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 1272: 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 1274: 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 1278: 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 1279: 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 1305: 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 1306: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1324: 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 1326: 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 1328: 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 1334: 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 1335: 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 1354: 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 1355: 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 1397: 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 1400: 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 1401: [ $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 1403: 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 1507: [ $? -ne 0 ] && return 1 ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 1538: 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 1539: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1598: 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 1710: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1739: 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 1753: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1781: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1813: 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 1825: 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 1826: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1841: $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 1842: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 1844: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1847: 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 1860: 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 1874: 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 1875: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1885: 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 1896: 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 1912: 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 1923: 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 1929: 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 1945: 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 1946: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1955: 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 1968: 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 1978: 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 1989: 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 1995: 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 2042: 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 2044: 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 2046: 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 2050: 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 2051: 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 2077: 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 2078: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 2096: 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 2098: 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 2100: 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 2106: 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 2107: 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 2141: 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 2144: 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 2236: local batch_file=$(mktemp) ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_nexthops.sh line 2239: 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 2242: $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 2247: rm $batch_file ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$batch_file" In fib_nexthops.sh line 2260: 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 2261: (( $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 2264: return $ret ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ret" In fib_nexthops.sh line 2278: 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 2279: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 2490: v) VERBOSE=$(($VERBOSE + 1));; ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In fib_nexthops.sh line 2511: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 2517: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 2531: 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 2532: 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 2533: 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 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 533: 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 534: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 613: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 639: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 648: 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 654: 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 666: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 684: 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 692: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 701: 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 707: 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 725: 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 726: 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 811: 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 910: [ $? -ne 0 ] && return 1 ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 944: if [[ $? == 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 955: 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 967: 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 968: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1031: if [[ $? == 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1032: 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 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 1093: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1208: 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 1220: 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 1221: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1270: 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 1272: 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 1274: 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 1278: 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 1279: 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 1305: 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 1306: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1324: 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 1326: 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 1328: 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 1334: 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 1335: 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 1354: 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 1355: 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 1397: 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 1400: 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 1401: [ $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 1403: 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 1507: [ $? -ne 0 ] && return 1 ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 1538: 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 1539: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1598: 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 1710: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1739: 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 1753: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1781: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1813: 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 1825: 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 1826: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1841: $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 1842: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 1844: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1847: 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 1860: 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 1874: 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 1875: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1885: 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 1896: 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 1912: 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 1923: 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 1929: 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 1945: 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 1946: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1955: 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 1968: 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 1978: 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 1989: 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 1995: 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 2042: 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 2044: 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 2046: 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 2050: 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 2051: 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 2077: 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 2078: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 2096: 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 2098: 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 2100: 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 2106: 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 2107: 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 2141: 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 2144: 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 2236: local batch_file=$(mktemp) ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_nexthops.sh line 2239: 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 2242: $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 2247: rm $batch_file ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$batch_file" In fib_nexthops.sh line 2260: 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 2261: (( $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 2264: return $ret ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ret" In fib_nexthops.sh line 2278: 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 2279: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 2490: v) VERBOSE=$(($VERBOSE + 1));; ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In fib_nexthops.sh line 2511: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 2517: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 2531: 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 2532: 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 2533: 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...