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.egj3NIeFjl and /tmp/tmp.sRQcZadcfC Tree base: 949b039ae57c ("ipv4: Fix reference count leak when using error routes with nexthop objects") Now at: 72d55b02e636 ("selftests: fib_nexthops: Add test cases for error routes deletion") ====== 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 69: log_test() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 111: run_cmd() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 131: get_linklocal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 226: check_output() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 259: check_nexthop() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 270: check_nexthop_bucket() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 283: check_route() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 294: check_route6() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 305: check_large_grp() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 359: check_large_res_grp() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 378: get_route_dev() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 388: check_route_dev() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 399: start_ip_monitor() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 410: stop_ip_monitor() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 426: check_nexthop_fdb_support() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 435: check_nexthop_res_support() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 444: ipv6_fdb_grp_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 544: ipv4_fdb_grp_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 644: ipv4_mpath_select() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 697: ipv6_mpath_select() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 755: ipv6_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 805: ipv6_grp_refs() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 851: 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 865: ipv6_grp_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 950: [ $? -ne 0 ] && return 1 ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 984: if [[ $? == 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 995: 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 998: ipv6_res_grp_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1007: 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 1008: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1071: if [[ $? == 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1072: 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 1084: 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 1087: ipv6_fcnal_runtime() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1133: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1240: ipv6_large_grp() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1248: 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 1253: ipv6_large_res_grp() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1260: 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 1261: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1269: ipv6_del_add_loop1() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1277: ipv6_grp_replace_loop() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1284: ipv6_torture() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1310: 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 1312: 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 1314: 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 1318: 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 1319: 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 1325: ipv6_res_grp_replace_loop() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1332: ipv6_res_torture() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1345: 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 1346: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1364: 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 1366: 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 1368: 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 1374: 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 1375: 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 1381: ipv4_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1394: 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 1395: 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 1437: 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 1440: 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 1441: [ $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 1443: 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 1464: ipv4_grp_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1547: [ $? -ne 0 ] && return 1 ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 1569: ipv4_res_grp_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1578: 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 1579: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1633: ipv4_withv6_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1638: 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 1662: ipv4_fcnal_runtime() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1750: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1779: 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 1793: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1821: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1845: ipv4_large_grp() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1853: 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 1858: ipv4_large_res_grp() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1865: 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 1866: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1874: sysctl_nexthop_compat_mode_check() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1881: $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 1882: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 1884: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1887: 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 1892: sysctl_nexthop_compat_mode_set() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1900: 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 1905: ipv6_compat_mode() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1914: 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 1915: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1925: 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 1936: 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 1952: 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 1963: 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 1969: 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 1976: ipv4_compat_mode() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1985: 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 1986: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1995: 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 2008: 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 2018: 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 2029: 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 2035: 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 2041: ipv4_del_add_loop1() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2049: ipv4_grp_replace_loop() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2056: ipv4_torture() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2082: 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 2084: 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 2086: 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 2090: 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 2091: 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 2097: ipv4_res_grp_replace_loop() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2104: ipv4_res_torture() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2117: 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 2118: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 2136: 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 2138: 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 2140: 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 2146: 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 2147: 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 2153: basic() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2181: 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 2184: 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 2276: local batch_file=$(mktemp) ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_nexthops.sh line 2279: 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 2282: $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 2287: rm $batch_file ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$batch_file" In fib_nexthops.sh line 2290: check_nexthop_buckets_balance() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2300: 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 2301: (( $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 2304: return $ret ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ret" In fib_nexthops.sh line 2311: basic_res() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2318: 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 2319: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 2530: v) VERBOSE=$(($VERBOSE + 1));; ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In fib_nexthops.sh line 2551: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 2557: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 2571: 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 2572: 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 2573: 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 69: log_test() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 111: run_cmd() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 131: get_linklocal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 226: check_output() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 259: check_nexthop() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 270: check_nexthop_bucket() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 283: check_route() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 294: check_route6() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 305: check_large_grp() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 359: check_large_res_grp() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 378: get_route_dev() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 388: check_route_dev() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 399: start_ip_monitor() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 410: stop_ip_monitor() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 426: check_nexthop_fdb_support() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 435: check_nexthop_res_support() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 444: ipv6_fdb_grp_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 544: ipv4_fdb_grp_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 644: ipv4_mpath_select() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 697: ipv6_mpath_select() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 755: ipv6_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 813: ipv6_grp_refs() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 873: ipv6_grp_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 1006: ipv6_res_grp_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 1095: ipv6_fcnal_runtime() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). 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 1248: ipv6_large_grp() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1256: 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 1261: ipv6_large_res_grp() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1268: 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 1269: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1277: ipv6_del_add_loop1() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1285: ipv6_grp_replace_loop() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1292: ipv6_torture() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1318: 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 1320: 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 1322: 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 1326: 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 1327: 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 1333: ipv6_res_grp_replace_loop() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1340: ipv6_res_torture() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1353: 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 1354: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1372: 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 1374: 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 1376: 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 1382: 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 1383: 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 1389: ipv4_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1402: 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 1403: 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 1445: 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 1448: 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 1449: [ $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 1451: 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 1479: ipv4_grp_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1562: [ $? -ne 0 ] && return 1 ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 1584: ipv4_res_grp_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1593: 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 1594: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1648: ipv4_withv6_fcnal() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1653: 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 1677: ipv4_fcnal_runtime() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1765: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1794: 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 1808: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1836: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 1860: ipv4_large_grp() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1868: 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 1873: ipv4_large_res_grp() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1880: 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 1881: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1889: sysctl_nexthop_compat_mode_check() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1896: $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 1897: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 1899: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1902: 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 1907: sysctl_nexthop_compat_mode_set() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1915: 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 1920: ipv6_compat_mode() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 1929: 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 1930: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 1940: 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 1951: 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 1967: 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 1978: 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 1984: 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 1991: ipv4_compat_mode() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2000: 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 2001: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 2010: 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 2023: 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 2033: 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 2044: 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 2050: 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 2056: ipv4_del_add_loop1() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2064: ipv4_grp_replace_loop() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2071: ipv4_torture() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2097: 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 2099: 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 2101: 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 2105: 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 2106: 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 2112: ipv4_res_grp_replace_loop() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2119: ipv4_res_torture() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2132: 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 2133: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 2151: 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 2153: 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 2155: 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 2161: 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 2162: 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 2168: basic() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2196: 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 2199: 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 2291: local batch_file=$(mktemp) ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_nexthops.sh line 2294: 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 2297: $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 2302: rm $batch_file ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$batch_file" In fib_nexthops.sh line 2305: check_nexthop_buckets_balance() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2315: 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 2316: (( $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 2319: return $ret ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ret" In fib_nexthops.sh line 2326: basic_res() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In fib_nexthops.sh line 2333: 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 2334: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In fib_nexthops.sh line 2545: v) VERBOSE=$(($VERBOSE + 1));; ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In fib_nexthops.sh line 2566: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_nexthops.sh line 2572: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_nexthops.sh line 2586: 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 2587: 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 2588: 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...