====== Checking before the patch ====== ====== Checking the tree with the patch ====== tools/testing/selftests/drivers/net/bonding/bond-arp-ip-target.sh is a new file, but not shellcheck compliant New errors added --- /tmp/tmp.0Ngn4n2TVD 2025-06-27 14:07:36.528491770 -0700 +++ /tmp/tmp.PQq4HstwaB 2025-06-27 14:07:38.250483728 -0700 @@ -0,0 +1,251 @@ + +In bond-arp-ip-target.sh line 44: +source ${lib_dir}/bond_topo_2d1c.sh + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: +source "${lib_dir}"/bond_topo_2d1c.sh + + +In bond-arp-ip-target.sh line 47: +test ${DEBUG} -ne 0 && set -x + ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: +test "${DEBUG}" -ne 0 && set -x + + +In bond-arp-ip-target.sh line 50: +s_ip4v10="192.10.2.1" +^------^ SC2034 (warning): s_ip4v10 appears unused. Verify use (or export if used externally). + + +In bond-arp-ip-target.sh line 51: +s_ip4v20="192.20.2.1" +^------^ SC2034 (warning): s_ip4v20 appears unused. Verify use (or export if used externally). + + +In bond-arp-ip-target.sh line 52: +s_ip4v30="192.30.2.1" +^------^ SC2034 (warning): s_ip4v30 appears unused. Verify use (or export if used externally). + + +In bond-arp-ip-target.sh line 55: +c_ip4v30="192.30.2.10" +^------^ SC2034 (warning): c_ip4v30 appears unused. Verify use (or export if used externally). + + +In bond-arp-ip-target.sh line 57: +ALL_TESTS=" +^-------^ SC2034 (warning): ALL_TESTS appears unused. Verify use (or export if used externally). + + +In bond-arp-ip-target.sh line 67: + if [ $? == 0 ]; then + ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. + + +In bond-arp-ip-target.sh line 70: + modprobe bonding ${bond_options} + ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + modprobe bonding "${bond_options}" + + +In bond-arp-ip-target.sh line 82: + ip -n ${ns} link show ${interface} > /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 -n "${ns}" link show "${interface}" > /dev/null + + +In bond-arp-ip-target.sh line 83: + if [[ $? -ne 0 ]] && RET=1; then + ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. + + +In bond-arp-ip-target.sh line 88: + if [ $ns == ${s_ns} ]; then host=1; else host=10;fi + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + if [ "$ns" == "${s_ns}" ]; then host=1; else host=10;fi + + +In bond-arp-ip-target.sh line 91: + ip -n ${ns} link add link $last name $last.$tag type vlan id $tag + ^---^ 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 -n "${ns}" link add link "$last" name "$last"."$tag" type vlan id "$tag" + + +In bond-arp-ip-target.sh line 92: + ip -n ${ns} address add 192.$tag.2.$host/24 dev $last.$tag + ^---^ 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 -n "${ns}" address add 192."$tag".2.$host/24 dev "$last"."$tag" + + +In bond-arp-ip-target.sh line 93: + ip -n ${ns} link set up dev $last.$tag + ^---^ 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 -n "${ns}" link set up dev "$last"."$tag" + + +In bond-arp-ip-target.sh line 109: + counts=$(ip netns exec ${ns} grep -F "Link Failure Count" ${proc_file} | awk -F: '{print $2}') + ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + counts=$(ip netns exec "${ns}" grep -F "Link Failure Count" "${proc_file}" | awk -F: '{print $2}') + + +In bond-arp-ip-target.sh line 113: + [ $i != 0 ] && RET=1 + ^-- SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + [ "$i" != 0 ] && RET=1 + + +In bond-arp-ip-target.sh line 117: +setup_bond_topo() +^-- SC2120 (warning): setup_bond_topo references arguments, but none are ever passed. + + +In bond-arp-ip-target.sh line 119: + load_bonding $* + ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. + ^-- SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + load_bonding "$*" + + +In bond-arp-ip-target.sh line 122: + stack_vlans bond0 ${s_ns} + ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + stack_vlans bond0 "${s_ns}" + + +In bond-arp-ip-target.sh line 123: + stack_vlans eth0 ${c_ns} + ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + stack_vlans eth0 "${c_ns}" + + +In bond-arp-ip-target.sh line 131: + ip -n ${s_ns} link add bond2 type bond arp_ip_target 10.0.0.1[10] + ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -n "${s_ns}" link add bond2 type bond arp_ip_target 10.0.0.1[10] + + +In bond-arp-ip-target.sh line 132: + [[ $? -ne 0 ]] && skip=0 + ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. + + +In bond-arp-ip-target.sh line 133: + ip -n ${s_ns} link del bond2 2> /dev/null + ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip -n "${s_ns}" link del bond2 2> /dev/null + + +In bond-arp-ip-target.sh line 135: + return $skip + ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$skip" + + +In bond-arp-ip-target.sh line 148: + stack_vlans bond0 ${s_ns} + ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + stack_vlans bond0 "${s_ns}" + + +In bond-arp-ip-target.sh line 149: + if [ $RET -ne 0 ]; then + ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + if [ "$RET" -ne 0 ]; then + + +In bond-arp-ip-target.sh line 154: + check_failure_count ${s_ns} bond0 + ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + check_failure_count "${s_ns}" bond0 + + +In bond-arp-ip-target.sh line 175: + stack_vlans bond0 ${s_ns} + ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + stack_vlans bond0 "${s_ns}" + + +In bond-arp-ip-target.sh line 176: + if [ $RET -ne 0 ]; then + ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + if [ "$RET" -ne 0 ]; then + + +In bond-arp-ip-target.sh line 181: + check_failure_count ${s_ns} bond0 + ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + check_failure_count "${s_ns}" bond0 + + +In bond-arp-ip-target.sh line 191: +setup_bond_topo # dyndbg=+p +^-------------^ SC2119 (info): Use setup_bond_topo "$@" if function's $1 should mean script's $1. + + +In bond-arp-ip-target.sh line 194: +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/SC2034 -- ALL_TESTS appears unused. Verify ... + https://www.shellcheck.net/wiki/SC2048 -- Use "$@" (with quotes) to prevent... + https://www.shellcheck.net/wiki/SC2120 -- setup_bond_topo references argume...