====== Checking before the patch ====== ====== Checking the tree with the patch ====== tools/testing/selftests/drivers/net/bonding/bond_ipsec_offload.sh is a new file, but not shellcheck compliant New errors added --- /tmp/tmp.JO7ttOxeLn 2025-09-17 19:26:01.685969925 -0700 +++ /tmp/tmp.1tPMz2YGSM 2025-09-17 19:26:02.464963625 -0700 @@ -0,0 +1,265 @@ + +In bond_ipsec_offload.sh line 38: + local new_active_slave=$(ip -n ${ns} -d -j link show bond0 | \ + ^--------------^ 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 new_active_slave=$(ip -n "${ns}" -d -j link show bond0 | \ + + +In bond_ipsec_offload.sh line 40: + [ "$new_active_slave" != "$old_active_slave" -a "$new_active_slave" != "null" ] + ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. + + +In bond_ipsec_offload.sh line 46: + ip netns exec $ns ping -I bond0 -c 3 -W 1 -i 0 $dstip >/dev/null + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip netns exec "$ns" ping -I bond0 -c 3 -W 1 -i 0 $dstip >/dev/null + + +In bond_ipsec_offload.sh line 48: + active_slave=$(ip -n ${ns} -d -j link show bond0 | \ + ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + active_slave=$(ip -n "${ns}" -d -j link show bond0 | \ + + +In bond_ipsec_offload.sh line 51: + if [ $active_slave = $nic0 ]; 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 [ "$active_slave" = "$nic0" ]; then + + +In bond_ipsec_offload.sh line 53: + elif [ $active_slave = $nic1 ]; then + ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + elif [ "$active_slave" = "$nic1" ]; then + + +In bond_ipsec_offload.sh line 60: + grep -q "SA count=2 tx=3" $sysfs && grep -q "tx ipaddr=$dstip" $sysfs + ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + grep -q "SA count=2 tx=3" "$sysfs" && grep -q "tx ipaddr=$dstip" "$sysfs" + + +In bond_ipsec_offload.sh line 77: + if [ $? -ne 0 ]; then + ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. + + +In bond_ipsec_offload.sh line 85: + defer cleanup_ns $ns + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + defer cleanup_ns "$ns" + + +In bond_ipsec_offload.sh line 90: + ip -n $ns link add bond0 type bond mode active-backup miimon 100 + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -n "$ns" link add bond0 type bond mode active-backup miimon 100 + + +In bond_ipsec_offload.sh line 91: + ip -n $ns addr add $srcip/24 dev bond0 + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -n "$ns" addr add $srcip/24 dev bond0 + + +In bond_ipsec_offload.sh line 92: + ip -n $ns link set bond0 up + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -n "$ns" link set bond0 up + + +In bond_ipsec_offload.sh line 94: + ifaces=$(ip netns exec $ns bash -c ' + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^-- SC2016 (info): Expressions don't expand in single quotes, use double quotes for that. + +Did you mean: + ifaces=$(ip netns exec "$ns" bash -c ' + + +In bond_ipsec_offload.sh line 101: + nic0=$(echo $ifaces | cut -f1 -d ' ') + ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + nic0=$(echo "$ifaces" | cut -f1 -d ' ') + + +In bond_ipsec_offload.sh line 102: + nic1=$(echo $ifaces | cut -f2 -d ' ') + ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + nic1=$(echo "$ifaces" | cut -f2 -d ' ') + + +In bond_ipsec_offload.sh line 103: + ip -n $ns link set $nic0 master bond0 + ^-^ 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" link set "$nic0" master bond0 + + +In bond_ipsec_offload.sh line 104: + ip -n $ns link set $nic1 master bond0 + ^-^ 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" link set "$nic1" master bond0 + + +In bond_ipsec_offload.sh line 108: + ip -n $ns neigh add $dstip dev bond0 lladdr 00:11:22:33:44:55 + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -n "$ns" neigh add $dstip dev bond0 lladdr 00:11:22:33:44:55 + + +In bond_ipsec_offload.sh line 111: + ip -n $ns x p add dir out src $srcip/24 dst $dstip/24 \ + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -n "$ns" x p add dir out src $srcip/24 dst $dstip/24 \ + + +In bond_ipsec_offload.sh line 115: + ip -n $ns x p add dir in src $dstip/24 dst $srcip/24 \ + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -n "$ns" x p add dir in src $dstip/24 dst $srcip/24 \ + + +In bond_ipsec_offload.sh line 119: + ip -n $ns x s add proto esp src $srcip dst $dstip spi 9 \ + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -n "$ns" x s add proto esp src $srcip dst $dstip spi 9 \ + + +In bond_ipsec_offload.sh line 120: + mode transport reqid 42 $algo sel src $srcip/24 dst $dstip/24 \ + ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + mode transport reqid 42 "$algo" sel src $srcip/24 dst $dstip/24 \ + + +In bond_ipsec_offload.sh line 123: + ip -n $ns x s add proto esp src $dstip dst $srcip spi 9 \ + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -n "$ns" x s add proto esp src $dstip dst $srcip spi 9 \ + + +In bond_ipsec_offload.sh line 124: + mode transport reqid 42 $algo sel src $dstip/24 dst $srcip/24 \ + ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + mode transport reqid 42 "$algo" sel src $dstip/24 dst $srcip/24 \ + + +In bond_ipsec_offload.sh line 128: + lines=`ip -n $ns x s list | grep -c "crypto offload parameters: dev bond0 dir"` + ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + lines=$(ip -n "$ns" x s list | grep -c "crypto offload parameters: dev bond0 dir") + + +In bond_ipsec_offload.sh line 129: + if [ $lines -ne 2 ] ; then + ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + if [ "$lines" -ne 2 ] ; then + + +In bond_ipsec_offload.sh line 142: +ip -n $ns link set $active_slave down + ^-^ 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" link set "$active_slave" down + + +In bond_ipsec_offload.sh line 143: +slowwait 5 active_slave_changed $active_slave + ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: +slowwait 5 active_slave_changed "$active_slave" + + +In bond_ipsec_offload.sh line 147: +ip -n $ns x s flush + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: +ip -n "$ns" x s flush + + +In bond_ipsec_offload.sh line 148: +ip -n $ns x p flush + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: +ip -n "$ns" x p flush + + +In bond_ipsec_offload.sh line 151: +[ $line0 -ne 1 -o $line1 -ne 1 ] + ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^-- SC2166 (warning): Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. + ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: +[ "$line0" -ne 1 -o "$line1" -ne 1 ] + + +In bond_ipsec_offload.sh line 154: +exit $EXIT_STATUS + ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: +exit "$EXIT_STATUS" + +For more information: + https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... + https://www.shellcheck.net/wiki/SC2166 -- Prefer [ p ] && [ q ] as [ p -a q... + https://www.shellcheck.net/wiki/SC2016 -- Expressions don't expand in singl...