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.0OPCNLYFv0 and /tmp/tmp.4DaYZ94IjF Tree base: 56408d30c863 ("ipv6: clear RA flags when adding a static route") Now at: 69767a63f4bf ("selftests: fib_tests: add fib6 from ra to static test") ====== Checking before the patch ====== Checking tools/testing/selftests/net/fib_tests.sh - 5cf2caf193ae0cd81b3c03740b5c0880a5f8fe5f1415d2463767ec3c2cb2bf69 In fib_tests.sh line 28: 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_tests.sh line 38: read a ^--^ SC2162 (info): read without -r will mangle backslashes. In fib_tests.sh line 46: read a ^--^ SC2162 (info): read without -r will mangle backslashes. In fib_tests.sh line 55: IP="$(which ip) -netns $ns1" ^--^ SC2154 (warning): ns1 is referenced but not assigned. In fib_tests.sh line 57: ip netns exec $ns1 sysctl -qw net.ipv4.ip_forward=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns1" sysctl -qw net.ipv4.ip_forward=1 In fib_tests.sh line 58: ip netns exec $ns1 sysctl -qw net.ipv6.conf.all.forwarding=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns1" sysctl -qw net.ipv6.conf.all.forwarding=1 In fib_tests.sh line 71: cleanup_ns $ns1 $ns2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2154 (warning): ns2 is referenced but not assigned. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: cleanup_ns "$ns1" "$ns2" In fib_tests.sh line 79: addr=$($IP -6 -br addr show dev ${dev} | \ ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: addr=$($IP -6 -br addr show dev "${dev}" | \ In fib_tests.sh line 91: echo $addr ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$addr" In fib_tests.sh line 211: oif $down_dev &> /dev/null ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: oif "$down_dev" &> /dev/null In fib_tests.sh line 214: oif $down_dev &> /dev/null ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: oif "$down_dev" &> /dev/null In fib_tests.sh line 218: oif $up_dev &> /dev/null ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: oif "$up_dev" &> /dev/null In fib_tests.sh line 221: oif $up_dev &> /dev/null ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: oif "$up_dev" &> /dev/null In fib_tests.sh line 225: grep $down_dev | grep -q "dead linkdown" ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: grep "$down_dev" | grep -q "dead linkdown" In fib_tests.sh line 228: grep $down_dev | grep -q "dead linkdown" ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: grep "$down_dev" | grep -q "dead linkdown" In fib_tests.sh line 232: grep $up_dev | grep -q "dead linkdown" ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: grep "$up_dev" | grep -q "dead linkdown" In fib_tests.sh line 235: grep $up_dev | grep -q "dead linkdown" ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: grep "$up_dev" | grep -q "dead linkdown" In fib_tests.sh line 449: $IP link set dev veth2 netns $ns2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP link set dev veth2 netns "$ns2" In fib_tests.sh line 451: ip -netns $ns2 address add 192.0.2.1/24 dev veth2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" address add 192.0.2.1/24 dev veth2 In fib_tests.sh line 453: ip -netns $ns2 link set dev veth2 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" link set dev veth2 up In fib_tests.sh line 457: ip -netns $ns2 link set dev lo address 52:54:00:6a:c7:5e ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" link set dev lo address 52:54:00:6a:c7:5e In fib_tests.sh line 458: ip -netns $ns2 link set dev veth2 address 52:54:00:6a:c7:5e ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" link set dev veth2 address 52:54:00:6a:c7:5e In fib_tests.sh line 461: ip netns exec $ns2 tc qdisc add dev lo parent root handle 1: fq_codel ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" tc qdisc add dev lo parent root handle 1: fq_codel In fib_tests.sh line 462: ip netns exec $ns2 tc filter add dev lo parent 1: protocol arp basic \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" tc filter add dev lo parent 1: protocol arp basic \ In fib_tests.sh line 464: ip netns exec $ns2 tc filter add dev lo parent 1: protocol ip basic \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" tc filter add dev lo parent 1: protocol ip basic \ In fib_tests.sh line 482: ip netns exec $ns2 tc qdisc add dev veth2 ingress ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" tc qdisc add dev veth2 ingress In fib_tests.sh line 483: ip netns exec $ns2 tc filter add dev veth2 ingress protocol arp basic \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" tc filter add dev veth2 ingress protocol arp basic \ In fib_tests.sh line 485: ip netns exec $ns2 tc filter add dev veth2 ingress protocol ip basic \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" tc filter add dev veth2 ingress protocol ip basic \ In fib_tests.sh line 491: ip netns exec $ns2 sysctl -qw net.ipv4.conf.all.rp_filter=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" sysctl -qw net.ipv4.conf.all.rp_filter=1 In fib_tests.sh line 492: ip netns exec $ns2 sysctl -qw net.ipv4.conf.all.accept_local=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" sysctl -qw net.ipv4.conf.all.accept_local=1 In fib_tests.sh line 493: ip netns exec $ns2 sysctl -qw net.ipv4.conf.all.route_localnet=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" sysctl -qw net.ipv4.conf.all.route_localnet=1 In fib_tests.sh line 525: printf "\n COMMAND: $cmd\n" ^---------------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_tests.sh line 528: out=$(eval $cmd 2>&1) ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$(eval "$cmd" 2>&1) In fib_tests.sh line 530: if [ "$VERBOSE" = "1" -a -n "$out" ]; then ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In fib_tests.sh line 533: log_test $rc $erc "$desc" ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test $rc "$erc" "$desc" In fib_tests.sh line 546: local lldummy=$(get_linklocal dummy0) ^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_tests.sh line 547: local llv1=$(get_linklocal dummy0) ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_tests.sh line 566: - 2001:db8:103::1/64 $llv1 "veth0" ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: - 2001:db8:103::1/64 "$llv1" "veth0" In fib_tests.sh line 570: - 2001:db8:104::1/64 $llv1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: - 2001:db8:104::1/64 "$llv1" In fib_tests.sh line 578: - 2001:db8:107::1/64 $lldummy "dummy0" ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: - 2001:db8:107::1/64 "$lldummy" "dummy0" In fib_tests.sh line 586: - 2001:db8:110::1/64 $llv1 "veth0" ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: - 2001:db8:110::1/64 "$llv1" "veth0" In fib_tests.sh line 683: err=`cat errors.txt |grep "Message too long"` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^--------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. Did you mean: err=$(cat errors.txt |grep "Message too long") In fib_tests.sh line 730: err=`cat errors.txt |grep "Message too long"` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^--------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. Did you mean: err=$(cat errors.txt |grep "Message too long") In fib_tests.sh line 761: if [ $num -ne $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 [ "$num" -ne "$expected" ]; then In fib_tests.sh line 774: if [ $num -ne $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 [ "$num" -ne "$expected" ]; then In fib_tests.sh line 806: $IP -6 route add 2001:20::$i \ ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -6 route add 2001:20::"$i" \ In fib_tests.sh line 811: check_rt_num 0 $($IP -6 route list |grep expires|wc -l) ^-- SC2046 (warning): Quote this to prevent word splitting. ^----------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 818: $IP -6 route add 2001:30::$i \ ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -6 route add 2001:30::"$i" \ In fib_tests.sh line 824: $IP -6 route add 2001:20::$i \ ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -6 route add 2001:20::"$i" \ In fib_tests.sh line 829: check_rt_num 0 $($IP -6 route list |grep expires|wc -l) ^-- SC2046 (warning): Quote this to prevent word splitting. ^----------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 836: $IP -6 route add 2001:20::$i \ ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -6 route add 2001:20::"$i" \ In fib_tests.sh line 842: $IP -6 route replace 2001:20::$i \ ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -6 route replace 2001:20::"$i" \ In fib_tests.sh line 847: check_rt_num 0 $($IP -6 route list |grep expires|wc -l) ^-- SC2046 (warning): Quote this to prevent word splitting. ^----------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 855: $IP -6 route add 2001:20::$i \ ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -6 route add 2001:20::"$i" \ In fib_tests.sh line 860: $IP -6 route replace 2001:20::$i \ ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -6 route replace 2001:20::"$i" \ In fib_tests.sh line 863: check_rt_num_clean 0 $($IP -6 route list |grep expires|wc -l) || return ^-- SC2046 (warning): Quote this to prevent word splitting. ^----------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 867: check_rt_num 5 $($IP -6 route list |grep -v expires|grep 2001:20::|wc -l) ^-- SC2046 (warning): Quote this to prevent word splitting. ^------------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 900: check_rt_num_clean 1 $($IP -6 route list|grep expires|wc -l) || return ^-- SC2046 (warning): Quote this to prevent word splitting. ^----------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 904: check_rt_num 0 $($IP -6 route list |grep expires|wc -l) ^-- SC2046 (warning): Quote this to prevent word splitting. ^----------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 942: printf " COMMAND: $cmd\n" ^-------------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_tests.sh line 946: out=$(eval $cmd $stderr) ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$(eval "$cmd" $stderr) In fib_tests.sh line 948: if [ "$VERBOSE" = "1" -a -n "$out" ]; then ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In fib_tests.sh line 954: return $rc ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$rc" In fib_tests.sh line 969: printf " ${expected}\n" ^-----------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_tests.sh line 976: 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_tests.sh line 981: printf " ${out}\n" ^----------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_tests.sh line 983: printf " ${expected}\n\n" ^-----------------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_tests.sh line 1005: [ $? -ne 0 ] && exit 1 ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 1007: out=$($IP -6 ro ls match ${pfx}) ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP -6 ro ls match "${pfx}") In fib_tests.sh line 1014: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 1033: set -- $expected ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: set -- "$expected" In fib_tests.sh line 1036: out=$($IP -6 ro ls match ${pfx} | sed -e 's/ pref medium//') ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP -6 ro ls match "${pfx}" | sed -e 's/ pref medium//') In fib_tests.sh line 1059: ip netns exec $ns2 sysctl -qw net.ipv4.ip_forward=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" sysctl -qw net.ipv4.ip_forward=1 In fib_tests.sh line 1060: ip netns exec $ns2 sysctl -qw net.ipv6.conf.all.forwarding=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" sysctl -qw net.ipv6.conf.all.forwarding=1 In fib_tests.sh line 1067: $IP li set veth2 netns $ns2 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP li set veth2 netns "$ns2" up In fib_tests.sh line 1068: $IP li set veth4 netns $ns2 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP li set veth4 netns "$ns2" up In fib_tests.sh line 1069: ip -netns $ns2 li add dummy1 type dummy ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" li add dummy1 type dummy In fib_tests.sh line 1070: ip -netns $ns2 li set dummy1 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" li set dummy1 up In fib_tests.sh line 1077: ip -netns $ns2 -6 addr add 2001:db8:101::2/64 dev veth2 nodad ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" -6 addr add 2001:db8:101::2/64 dev veth2 nodad In fib_tests.sh line 1078: ip -netns $ns2 -6 addr add 2001:db8:103::2/64 dev veth4 nodad ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" -6 addr add 2001:db8:103::2/64 dev veth4 nodad In fib_tests.sh line 1079: ip -netns $ns2 -6 addr add 2001:db8:104::1/64 dev dummy1 nodad ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" -6 addr add 2001:db8:104::1/64 dev dummy1 nodad In fib_tests.sh line 1081: ip -netns $ns2 addr add 172.16.101.2/24 dev veth2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" addr add 172.16.101.2/24 dev veth2 In fib_tests.sh line 1082: ip -netns $ns2 addr add 172.16.103.2/24 dev veth4 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" addr add 172.16.103.2/24 dev veth4 In fib_tests.sh line 1083: ip -netns $ns2 addr add 172.16.104.1/24 dev dummy1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" addr add 172.16.104.1/24 dev dummy1 In fib_tests.sh line 1090: cleanup_ns $ns3 ^--^ SC2154 (warning): ns3 is referenced but not assigned. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: cleanup_ns "$ns3" In fib_tests.sh line 1104: ip link add veth5 netns $ns3 type veth peer name veth6 netns $ns2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link add veth5 netns "$ns3" type veth peer name veth6 netns "$ns2" In fib_tests.sh line 1105: ip -netns $ns3 link set veth5 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns3" link set veth5 up In fib_tests.sh line 1106: ip -netns $ns2 link set veth6 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" link set veth6 up In fib_tests.sh line 1108: ip -netns $ns3 -4 addr add dev veth5 172.16.105.1/24 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns3" -4 addr add dev veth5 172.16.105.1/24 In fib_tests.sh line 1109: ip -netns $ns2 -4 addr add dev veth6 172.16.105.2/24 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" -4 addr add dev veth6 172.16.105.2/24 In fib_tests.sh line 1110: ip -netns $ns3 -4 route add 172.16.100.0/22 via 172.16.105.2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns3" -4 route add 172.16.100.0/22 via 172.16.105.2 In fib_tests.sh line 1112: ip -netns $ns3 -6 addr add dev veth5 2001:db8:105::1/64 nodad ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns3" -6 addr add dev veth5 2001:db8:105::1/64 nodad In fib_tests.sh line 1113: ip -netns $ns2 -6 addr add dev veth6 2001:db8:105::2/64 nodad ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" -6 addr add dev veth6 2001:db8:105::2/64 nodad In fib_tests.sh line 1114: ip -netns $ns3 -6 route add 2001:db8:101::/33 via 2001:db8:105::2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns3" -6 route add 2001:db8:101::/33 via 2001:db8:105::2 In fib_tests.sh line 1202: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_tests.sh line 1298: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 1453: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_tests.sh line 1494: [ $? -ne 0 ] && exit 1 ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 1496: out=$($IP ro ls match ${pfx}) ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP ro ls match "${pfx}") In fib_tests.sh line 1503: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 1521: set -- $expected ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: set -- "$expected" In fib_tests.sh line 1525: out=$($IP ro ls match ${pfx}) ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP ro ls match "${pfx}") In fib_tests.sh line 1650: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_tests.sh line 1729: run_cmd "ip link set veth-inside netns $test-ns" ^---^ SC2154 (warning): test is referenced but not assigned (for output from commands, use "$(test ...)" ). In fib_tests.sh line 2070: $IP li add dummy${i} up type dummy ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP li add dummy"${i}" up type dummy In fib_tests.sh line 2076: $IP li set dummy${i} vrf red ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP li set dummy"${i}" vrf red In fib_tests.sh line 2206: $IP li del dummy${i} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP li del dummy"${i}" In fib_tests.sh line 2289: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 2300: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 2321: local tmp_file=$(mktemp) ^------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_tests.sh line 2322: ip netns exec $ns2 socat UDP4-LISTEN:54321,fork $tmp_file & ^--^ 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 exec "$ns2" socat UDP4-LISTEN:54321,fork "$tmp_file" & In fib_tests.sh line 2353: [[ $(cat $tmp_file | wc -l) -eq 3 ]] ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [[ $(cat "$tmp_file" | wc -l) -eq 3 ]] In fib_tests.sh line 2361: rm $tmp_file ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$tmp_file" In fib_tests.sh line 2379: local tmp_file=$(mktemp) ^------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_tests.sh line 2380: ip netns exec $ns2 socat UDP6-LISTEN:54321,fork $tmp_file & ^--^ 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 exec "$ns2" socat UDP6-LISTEN:54321,fork "$tmp_file" & In fib_tests.sh line 2411: [[ $(cat $tmp_file | wc -l) -eq 3 ]] ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [[ $(cat "$tmp_file" | wc -l) -eq 3 ]] In fib_tests.sh line 2419: rm $tmp_file ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$tmp_file" In fib_tests.sh line 2427: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 2502: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 2508: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 2523: ip -n $ns -j -s link 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: ip -n "$ns" -j -s link show dev "$dev" \ In fib_tests.sh line 2524: | jq '.[]["stats64"]["'$dir'"]["'$stat'"]' ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: | jq '.[]["stats64"]["'"$dir"'"]["'"$stat"'"]' In fib_tests.sh line 2532: local count=$(tail -n 1 $file | jq '.["counter-value"] | tonumber | floor') ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local count=$(tail -n 1 "$file" | jq '.["counter-value"] | tonumber | floor') In fib_tests.sh line 2533: local ratio=$(echo "scale=2; $count / $expected" | bc -l) ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_tests.sh line 2534: local res=$(echo "$ratio >= 0.95" | bc) ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_tests.sh line 2565: local dmac=$(ip -n $ns2 -j link show dev veth2 | jq -r '.[]["address"]') ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local dmac=$(ip -n "$ns2" -j link show dev veth2 | jq -r '.[]["address"]') In fib_tests.sh line 2566: local tmp_file=$(mktemp) ^------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_tests.sh line 2574: local t0_rx_pkts=$(link_stats_get $ns2 veth2 rx packets) ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local t0_rx_pkts=$(link_stats_get "$ns2" veth2 rx packets) In fib_tests.sh line 2576: local t1_rx_pkts=$(link_stats_get $ns2 veth2 rx packets) ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local t1_rx_pkts=$(link_stats_get "$ns2" veth2 rx packets) In fib_tests.sh line 2577: local diff=$(echo $t1_rx_pkts - $t0_rx_pkts | bc -l) ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local diff=$(echo "$t1_rx_pkts" - "$t0_rx_pkts" | bc -l) In fib_tests.sh line 2578: list_rcv_eval $tmp_file $diff ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: list_rcv_eval "$tmp_file" "$diff" In fib_tests.sh line 2580: rm $tmp_file ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$tmp_file" In fib_tests.sh line 2610: local dmac=$(ip -n $ns2 -j link show dev veth2 | jq -r '.[]["address"]') ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local dmac=$(ip -n "$ns2" -j link show dev veth2 | jq -r '.[]["address"]') In fib_tests.sh line 2611: local tmp_file=$(mktemp) ^------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_tests.sh line 2619: local t0_rx_pkts=$(link_stats_get $ns2 veth2 rx packets) ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local t0_rx_pkts=$(link_stats_get "$ns2" veth2 rx packets) In fib_tests.sh line 2621: local t1_rx_pkts=$(link_stats_get $ns2 veth2 rx packets) ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local t1_rx_pkts=$(link_stats_get "$ns2" veth2 rx packets) In fib_tests.sh line 2622: local diff=$(echo $t1_rx_pkts - $t0_rx_pkts | bc -l) ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local diff=$(echo "$t1_rx_pkts" - "$t0_rx_pkts" | bc -l) In fib_tests.sh line 2623: list_rcv_eval $tmp_file $diff ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: list_rcv_eval "$tmp_file" "$diff" In fib_tests.sh line 2625: rm $tmp_file ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$tmp_file" In fib_tests.sh line 2630: tc_set_flower_counter $1 $2 $3 "src_ip $4 ip_proto tcp tcp_flags 0x2" ^-- 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: tc_set_flower_counter "$1" "$2" "$3" "src_ip $4 ip_proto tcp tcp_flags 0x2" In fib_tests.sh line 2652: ip netns exec $ns3 socat $ipver TCP-LISTEN:8000 STDIO >/dev/null & ^--^ 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 exec "$ns3" socat "$ipver" TCP-LISTEN:8000 STDIO >/dev/null & In fib_tests.sh line 2654: echo -n a | ip netns exec $ns1 socat $ipver STDIO TCP:$daddr:8000 ^--^ 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: echo -n a | ip netns exec "$ns1" socat "$ipver" STDIO TCP:"$daddr":8000 In fib_tests.sh line 2657: local -r syn0="$(tc_get_flower_counter $ns1 veth1)" ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local -r syn0="$(tc_get_flower_counter "$ns1" veth1)" In fib_tests.sh line 2658: local -r syn1="$(tc_get_flower_counter $ns1 veth3)" ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local -r syn1="$(tc_get_flower_counter "$ns1" veth3)" In fib_tests.sh line 2678: ip netns exec $ns1 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns1" \ In fib_tests.sh line 2681: tc_set_flower_counter__saddr_syn $ns1 4 veth1 172.16.101.1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc_set_flower_counter__saddr_syn "$ns1" 4 veth1 172.16.101.1 In fib_tests.sh line 2682: tc_set_flower_counter__saddr_syn $ns1 4 veth3 172.16.103.1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc_set_flower_counter__saddr_syn "$ns1" 4 veth3 172.16.103.1 In fib_tests.sh line 2703: ip netns exec $ns1 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns1" \ In fib_tests.sh line 2706: tc_set_flower_counter__saddr_syn $ns1 6 veth1 2001:db8:101::1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc_set_flower_counter__saddr_syn "$ns1" 6 veth1 2001:db8:101::1 In fib_tests.sh line 2707: tc_set_flower_counter__saddr_syn $ns1 6 veth3 2001:db8:103::1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc_set_flower_counter__saddr_syn "$ns1" 6 veth3 2001:db8:103::1 In fib_tests.sh line 2743: v) VERBOSE=$(($VERBOSE + 1));; ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In fib_tests.sh line 2749: PEER_CMD="ip netns exec ${PEER_NS}" ^------^ SC2034 (warning): PEER_CMD appears unused. Verify use (or export if used externally). In fib_tests.sh line 2765: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 2807: 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_tests.sh line 2808: printf "Tests failed: %3d\n" ${nfail} ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: printf "Tests failed: %3d\n" "${nfail}" For more information: https://www.shellcheck.net/wiki/SC2034 -- PEER_CMD appears unused. Verify u... https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2154 -- ns1 is referenced but not assigned. ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/fib_tests.sh - 5cf2caf193ae0cd81b3c03740b5c0880a5f8fe5f1415d2463767ec3c2cb2bf69 In fib_tests.sh line 29: 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_tests.sh line 39: read a ^--^ SC2162 (info): read without -r will mangle backslashes. In fib_tests.sh line 47: read a ^--^ SC2162 (info): read without -r will mangle backslashes. In fib_tests.sh line 56: IP="$(which ip) -netns $ns1" ^--^ SC2154 (warning): ns1 is referenced but not assigned. In fib_tests.sh line 58: ip netns exec $ns1 sysctl -qw net.ipv4.ip_forward=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns1" sysctl -qw net.ipv4.ip_forward=1 In fib_tests.sh line 59: ip netns exec $ns1 sysctl -qw net.ipv6.conf.all.forwarding=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns1" sysctl -qw net.ipv6.conf.all.forwarding=1 In fib_tests.sh line 72: cleanup_ns $ns1 $ns2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2154 (warning): ns2 is referenced but not assigned. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: cleanup_ns "$ns1" "$ns2" In fib_tests.sh line 80: addr=$($IP -6 -br addr show dev ${dev} | \ ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: addr=$($IP -6 -br addr show dev "${dev}" | \ In fib_tests.sh line 92: echo $addr ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$addr" In fib_tests.sh line 212: oif $down_dev &> /dev/null ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: oif "$down_dev" &> /dev/null In fib_tests.sh line 215: oif $down_dev &> /dev/null ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: oif "$down_dev" &> /dev/null In fib_tests.sh line 219: oif $up_dev &> /dev/null ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: oif "$up_dev" &> /dev/null In fib_tests.sh line 222: oif $up_dev &> /dev/null ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: oif "$up_dev" &> /dev/null In fib_tests.sh line 226: grep $down_dev | grep -q "dead linkdown" ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: grep "$down_dev" | grep -q "dead linkdown" In fib_tests.sh line 229: grep $down_dev | grep -q "dead linkdown" ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: grep "$down_dev" | grep -q "dead linkdown" In fib_tests.sh line 233: grep $up_dev | grep -q "dead linkdown" ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: grep "$up_dev" | grep -q "dead linkdown" In fib_tests.sh line 236: grep $up_dev | grep -q "dead linkdown" ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: grep "$up_dev" | grep -q "dead linkdown" In fib_tests.sh line 450: $IP link set dev veth2 netns $ns2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP link set dev veth2 netns "$ns2" In fib_tests.sh line 452: ip -netns $ns2 address add 192.0.2.1/24 dev veth2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" address add 192.0.2.1/24 dev veth2 In fib_tests.sh line 454: ip -netns $ns2 link set dev veth2 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" link set dev veth2 up In fib_tests.sh line 458: ip -netns $ns2 link set dev lo address 52:54:00:6a:c7:5e ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" link set dev lo address 52:54:00:6a:c7:5e In fib_tests.sh line 459: ip -netns $ns2 link set dev veth2 address 52:54:00:6a:c7:5e ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" link set dev veth2 address 52:54:00:6a:c7:5e In fib_tests.sh line 462: ip netns exec $ns2 tc qdisc add dev lo parent root handle 1: fq_codel ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" tc qdisc add dev lo parent root handle 1: fq_codel In fib_tests.sh line 463: ip netns exec $ns2 tc filter add dev lo parent 1: protocol arp basic \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" tc filter add dev lo parent 1: protocol arp basic \ In fib_tests.sh line 465: ip netns exec $ns2 tc filter add dev lo parent 1: protocol ip basic \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" tc filter add dev lo parent 1: protocol ip basic \ In fib_tests.sh line 483: ip netns exec $ns2 tc qdisc add dev veth2 ingress ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" tc qdisc add dev veth2 ingress In fib_tests.sh line 484: ip netns exec $ns2 tc filter add dev veth2 ingress protocol arp basic \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" tc filter add dev veth2 ingress protocol arp basic \ In fib_tests.sh line 486: ip netns exec $ns2 tc filter add dev veth2 ingress protocol ip basic \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" tc filter add dev veth2 ingress protocol ip basic \ In fib_tests.sh line 492: ip netns exec $ns2 sysctl -qw net.ipv4.conf.all.rp_filter=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" sysctl -qw net.ipv4.conf.all.rp_filter=1 In fib_tests.sh line 493: ip netns exec $ns2 sysctl -qw net.ipv4.conf.all.accept_local=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" sysctl -qw net.ipv4.conf.all.accept_local=1 In fib_tests.sh line 494: ip netns exec $ns2 sysctl -qw net.ipv4.conf.all.route_localnet=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" sysctl -qw net.ipv4.conf.all.route_localnet=1 In fib_tests.sh line 526: printf "\n COMMAND: $cmd\n" ^---------------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_tests.sh line 529: out=$(eval $cmd 2>&1) ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$(eval "$cmd" 2>&1) In fib_tests.sh line 531: if [ "$VERBOSE" = "1" -a -n "$out" ]; then ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In fib_tests.sh line 534: log_test $rc $erc "$desc" ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: log_test $rc "$erc" "$desc" In fib_tests.sh line 547: local lldummy=$(get_linklocal dummy0) ^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_tests.sh line 548: local llv1=$(get_linklocal dummy0) ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_tests.sh line 567: - 2001:db8:103::1/64 $llv1 "veth0" ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: - 2001:db8:103::1/64 "$llv1" "veth0" In fib_tests.sh line 571: - 2001:db8:104::1/64 $llv1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: - 2001:db8:104::1/64 "$llv1" In fib_tests.sh line 579: - 2001:db8:107::1/64 $lldummy "dummy0" ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: - 2001:db8:107::1/64 "$lldummy" "dummy0" In fib_tests.sh line 587: - 2001:db8:110::1/64 $llv1 "veth0" ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: - 2001:db8:110::1/64 "$llv1" "veth0" In fib_tests.sh line 684: err=`cat errors.txt |grep "Message too long"` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^--------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. Did you mean: err=$(cat errors.txt |grep "Message too long") In fib_tests.sh line 731: err=`cat errors.txt |grep "Message too long"` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^--------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. Did you mean: err=$(cat errors.txt |grep "Message too long") In fib_tests.sh line 762: if [ $num -ne $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 [ "$num" -ne "$expected" ]; then In fib_tests.sh line 775: if [ $num -ne $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 [ "$num" -ne "$expected" ]; then In fib_tests.sh line 807: $IP -6 route add 2001:20::$i \ ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -6 route add 2001:20::"$i" \ In fib_tests.sh line 812: check_rt_num 0 $($IP -6 route list |grep expires|wc -l) ^-- SC2046 (warning): Quote this to prevent word splitting. ^----------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 819: $IP -6 route add 2001:30::$i \ ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -6 route add 2001:30::"$i" \ In fib_tests.sh line 825: $IP -6 route add 2001:20::$i \ ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -6 route add 2001:20::"$i" \ In fib_tests.sh line 830: check_rt_num 0 $($IP -6 route list |grep expires|wc -l) ^-- SC2046 (warning): Quote this to prevent word splitting. ^----------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 837: $IP -6 route add 2001:20::$i \ ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -6 route add 2001:20::"$i" \ In fib_tests.sh line 843: $IP -6 route replace 2001:20::$i \ ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -6 route replace 2001:20::"$i" \ In fib_tests.sh line 848: check_rt_num 0 $($IP -6 route list |grep expires|wc -l) ^-- SC2046 (warning): Quote this to prevent word splitting. ^----------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 856: $IP -6 route add 2001:20::$i \ ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -6 route add 2001:20::"$i" \ In fib_tests.sh line 861: $IP -6 route replace 2001:20::$i \ ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -6 route replace 2001:20::"$i" \ In fib_tests.sh line 864: check_rt_num_clean 0 $($IP -6 route list |grep expires|wc -l) || return ^-- SC2046 (warning): Quote this to prevent word splitting. ^----------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 868: check_rt_num 5 $($IP -6 route list |grep -v expires|grep 2001:20::|wc -l) ^-- SC2046 (warning): Quote this to prevent word splitting. ^------------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 901: check_rt_num_clean 1 $($IP -6 route list|grep expires|wc -l) || return ^-- SC2046 (warning): Quote this to prevent word splitting. ^----------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 905: check_rt_num 0 $($IP -6 route list |grep expires|wc -l) ^-- SC2046 (warning): Quote this to prevent word splitting. ^----------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 943: printf " COMMAND: $cmd\n" ^-------------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_tests.sh line 947: out=$(eval $cmd $stderr) ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$(eval "$cmd" $stderr) In fib_tests.sh line 949: if [ "$VERBOSE" = "1" -a -n "$out" ]; then ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In fib_tests.sh line 955: return $rc ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$rc" In fib_tests.sh line 970: printf " ${expected}\n" ^-----------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_tests.sh line 977: 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_tests.sh line 982: printf " ${out}\n" ^----------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_tests.sh line 984: printf " ${expected}\n\n" ^-----------------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In fib_tests.sh line 1006: [ $? -ne 0 ] && exit 1 ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 1008: out=$($IP -6 ro ls match ${pfx}) ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP -6 ro ls match "${pfx}") In fib_tests.sh line 1015: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 1034: set -- $expected ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: set -- "$expected" In fib_tests.sh line 1037: out=$($IP -6 ro ls match ${pfx} | sed -e 's/ pref medium//') ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP -6 ro ls match "${pfx}" | sed -e 's/ pref medium//') In fib_tests.sh line 1060: ip netns exec $ns2 sysctl -qw net.ipv4.ip_forward=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" sysctl -qw net.ipv4.ip_forward=1 In fib_tests.sh line 1061: ip netns exec $ns2 sysctl -qw net.ipv6.conf.all.forwarding=1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns2" sysctl -qw net.ipv6.conf.all.forwarding=1 In fib_tests.sh line 1068: $IP li set veth2 netns $ns2 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP li set veth2 netns "$ns2" up In fib_tests.sh line 1069: $IP li set veth4 netns $ns2 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP li set veth4 netns "$ns2" up In fib_tests.sh line 1070: ip -netns $ns2 li add dummy1 type dummy ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" li add dummy1 type dummy In fib_tests.sh line 1071: ip -netns $ns2 li set dummy1 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" li set dummy1 up In fib_tests.sh line 1078: ip -netns $ns2 -6 addr add 2001:db8:101::2/64 dev veth2 nodad ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" -6 addr add 2001:db8:101::2/64 dev veth2 nodad In fib_tests.sh line 1079: ip -netns $ns2 -6 addr add 2001:db8:103::2/64 dev veth4 nodad ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" -6 addr add 2001:db8:103::2/64 dev veth4 nodad In fib_tests.sh line 1080: ip -netns $ns2 -6 addr add 2001:db8:104::1/64 dev dummy1 nodad ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" -6 addr add 2001:db8:104::1/64 dev dummy1 nodad In fib_tests.sh line 1082: ip -netns $ns2 addr add 172.16.101.2/24 dev veth2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" addr add 172.16.101.2/24 dev veth2 In fib_tests.sh line 1083: ip -netns $ns2 addr add 172.16.103.2/24 dev veth4 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" addr add 172.16.103.2/24 dev veth4 In fib_tests.sh line 1084: ip -netns $ns2 addr add 172.16.104.1/24 dev dummy1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" addr add 172.16.104.1/24 dev dummy1 In fib_tests.sh line 1091: cleanup_ns $ns3 ^--^ SC2154 (warning): ns3 is referenced but not assigned. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: cleanup_ns "$ns3" In fib_tests.sh line 1105: ip link add veth5 netns $ns3 type veth peer name veth6 netns $ns2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link add veth5 netns "$ns3" type veth peer name veth6 netns "$ns2" In fib_tests.sh line 1106: ip -netns $ns3 link set veth5 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns3" link set veth5 up In fib_tests.sh line 1107: ip -netns $ns2 link set veth6 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" link set veth6 up In fib_tests.sh line 1109: ip -netns $ns3 -4 addr add dev veth5 172.16.105.1/24 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns3" -4 addr add dev veth5 172.16.105.1/24 In fib_tests.sh line 1110: ip -netns $ns2 -4 addr add dev veth6 172.16.105.2/24 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" -4 addr add dev veth6 172.16.105.2/24 In fib_tests.sh line 1111: ip -netns $ns3 -4 route add 172.16.100.0/22 via 172.16.105.2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns3" -4 route add 172.16.100.0/22 via 172.16.105.2 In fib_tests.sh line 1113: ip -netns $ns3 -6 addr add dev veth5 2001:db8:105::1/64 nodad ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns3" -6 addr add dev veth5 2001:db8:105::1/64 nodad In fib_tests.sh line 1114: ip -netns $ns2 -6 addr add dev veth6 2001:db8:105::2/64 nodad ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns2" -6 addr add dev veth6 2001:db8:105::2/64 nodad In fib_tests.sh line 1115: ip -netns $ns3 -6 route add 2001:db8:101::/33 via 2001:db8:105::2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns3" -6 route add 2001:db8:101::/33 via 2001:db8:105::2 In fib_tests.sh line 1203: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_tests.sh line 1299: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 1454: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_tests.sh line 1515: check_rt_num_clean 2 $($IP -6 route list|grep expires|wc -l) || return ^-- SC2046 (warning): Quote this to prevent word splitting. ^----------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 1521: check_rt_num 1 $($IP -6 route list |grep expires|wc -l) ^-- SC2046 (warning): Quote this to prevent word splitting. ^----------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 1528: check_rt_num 1 $($IP -6 route list |grep expires|wc -l) ^-- SC2046 (warning): Quote this to prevent word splitting. ^----------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 1533: check_rt_num 2 $($IP -6 route list |grep expires|wc -l) ^-- SC2046 (warning): Quote this to prevent word splitting. ^----------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In fib_tests.sh line 1557: [ $? -ne 0 ] && exit 1 ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 1559: out=$($IP ro ls match ${pfx}) ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP ro ls match "${pfx}") In fib_tests.sh line 1566: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 1584: set -- $expected ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: set -- "$expected" In fib_tests.sh line 1588: out=$($IP ro ls match ${pfx}) ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP ro ls match "${pfx}") In fib_tests.sh line 1713: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In fib_tests.sh line 1792: run_cmd "ip link set veth-inside netns $test-ns" ^---^ SC2154 (warning): test is referenced but not assigned (for output from commands, use "$(test ...)" ). In fib_tests.sh line 2133: $IP li add dummy${i} up type dummy ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP li add dummy"${i}" up type dummy In fib_tests.sh line 2139: $IP li set dummy${i} vrf red ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP li set dummy"${i}" vrf red In fib_tests.sh line 2269: $IP li del dummy${i} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP li del dummy"${i}" In fib_tests.sh line 2352: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 2363: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 2384: local tmp_file=$(mktemp) ^------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_tests.sh line 2385: ip netns exec $ns2 socat UDP4-LISTEN:54321,fork $tmp_file & ^--^ 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 exec "$ns2" socat UDP4-LISTEN:54321,fork "$tmp_file" & In fib_tests.sh line 2416: [[ $(cat $tmp_file | wc -l) -eq 3 ]] ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [[ $(cat "$tmp_file" | wc -l) -eq 3 ]] In fib_tests.sh line 2424: rm $tmp_file ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$tmp_file" In fib_tests.sh line 2442: local tmp_file=$(mktemp) ^------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_tests.sh line 2443: ip netns exec $ns2 socat UDP6-LISTEN:54321,fork $tmp_file & ^--^ 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 exec "$ns2" socat UDP6-LISTEN:54321,fork "$tmp_file" & In fib_tests.sh line 2474: [[ $(cat $tmp_file | wc -l) -eq 3 ]] ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [[ $(cat "$tmp_file" | wc -l) -eq 3 ]] In fib_tests.sh line 2482: rm $tmp_file ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$tmp_file" In fib_tests.sh line 2490: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 2565: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 2571: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 2586: ip -n $ns -j -s link 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: ip -n "$ns" -j -s link show dev "$dev" \ In fib_tests.sh line 2587: | jq '.[]["stats64"]["'$dir'"]["'$stat'"]' ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: | jq '.[]["stats64"]["'"$dir"'"]["'"$stat"'"]' In fib_tests.sh line 2595: local count=$(tail -n 1 $file | jq '.["counter-value"] | tonumber | floor') ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local count=$(tail -n 1 "$file" | jq '.["counter-value"] | tonumber | floor') In fib_tests.sh line 2596: local ratio=$(echo "scale=2; $count / $expected" | bc -l) ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_tests.sh line 2597: local res=$(echo "$ratio >= 0.95" | bc) ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_tests.sh line 2628: local dmac=$(ip -n $ns2 -j link show dev veth2 | jq -r '.[]["address"]') ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local dmac=$(ip -n "$ns2" -j link show dev veth2 | jq -r '.[]["address"]') In fib_tests.sh line 2629: local tmp_file=$(mktemp) ^------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_tests.sh line 2637: local t0_rx_pkts=$(link_stats_get $ns2 veth2 rx packets) ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local t0_rx_pkts=$(link_stats_get "$ns2" veth2 rx packets) In fib_tests.sh line 2639: local t1_rx_pkts=$(link_stats_get $ns2 veth2 rx packets) ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local t1_rx_pkts=$(link_stats_get "$ns2" veth2 rx packets) In fib_tests.sh line 2640: local diff=$(echo $t1_rx_pkts - $t0_rx_pkts | bc -l) ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local diff=$(echo "$t1_rx_pkts" - "$t0_rx_pkts" | bc -l) In fib_tests.sh line 2641: list_rcv_eval $tmp_file $diff ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: list_rcv_eval "$tmp_file" "$diff" In fib_tests.sh line 2643: rm $tmp_file ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$tmp_file" In fib_tests.sh line 2673: local dmac=$(ip -n $ns2 -j link show dev veth2 | jq -r '.[]["address"]') ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local dmac=$(ip -n "$ns2" -j link show dev veth2 | jq -r '.[]["address"]') In fib_tests.sh line 2674: local tmp_file=$(mktemp) ^------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In fib_tests.sh line 2682: local t0_rx_pkts=$(link_stats_get $ns2 veth2 rx packets) ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local t0_rx_pkts=$(link_stats_get "$ns2" veth2 rx packets) In fib_tests.sh line 2684: local t1_rx_pkts=$(link_stats_get $ns2 veth2 rx packets) ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local t1_rx_pkts=$(link_stats_get "$ns2" veth2 rx packets) In fib_tests.sh line 2685: local diff=$(echo $t1_rx_pkts - $t0_rx_pkts | bc -l) ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local diff=$(echo "$t1_rx_pkts" - "$t0_rx_pkts" | bc -l) In fib_tests.sh line 2686: list_rcv_eval $tmp_file $diff ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: list_rcv_eval "$tmp_file" "$diff" In fib_tests.sh line 2688: rm $tmp_file ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$tmp_file" In fib_tests.sh line 2693: tc_set_flower_counter $1 $2 $3 "src_ip $4 ip_proto tcp tcp_flags 0x2" ^-- 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: tc_set_flower_counter "$1" "$2" "$3" "src_ip $4 ip_proto tcp tcp_flags 0x2" In fib_tests.sh line 2715: ip netns exec $ns3 socat $ipver TCP-LISTEN:8000 STDIO >/dev/null & ^--^ 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 exec "$ns3" socat "$ipver" TCP-LISTEN:8000 STDIO >/dev/null & In fib_tests.sh line 2717: echo -n a | ip netns exec $ns1 socat $ipver STDIO TCP:$daddr:8000 ^--^ 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: echo -n a | ip netns exec "$ns1" socat "$ipver" STDIO TCP:"$daddr":8000 In fib_tests.sh line 2720: local -r syn0="$(tc_get_flower_counter $ns1 veth1)" ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local -r syn0="$(tc_get_flower_counter "$ns1" veth1)" In fib_tests.sh line 2721: local -r syn1="$(tc_get_flower_counter $ns1 veth3)" ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local -r syn1="$(tc_get_flower_counter "$ns1" veth3)" In fib_tests.sh line 2741: ip netns exec $ns1 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns1" \ In fib_tests.sh line 2744: tc_set_flower_counter__saddr_syn $ns1 4 veth1 172.16.101.1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc_set_flower_counter__saddr_syn "$ns1" 4 veth1 172.16.101.1 In fib_tests.sh line 2745: tc_set_flower_counter__saddr_syn $ns1 4 veth3 172.16.103.1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc_set_flower_counter__saddr_syn "$ns1" 4 veth3 172.16.103.1 In fib_tests.sh line 2766: ip netns exec $ns1 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns1" \ In fib_tests.sh line 2769: tc_set_flower_counter__saddr_syn $ns1 6 veth1 2001:db8:101::1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc_set_flower_counter__saddr_syn "$ns1" 6 veth1 2001:db8:101::1 In fib_tests.sh line 2770: tc_set_flower_counter__saddr_syn $ns1 6 veth3 2001:db8:103::1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc_set_flower_counter__saddr_syn "$ns1" 6 veth3 2001:db8:103::1 In fib_tests.sh line 2806: v) VERBOSE=$(($VERBOSE + 1));; ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In fib_tests.sh line 2812: PEER_CMD="ip netns exec ${PEER_NS}" ^------^ SC2034 (warning): PEER_CMD appears unused. Verify use (or export if used externally). In fib_tests.sh line 2828: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In fib_tests.sh line 2871: 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_tests.sh line 2872: printf "Tests failed: %3d\n" ${nfail} ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: printf "Tests failed: %3d\n" "${nfail}" For more information: https://www.shellcheck.net/wiki/SC2034 -- PEER_CMD appears unused. Verify u... https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2154 -- ns1 is referenced but not assigned.