====== Checking before the patch ====== ====== Checking the tree with the patch ====== tools/testing/selftests/net/test_vxlan_localbind.sh is a new file, but not shellcheck compliant New errors added --- /tmp/tmp.zPo4eBxudP 2025-08-12 14:09:45.440622347 -0700 +++ /tmp/tmp.ZkhnxwzS8K 2025-08-12 14:09:46.184618249 -0700 @@ -0,0 +1,313 @@ + +In test_vxlan_localbind.sh line 64: +which ping6 > /dev/null 2>&1 && ping6=$(which ping6) || ping6=$(which ping) + ^---^ SC2034 (warning): ping6 appears unused. Verify use (or export if used externally). + + +In test_vxlan_localbind.sh line 72: + 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 test_vxlan_localbind.sh line 86: + read a + ^--^ SC2162 (info): read without -r will mangle backslashes. + + +In test_vxlan_localbind.sh line 94: + read a + ^--^ SC2162 (info): read without -r will mangle backslashes. + + +In test_vxlan_localbind.sh line 108: + printf "COMMAND: $cmd\n" + ^---------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". + + +In test_vxlan_localbind.sh line 112: + 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 test_vxlan_localbind.sh line 114: + if [ "$VERBOSE" = "1" -a -n "$out" ]; then + ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. + + +In test_vxlan_localbind.sh line 118: + return $rc + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$rc" + + +In test_vxlan_localbind.sh line 122: + slowwait 5 ip netns exec $hv_1 ping -c 1 -W 1 172.16.1.2 &>/dev/null + ^---^ SC2154 (warning): hv_1 is referenced but not assigned. + ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + slowwait 5 ip netns exec "$hv_1" ping -c 1 -W 1 172.16.1.2 &>/dev/null + + +In test_vxlan_localbind.sh line 123: + slowwait 5 ip netns exec $hv_1 ping -c 1 -W 1 172.16.2.2 &>/dev/null + ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + slowwait 5 ip netns exec "$hv_1" ping -c 1 -W 1 172.16.2.2 &>/dev/null + + +In test_vxlan_localbind.sh line 129: + if [ $2 -eq 1 ]; then + ^-- SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + if [ "$2" -eq 1 ]; then + + +In test_vxlan_localbind.sh line 135: + slowwait 5 run_cmd "${prefix}ip netns exec $vm_1 ping -c 1 -W 1 10.0.0.2" + ^---^ SC2154 (warning): vm_1 is referenced but not assigned. + + +In test_vxlan_localbind.sh line 148: + [ $id -eq 1 ] && peer=2 || peer=1 + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + [ "$id" -eq 1 ] && peer=2 || peer=1 + + +In test_vxlan_localbind.sh line 150: + ip link set veth-hv-$id netns ${hv[$id]} + ^-^ 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 set veth-hv-"$id" netns "${hv[$id]}" + + +In test_vxlan_localbind.sh line 151: + ip -netns ${hv[$id]} link set veth-hv-$id name veth0 + ^--------^ 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 "${hv[$id]}" link set veth-hv-"$id" name veth0 + + +In test_vxlan_localbind.sh line 152: + ip -netns ${hv[$id]} link set veth0 up + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -netns "${hv[$id]}" link set veth0 up + + +In test_vxlan_localbind.sh line 154: + ip -netns ${hv[$id]} addr add 172.16.1.$id/24 dev veth0 + ^--------^ 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 "${hv[$id]}" addr add 172.16.1."$id"/24 dev veth0 + + +In test_vxlan_localbind.sh line 155: + ip -netns ${hv[$id]} addr add 172.16.2.$id/24 dev veth0 + ^--------^ 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 "${hv[$id]}" addr add 172.16.2."$id"/24 dev veth0 + + +In test_vxlan_localbind.sh line 157: + ip -netns ${hv[$id]} link add br0 type bridge + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -netns "${hv[$id]}" link add br0 type bridge + + +In test_vxlan_localbind.sh line 158: + ip -netns ${hv[$id]} link set br0 up + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -netns "${hv[$id]}" link set br0 up + + +In test_vxlan_localbind.sh line 160: + ip -netns ${hv[$id]} link add vxlan0 type vxlan id 10 local 172.16.$local.$id remote 172.16.$remote.$peer $flags dev veth0 dstport 4789 + ^--------^ 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. + ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -netns "${hv[$id]}" link add vxlan0 type vxlan id 10 local 172.16."$local"."$id" remote 172.16."$remote"."$peer" "$flags" dev veth0 dstport 4789 + + +In test_vxlan_localbind.sh line 161: + ip -netns ${hv[$id]} link set vxlan0 master br0 + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -netns "${hv[$id]}" link set vxlan0 master br0 + + +In test_vxlan_localbind.sh line 162: + ip -netns ${hv[$id]} link set vxlan0 up + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -netns "${hv[$id]}" link set vxlan0 up + + +In test_vxlan_localbind.sh line 164: + bridge -netns ${hv[$id]} fdb append 00:00:00:00:00:00 dev vxlan0 dst 172.16.$remote.$peer self permanent + ^--------^ 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: + bridge -netns "${hv[$id]}" fdb append 00:00:00:00:00:00 dev vxlan0 dst 172.16."$remote"."$peer" self permanent + + +In test_vxlan_localbind.sh line 172: + ip link set veth-tap netns ${hv[$id]} + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip link set veth-tap netns "${hv[$id]}" + + +In test_vxlan_localbind.sh line 173: + ip -netns ${hv[$id]} link set veth-tap master br0 + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -netns "${hv[$id]}" link set veth-tap master br0 + + +In test_vxlan_localbind.sh line 174: + ip -netns ${hv[$id]} link set veth-tap up + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -netns "${hv[$id]}" link set veth-tap up + + +In test_vxlan_localbind.sh line 176: + ip link set veth-hv address 02:1d:8d:dd:0c:6$id + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip link set veth-hv address 02:1d:8d:dd:0c:6"$id" + + +In test_vxlan_localbind.sh line 178: + ip link set veth-hv netns ${vm[$id]} + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip link set veth-hv netns "${vm[$id]}" + + +In test_vxlan_localbind.sh line 179: + ip -netns ${vm[$id]} addr add 10.0.0.$id/24 dev veth-hv + ^--------^ 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 "${vm[$id]}" addr add 10.0.0."$id"/24 dev veth-hv + + +In test_vxlan_localbind.sh line 180: + ip -netns ${vm[$id]} link set veth-hv up + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -netns "${vm[$id]}" link set veth-hv up + + +In test_vxlan_localbind.sh line 187: + hv[2]=$hv_2 + ^---^ SC2154 (warning): hv_2 is referenced but not assigned. + + +In test_vxlan_localbind.sh line 189: + vm[2]=$vm_2 + ^---^ SC2154 (warning): vm_2 is referenced but not assigned. + + +In test_vxlan_localbind.sh line 193: + setup-hv-networking 1 1 2 $2 + ^-- SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + setup-hv-networking 1 1 2 "$2" + + +In test_vxlan_localbind.sh line 194: + setup-hv-networking 2 $1 1 $2 + ^-- SC2086 (info): Double quote to prevent globbing and word splitting. + ^-- SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + setup-hv-networking 2 "$1" 1 "$2" + + +In test_vxlan_localbind.sh line 203: + cleanup_ns $hv_1 $hv_2 $vm_1 $vm_2 + ^---^ 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: + cleanup_ns "$hv_1" "$hv_2" "$vm_1" "$vm_2" + + +In test_vxlan_localbind.sh line 263: + v) VERBOSE=$(($VERBOSE + 1));; + ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. + + +In test_vxlan_localbind.sh line 288: +if [ $? -ne 0 ]; then + ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. + + +In test_vxlan_localbind.sh line 301: + 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 test_vxlan_localbind.sh line 302: + 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 -- ping6 appears unused. Verify use ... + https://www.shellcheck.net/wiki/SC2154 -- hv_1 is referenced but not assign... + https://www.shellcheck.net/wiki/SC2166 -- Prefer [ p ] && [ q ] as [ p -a q...