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.qQhVEKJeCJ and /tmp/tmp.IPjXiU5QJI Tree base: b05772d2517c ("selftests: net: lib: Rename ip_link_add() to adf_*") Now at: 5f1f5cc40cfe ("selftests: net: lib: Rename ip_link_set_master() to adf_*") ====== Checking before the patch ====== Checking tools/testing/selftests/net/fdb_notify.sh - 0ef0033b6a39f898fda9a0a919e2899a7dd572ae896e50711a605e9074cff3f4 In fdb_notify.sh line 34: local count=$(grep -c -e 00:11:22:33:44:55 $tmpf) ^---^ 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=$(grep -c -e 00:11:22:33:44:55 "$tmpf") For more information: https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... Checking tools/testing/selftests/net/forwarding/bridge_activity_notify.sh - 4b25b7f31c0402b456b678840d313b3e1670b579a4a63da34db9448f6b1ecadd Checking tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh - eb4b9d40065ea6bedb08db2f927c7c68c9e183e694b90fda2fd0107282573fb6 Checking tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh - 55b8974b9512d983f0a799e4fd3181679e3083095be6248a3e44aae8bf92da20 Checking tools/testing/selftests/net/forwarding/vxlan_reserved.sh - e33a9ba82143df5f32f8b769667f1e5fcc5da104dc3f8741ba0113d3d0fc98f4 In vxlan_reserved.sh line 34: : ${VXPORT:=4789} ^-------------^ SC2223 (info): This default assignment may cause DoS due to globbing. Quote it. In vxlan_reserved.sh line 35: : ${ALL_TESTS:=" ^-- SC2223 (info): This default assignment may cause DoS due to globbing. Quote it. In vxlan_reserved.sh line 50: simple_if_init $h1 192.0.2.1/28 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_init "$h1" 192.0.2.1/28 In vxlan_reserved.sh line 51: defer simple_if_fini $h1 192.0.2.1/28 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: defer simple_if_fini "$h1" 192.0.2.1/28 In vxlan_reserved.sh line 53: tc qdisc add dev $h1 clsact ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc qdisc add dev "$h1" clsact In vxlan_reserved.sh line 54: defer tc qdisc del dev $h1 clsact ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: defer tc qdisc del dev "$h1" clsact In vxlan_reserved.sh line 56: tc filter add dev $h1 ingress pref 77 \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter add dev "$h1" ingress pref 77 \ In vxlan_reserved.sh line 58: defer tc filter del dev $h1 ingress pref 77 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: defer tc filter del dev "$h1" ingress pref 77 In vxlan_reserved.sh line 66: ip_link_set_addr br1 $(mac_get $swp1) ^--------------^ SC2046 (warning): Quote this to prevent word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip_link_set_addr br1 $(mac_get "$swp1") In vxlan_reserved.sh line 69: ip_link_set_up $rp1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip_link_set_up "$rp1" In vxlan_reserved.sh line 70: ip_addr_add $rp1 192.0.2.17/28 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip_addr_add "$rp1" 192.0.2.17/28 In vxlan_reserved.sh line 73: ip_link_set_master $swp1 br1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip_link_set_master "$swp1" br1 In vxlan_reserved.sh line 74: ip_link_set_up $swp1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip_link_set_up "$swp1" In vxlan_reserved.sh line 79: simple_if_init $rp2 192.0.2.18/28 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_init "$rp2" 192.0.2.18/28 In vxlan_reserved.sh line 80: defer simple_if_fini $rp2 192.0.2.18/28 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: defer simple_if_fini "$rp2" 192.0.2.18/28 In vxlan_reserved.sh line 117: for i in ${extra_bits[@]}; do ^--------------^ SC2068 (error): Double quote array expansions to avoid re-splitting elements. In vxlan_reserved.sh line 124: bits[$((i + 32))]=$(((vni & mask) != 0)) ^---------^ SC2321 (style): Array indices are already arithmetic contexts. Prefer removing the $(( and )). Did you mean: bits[i + 32]=$(((vni & mask) != 0)) In vxlan_reserved.sh line 136: bytes+=$(printf %02x $byte): ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: bytes+=$(printf %02x "$byte"): In vxlan_reserved.sh line 139: echo ${bytes%:} ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "${bytes%:}" In vxlan_reserved.sh line 155: echo $out ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$out" In vxlan_reserved.sh line 168: local vxlan_header=$(vxlan_header_bytes $vni $reserved_bits) ^----------^ 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 vxlan_header=$(vxlan_header_bytes "$vni" "$reserved_bits") In vxlan_reserved.sh line 170: $MZ $dev -c $count -d 100msec -q \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MZ "$dev" -c "$count" -d 100msec -q \ In vxlan_reserved.sh line 171: -b $next_hop_mac -B $dest_ip \ ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -b "$next_hop_mac" -B "$dest_ip" \ In vxlan_reserved.sh line 172: -t udp sp=23456,dp=$VXPORT,p=$(: ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2046 (warning): Quote this to prevent word splitting. Did you mean: -t udp sp=23456,dp="$VXPORT",p=$(: In vxlan_reserved.sh line 173: )"$vxlan_header:"$( : VXLAN ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 174: )"$dest_mac:"$( : ETH daddr ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 175: )"00:11:22:33:44:55:"$( : ETH saddr ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 176: )"08:00:"$( : ETH type ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 177: )"45:"$( : IP version + IHL ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 178: )"00:"$( : IP TOS ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 179: )"00:54:"$( : IP total length ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 180: )"99:83:"$( : IP identification ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 181: )"40:00:"$( : IP flags + frag off ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 182: )"40:"$( : IP TTL ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 183: )"01:"$( : IP proto ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 184: )"00:00:"$( : IP header csum ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 185: )"$(ipv4_to_bytes 192.0.2.3):"$( : IP saddr ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 186: )"$(ipv4_to_bytes 192.0.2.1):"$( : IP daddr ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 187: )"08:"$( : ICMP type ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 188: )"00:"$( : ICMP code ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 189: )"8b:f2:"$( : ICMP csum ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 190: )"1f:6a:"$( : ICMP request identifier ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 191: )"00:01:"$( : ICMP request seq. number ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 192: )"4f:ff:c5:5b:00:00:00:00:"$( : ICMP payload ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 193: )"6d:74:0b:00:00:00:00:00:"$( : ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 194: )"10:11:12:13:14:15:16:17:"$( : ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 195: )"18:19:1a:1b:1c:1d:1e:1f:"$( : ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 196: )"20:21:22:23:24:25:26:27:"$( : ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 197: )"28:29:2a:2b:2c:2d:2e:2f:"$( : ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 217: echo $i ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$i" In vxlan_reserved.sh line 223: vxlan_ping_do 10 $rp2 $(mac_get $rp1) 192.0.2.17 $(mac_get $h1) 1000 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------------^ SC2046 (warning): Quote this to prevent word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------------^ SC2046 (warning): Quote this to prevent word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: vxlan_ping_do 10 "$rp2" $(mac_get "$rp1") 192.0.2.17 $(mac_get "$h1") 1000 In vxlan_reserved.sh line 229: vxlan_ping_do 1 $rp2 $(mac_get $rp1) \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------------^ SC2046 (warning): Quote this to prevent word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: vxlan_ping_do 1 "$rp2" $(mac_get "$rp1") \ In vxlan_reserved.sh line 230: 192.0.2.17 $(mac_get $h1) 1000 "$bit" ^------------^ SC2046 (warning): Quote this to prevent word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: 192.0.2.17 $(mac_get "$h1") 1000 "$bit" In vxlan_reserved.sh line 243: local t0=$($get_stat) ^-- SC2155 (warning): Declare and assign separately to avoid masking return values. In vxlan_reserved.sh line 246: check_err $? "Failure when running $@" ^-- SC2145 (error): Argument mixes string and array. Use * or separate argument. In vxlan_reserved.sh line 248: local t1=$($get_stat) ^-- SC2155 (warning): Declare and assign separately to avoid masking return values. In vxlan_reserved.sh line 266: local t0=$(link_stats_get vx1 rx errors) ^-- SC2155 (warning): Declare and assign separately to avoid masking return values. In vxlan_reserved.sh line 269: $n_allowed_bits vxlan_ping_reserved ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$n_allowed_bits" vxlan_ping_reserved In vxlan_reserved.sh line 270: local t1=$(link_stats_get vx1 rx errors) ^-- SC2155 (warning): Declare and assign separately to avoid masking return values. In vxlan_reserved.sh line 308: local allowed_bytes=$(vxlan_header_bytes 0xffffff $bit) ^-----------^ 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 allowed_bytes=$(vxlan_header_bytes 0xffffff "$bit") In vxlan_reserved.sh line 309: local reserved_bytes=$(neg_bytes $allowed_bytes) ^------------^ 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 reserved_bytes=$(neg_bytes "$allowed_bytes") In vxlan_reserved.sh line 312: vxlan_device_add reserved_bits 0x$reserved_bits ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: vxlan_device_add reserved_bits 0x"$reserved_bits" In vxlan_reserved.sh line 352: 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/SC2068 -- Double quote array expansions to ... https://www.shellcheck.net/wiki/SC2145 -- Argument mixes string and array. ... https://www.shellcheck.net/wiki/SC2027 -- The surrounding quotes actually u... Checking tools/testing/selftests/net/lib.sh - c03467c29b10bc5091e0c288a3bb791664845bf18d1bc2e796311e58cd726204 In lib.sh line 78: local start_time="$(date -u +%s%3N)" ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 87: local current_time="$(date -u +%s%3N)" ^----------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 115: local current=$("$@") ^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 118: ((current $expr)) ^-- SC1105 (error): Shells disambiguate (( differently or not at all. For subshell, add spaces around ( . For ((, fix parsing errors. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ((current "$expr")) In lib.sh line 126: local base=$("$@") ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 135: local base=$("$@") ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 145: if ! which $prog_name >/dev/null 2>/dev/null; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if ! which "$prog_name" >/dev/null 2>/dev/null; then In lib.sh line 147: if ! which $prog_name >/dev/null; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if ! which "$prog_name" >/dev/null; then In lib.sh line 235: echo "$id 1" | ip netns exec $ns tee /sys/bus/netdevsim/new_device >/dev/null ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$id 1" | ip netns exec "$ns" tee /sys/bus/netdevsim/new_device >/dev/null In lib.sh line 236: local dev=$(ip netns exec $ns ls /sys/bus/netdevsim/devices/netdevsim$id/net) ^-^ 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 dev=$(ip netns exec "$ns" ls /sys/bus/netdevsim/devices/netdevsim"$id"/net) In lib.sh line 237: ip -netns $ns link set dev $dev name nsim$id ^-^ 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 "$ns" link set dev "$dev" name nsim"$id" In lib.sh line 238: ip -netns $ns link set dev nsim$id up ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns" link set dev nsim"$id" up In lib.sh line 240: echo nsim$id ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo nsim"$id" In lib.sh line 282: tc -j -s filter show dev $dev $dir pref $pref \ ^--^ 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 -j -s filter show dev "$dev" "$dir" pref "$pref" \ In lib.sh line 293: tc $netns -j -s filter show $id \ ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc "$netns" -j -s filter show "$id" \ In lib.sh line 305: tc -n $ns qdisc add dev $dev root handle 1: prio bands 2 \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc -n "$ns" qdisc add dev "$dev" root handle 1: prio bands 2 \ In lib.sh line 308: tc -n $ns qdisc add dev $dev parent 1:1 handle 11: pfifo ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc -n "$ns" qdisc add dev "$dev" parent 1:1 handle 11: pfifo In lib.sh line 309: tc -n $ns qdisc add dev $dev parent 1:2 handle 12: pfifo ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc -n "$ns" qdisc add dev "$dev" parent 1:2 handle 12: pfifo In lib.sh line 311: tc -n $ns filter add dev $dev parent 1: protocol ipv$ipver \ ^-^ 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 -n "$ns" filter add dev "$dev" parent 1: protocol ipv"$ipver" \ In lib.sh line 312: flower $flower_expr classid 1:2 ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: flower "$flower_expr" classid 1:2 In lib.sh line 319: tc -n $ns -j -s qdisc show dev $dev handle 12: | jq .[0].packets ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc -n "$ns" -j -s qdisc show dev "$dev" handle 12: | jq .[0].packets In lib.sh line 327: RET=$(ksft_status_merge $RET $ksft_status) ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: RET=$(ksft_status_merge $RET "$ksft_status") In lib.sh line 328: if (( $? )); then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In lib.sh line 350: read a ^--^ SC2162 (info): read without -r will mangle backslashes. In lib.sh line 408: EXIT_STATUS=$(ksft_exit_status_merge $EXIT_STATUS $RET) ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: EXIT_STATUS=$(ksft_exit_status_merge $EXIT_STATUS "$RET") In lib.sh line 409: return $RET ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$RET" In lib.sh line 414: RET=$ksft_skip retmsg= log_test "$@" ^-- SC1007 (warning): Remove space after = if trying to assign a value (for empty string, use var='' ... ). In lib.sh line 419: RET=$ksft_xfail retmsg= log_test "$@" ^-- SC1007 (warning): Remove space after = if trying to assign a value (for empty string, use var='' ... ). In lib.sh line 435: $current_test ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$current_test" In lib.sh line 471: check_fail $err "$what succeeded, but should have failed" ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_fail "$err" "$what succeeded, but should have failed" In lib.sh line 473: check_err $err "$what failed" ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_err "$err" "$what failed" In lib.sh line 503: kind=$(ip -j -d link show dev $dev | ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kind=$(ip -j -d link show dev "$dev" | In lib.sh line 516: ip -j link show dev $if_name | jq -r '.[]["address"]' ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -j link show dev "$if_name" | jq -r '.[]["address"]' In lib.sh line 524: { kill $pid && wait $pid; } 2>/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: { kill "$pid" && wait "$pid"; } 2>/dev/null In lib.sh line 533: return $EXIT_STATUS ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$EXIT_STATUS" In lib.sh line 542: exit $EXIT_STATUS ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: exit "$EXIT_STATUS" In lib.sh line 568: local old_addr=$(mac_get "$name") ^------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 578: local state=$(ip -j link show "$name" | ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 639: [ ${protocol} = "tcp" ] && pattern="${pattern}0A" ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "${protocol}" = "tcp" ] && pattern="${pattern}0A" In lib.sh line 641: if ip netns exec "${listener_ns}" awk '{print $2" "$4}' \ ^---------------^ SC2016 (info): Expressions don't expand in single quotes, use double quotes for that. In lib.sh line 663: output=$(echo $output | jq -r $jq_opts "$jq_exp") ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: output=$(echo "$output" | jq -r "$jq_opts" "$jq_exp") In lib.sh line 668: echo $output ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$output" In lib.sh line 670: [ ! -z "$output" ] ^-- SC2236 (style): Use -n instead of ! -z. For more information: https://www.shellcheck.net/wiki/SC1105 -- Shells disambiguate (( differentl... https://www.shellcheck.net/wiki/SC1007 -- Remove space after = if trying to... https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... Checking tools/testing/selftests/net/vlan_bridge_binding.sh - 62b03e4b302fe2b5de91ca98e5714f032b4653afda5976a3b9816c2df41c5328 In vlan_bridge_binding.sh line 51: local operstate=$(ip -j link show $dev | jq -r .[].operstate) ^-------^ 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 operstate=$(ip -j link show "$dev" | jq -r .[].operstate) In vlan_bridge_binding.sh line 57: echo -n $operstate ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo -n "$operstate" In vlan_bridge_binding.sh line 58: [[ $operstate == $expect ]] ^-----^ SC2053 (warning): Quote the right-hand side of == in [[ ]] to prevent glob matching. In vlan_bridge_binding.sh line 77: adf_ip_link_add $link.$id link $link type vlan id $id "$@" ^---^ 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: adf_ip_link_add "$link"."$id" link "$link" type vlan id "$id" "$@" In vlan_bridge_binding.sh line 101: ip_link_set_down $dev ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip_link_set_down "$dev" In vlan_bridge_binding.sh line 112: check_operstate br.11 $opst_11 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_operstate br.11 "$opst_11" In vlan_bridge_binding.sh line 113: check_operstate br.12 $opst_12 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_operstate br.12 "$opst_12" In vlan_bridge_binding.sh line 114: check_operstate br.13 $opst_13 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_operstate br.13 "$opst_13" In vlan_bridge_binding.sh line 115: check_operstate br.14 $opst_14 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_operstate br.14 "$opst_14" In vlan_bridge_binding.sh line 132: check_operstates $opsts_d1 ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_operstates "$opsts_d1" In vlan_bridge_binding.sh line 138: check_operstates $opsts_d2 ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_operstates "$opsts_d2" In vlan_bridge_binding.sh line 144: check_operstates $opsts_d12 ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_operstates "$opsts_d12" In vlan_bridge_binding.sh line 150: check_operstates $opsts_d123 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_operstates "$opsts_d123" For more information: https://www.shellcheck.net/wiki/SC2053 -- Quote the right-hand side of == i... https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/fdb_notify.sh - 0ef0033b6a39f898fda9a0a919e2899a7dd572ae896e50711a605e9074cff3f4 In fdb_notify.sh line 34: local count=$(grep -c -e 00:11:22:33:44:55 $tmpf) ^---^ 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=$(grep -c -e 00:11:22:33:44:55 "$tmpf") For more information: https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... Checking tools/testing/selftests/net/forwarding/bridge_activity_notify.sh - 4b25b7f31c0402b456b678840d313b3e1670b579a4a63da34db9448f6b1ecadd Checking tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh - eb4b9d40065ea6bedb08db2f927c7c68c9e183e694b90fda2fd0107282573fb6 Checking tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh - 55b8974b9512d983f0a799e4fd3181679e3083095be6248a3e44aae8bf92da20 Checking tools/testing/selftests/net/forwarding/vxlan_reserved.sh - e33a9ba82143df5f32f8b769667f1e5fcc5da104dc3f8741ba0113d3d0fc98f4 In vxlan_reserved.sh line 34: : ${VXPORT:=4789} ^-------------^ SC2223 (info): This default assignment may cause DoS due to globbing. Quote it. In vxlan_reserved.sh line 35: : ${ALL_TESTS:=" ^-- SC2223 (info): This default assignment may cause DoS due to globbing. Quote it. In vxlan_reserved.sh line 50: simple_if_init $h1 192.0.2.1/28 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_init "$h1" 192.0.2.1/28 In vxlan_reserved.sh line 51: defer simple_if_fini $h1 192.0.2.1/28 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: defer simple_if_fini "$h1" 192.0.2.1/28 In vxlan_reserved.sh line 53: tc qdisc add dev $h1 clsact ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc qdisc add dev "$h1" clsact In vxlan_reserved.sh line 54: defer tc qdisc del dev $h1 clsact ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: defer tc qdisc del dev "$h1" clsact In vxlan_reserved.sh line 56: tc filter add dev $h1 ingress pref 77 \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter add dev "$h1" ingress pref 77 \ In vxlan_reserved.sh line 58: defer tc filter del dev $h1 ingress pref 77 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: defer tc filter del dev "$h1" ingress pref 77 In vxlan_reserved.sh line 66: ip_link_set_addr br1 $(mac_get $swp1) ^--------------^ SC2046 (warning): Quote this to prevent word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip_link_set_addr br1 $(mac_get "$swp1") In vxlan_reserved.sh line 69: ip_link_set_up $rp1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip_link_set_up "$rp1" In vxlan_reserved.sh line 70: ip_addr_add $rp1 192.0.2.17/28 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip_addr_add "$rp1" 192.0.2.17/28 In vxlan_reserved.sh line 73: adf_ip_link_set_master $swp1 br1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: adf_ip_link_set_master "$swp1" br1 In vxlan_reserved.sh line 74: ip_link_set_up $swp1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip_link_set_up "$swp1" In vxlan_reserved.sh line 79: simple_if_init $rp2 192.0.2.18/28 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_init "$rp2" 192.0.2.18/28 In vxlan_reserved.sh line 80: defer simple_if_fini $rp2 192.0.2.18/28 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: defer simple_if_fini "$rp2" 192.0.2.18/28 In vxlan_reserved.sh line 117: for i in ${extra_bits[@]}; do ^--------------^ SC2068 (error): Double quote array expansions to avoid re-splitting elements. In vxlan_reserved.sh line 124: bits[$((i + 32))]=$(((vni & mask) != 0)) ^---------^ SC2321 (style): Array indices are already arithmetic contexts. Prefer removing the $(( and )). Did you mean: bits[i + 32]=$(((vni & mask) != 0)) In vxlan_reserved.sh line 136: bytes+=$(printf %02x $byte): ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: bytes+=$(printf %02x "$byte"): In vxlan_reserved.sh line 139: echo ${bytes%:} ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "${bytes%:}" In vxlan_reserved.sh line 155: echo $out ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$out" In vxlan_reserved.sh line 168: local vxlan_header=$(vxlan_header_bytes $vni $reserved_bits) ^----------^ 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 vxlan_header=$(vxlan_header_bytes "$vni" "$reserved_bits") In vxlan_reserved.sh line 170: $MZ $dev -c $count -d 100msec -q \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MZ "$dev" -c "$count" -d 100msec -q \ In vxlan_reserved.sh line 171: -b $next_hop_mac -B $dest_ip \ ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -b "$next_hop_mac" -B "$dest_ip" \ In vxlan_reserved.sh line 172: -t udp sp=23456,dp=$VXPORT,p=$(: ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2046 (warning): Quote this to prevent word splitting. Did you mean: -t udp sp=23456,dp="$VXPORT",p=$(: In vxlan_reserved.sh line 173: )"$vxlan_header:"$( : VXLAN ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 174: )"$dest_mac:"$( : ETH daddr ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 175: )"00:11:22:33:44:55:"$( : ETH saddr ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 176: )"08:00:"$( : ETH type ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 177: )"45:"$( : IP version + IHL ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 178: )"00:"$( : IP TOS ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 179: )"00:54:"$( : IP total length ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 180: )"99:83:"$( : IP identification ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 181: )"40:00:"$( : IP flags + frag off ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 182: )"40:"$( : IP TTL ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 183: )"01:"$( : IP proto ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 184: )"00:00:"$( : IP header csum ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 185: )"$(ipv4_to_bytes 192.0.2.3):"$( : IP saddr ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 186: )"$(ipv4_to_bytes 192.0.2.1):"$( : IP daddr ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 187: )"08:"$( : ICMP type ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 188: )"00:"$( : ICMP code ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 189: )"8b:f2:"$( : ICMP csum ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 190: )"1f:6a:"$( : ICMP request identifier ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 191: )"00:01:"$( : ICMP request seq. number ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 192: )"4f:ff:c5:5b:00:00:00:00:"$( : ICMP payload ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 193: )"6d:74:0b:00:00:00:00:00:"$( : ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 194: )"10:11:12:13:14:15:16:17:"$( : ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 195: )"18:19:1a:1b:1c:1d:1e:1f:"$( : ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 196: )"20:21:22:23:24:25:26:27:"$( : ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 197: )"28:29:2a:2b:2c:2d:2e:2f:"$( : ^-- SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them. ^-- SC2046 (warning): Quote this to prevent word splitting. In vxlan_reserved.sh line 217: echo $i ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$i" In vxlan_reserved.sh line 223: vxlan_ping_do 10 $rp2 $(mac_get $rp1) 192.0.2.17 $(mac_get $h1) 1000 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------------^ SC2046 (warning): Quote this to prevent word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------------^ SC2046 (warning): Quote this to prevent word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: vxlan_ping_do 10 "$rp2" $(mac_get "$rp1") 192.0.2.17 $(mac_get "$h1") 1000 In vxlan_reserved.sh line 229: vxlan_ping_do 1 $rp2 $(mac_get $rp1) \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------------^ SC2046 (warning): Quote this to prevent word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: vxlan_ping_do 1 "$rp2" $(mac_get "$rp1") \ In vxlan_reserved.sh line 230: 192.0.2.17 $(mac_get $h1) 1000 "$bit" ^------------^ SC2046 (warning): Quote this to prevent word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: 192.0.2.17 $(mac_get "$h1") 1000 "$bit" In vxlan_reserved.sh line 243: local t0=$($get_stat) ^-- SC2155 (warning): Declare and assign separately to avoid masking return values. In vxlan_reserved.sh line 246: check_err $? "Failure when running $@" ^-- SC2145 (error): Argument mixes string and array. Use * or separate argument. In vxlan_reserved.sh line 248: local t1=$($get_stat) ^-- SC2155 (warning): Declare and assign separately to avoid masking return values. In vxlan_reserved.sh line 266: local t0=$(link_stats_get vx1 rx errors) ^-- SC2155 (warning): Declare and assign separately to avoid masking return values. In vxlan_reserved.sh line 269: $n_allowed_bits vxlan_ping_reserved ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$n_allowed_bits" vxlan_ping_reserved In vxlan_reserved.sh line 270: local t1=$(link_stats_get vx1 rx errors) ^-- SC2155 (warning): Declare and assign separately to avoid masking return values. In vxlan_reserved.sh line 308: local allowed_bytes=$(vxlan_header_bytes 0xffffff $bit) ^-----------^ 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 allowed_bytes=$(vxlan_header_bytes 0xffffff "$bit") In vxlan_reserved.sh line 309: local reserved_bytes=$(neg_bytes $allowed_bytes) ^------------^ 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 reserved_bytes=$(neg_bytes "$allowed_bytes") In vxlan_reserved.sh line 312: vxlan_device_add reserved_bits 0x$reserved_bits ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: vxlan_device_add reserved_bits 0x"$reserved_bits" In vxlan_reserved.sh line 352: 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/SC2068 -- Double quote array expansions to ... https://www.shellcheck.net/wiki/SC2145 -- Argument mixes string and array. ... https://www.shellcheck.net/wiki/SC2027 -- The surrounding quotes actually u... Checking tools/testing/selftests/net/lib.sh - c03467c29b10bc5091e0c288a3bb791664845bf18d1bc2e796311e58cd726204 In lib.sh line 78: local start_time="$(date -u +%s%3N)" ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 87: local current_time="$(date -u +%s%3N)" ^----------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 115: local current=$("$@") ^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 118: ((current $expr)) ^-- SC1105 (error): Shells disambiguate (( differently or not at all. For subshell, add spaces around ( . For ((, fix parsing errors. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ((current "$expr")) In lib.sh line 126: local base=$("$@") ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 135: local base=$("$@") ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 145: if ! which $prog_name >/dev/null 2>/dev/null; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if ! which "$prog_name" >/dev/null 2>/dev/null; then In lib.sh line 147: if ! which $prog_name >/dev/null; then ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if ! which "$prog_name" >/dev/null; then In lib.sh line 235: echo "$id 1" | ip netns exec $ns tee /sys/bus/netdevsim/new_device >/dev/null ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$id 1" | ip netns exec "$ns" tee /sys/bus/netdevsim/new_device >/dev/null In lib.sh line 236: local dev=$(ip netns exec $ns ls /sys/bus/netdevsim/devices/netdevsim$id/net) ^-^ 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 dev=$(ip netns exec "$ns" ls /sys/bus/netdevsim/devices/netdevsim"$id"/net) In lib.sh line 237: ip -netns $ns link set dev $dev name nsim$id ^-^ 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 "$ns" link set dev "$dev" name nsim"$id" In lib.sh line 238: ip -netns $ns link set dev nsim$id up ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "$ns" link set dev nsim"$id" up In lib.sh line 240: echo nsim$id ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo nsim"$id" In lib.sh line 282: tc -j -s filter show dev $dev $dir pref $pref \ ^--^ 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 -j -s filter show dev "$dev" "$dir" pref "$pref" \ In lib.sh line 293: tc $netns -j -s filter show $id \ ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc "$netns" -j -s filter show "$id" \ In lib.sh line 305: tc -n $ns qdisc add dev $dev root handle 1: prio bands 2 \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc -n "$ns" qdisc add dev "$dev" root handle 1: prio bands 2 \ In lib.sh line 308: tc -n $ns qdisc add dev $dev parent 1:1 handle 11: pfifo ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc -n "$ns" qdisc add dev "$dev" parent 1:1 handle 11: pfifo In lib.sh line 309: tc -n $ns qdisc add dev $dev parent 1:2 handle 12: pfifo ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc -n "$ns" qdisc add dev "$dev" parent 1:2 handle 12: pfifo In lib.sh line 311: tc -n $ns filter add dev $dev parent 1: protocol ipv$ipver \ ^-^ 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 -n "$ns" filter add dev "$dev" parent 1: protocol ipv"$ipver" \ In lib.sh line 312: flower $flower_expr classid 1:2 ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: flower "$flower_expr" classid 1:2 In lib.sh line 319: tc -n $ns -j -s qdisc show dev $dev handle 12: | jq .[0].packets ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc -n "$ns" -j -s qdisc show dev "$dev" handle 12: | jq .[0].packets In lib.sh line 327: RET=$(ksft_status_merge $RET $ksft_status) ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: RET=$(ksft_status_merge $RET "$ksft_status") In lib.sh line 328: if (( $? )); then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In lib.sh line 350: read a ^--^ SC2162 (info): read without -r will mangle backslashes. In lib.sh line 408: EXIT_STATUS=$(ksft_exit_status_merge $EXIT_STATUS $RET) ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: EXIT_STATUS=$(ksft_exit_status_merge $EXIT_STATUS "$RET") In lib.sh line 409: return $RET ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$RET" In lib.sh line 414: RET=$ksft_skip retmsg= log_test "$@" ^-- SC1007 (warning): Remove space after = if trying to assign a value (for empty string, use var='' ... ). In lib.sh line 419: RET=$ksft_xfail retmsg= log_test "$@" ^-- SC1007 (warning): Remove space after = if trying to assign a value (for empty string, use var='' ... ). In lib.sh line 435: $current_test ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$current_test" In lib.sh line 471: check_fail $err "$what succeeded, but should have failed" ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_fail "$err" "$what succeeded, but should have failed" In lib.sh line 473: check_err $err "$what failed" ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_err "$err" "$what failed" In lib.sh line 503: kind=$(ip -j -d link show dev $dev | ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kind=$(ip -j -d link show dev "$dev" | In lib.sh line 516: ip -j link show dev $if_name | jq -r '.[]["address"]' ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -j link show dev "$if_name" | jq -r '.[]["address"]' In lib.sh line 524: { kill $pid && wait $pid; } 2>/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: { kill "$pid" && wait "$pid"; } 2>/dev/null In lib.sh line 533: return $EXIT_STATUS ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$EXIT_STATUS" In lib.sh line 542: exit $EXIT_STATUS ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: exit "$EXIT_STATUS" In lib.sh line 568: local old_addr=$(mac_get "$name") ^------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 578: local state=$(ip -j link show "$name" | ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 639: [ ${protocol} = "tcp" ] && pattern="${pattern}0A" ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "${protocol}" = "tcp" ] && pattern="${pattern}0A" In lib.sh line 641: if ip netns exec "${listener_ns}" awk '{print $2" "$4}' \ ^---------------^ SC2016 (info): Expressions don't expand in single quotes, use double quotes for that. In lib.sh line 663: output=$(echo $output | jq -r $jq_opts "$jq_exp") ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: output=$(echo "$output" | jq -r "$jq_opts" "$jq_exp") In lib.sh line 668: echo $output ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$output" In lib.sh line 670: [ ! -z "$output" ] ^-- SC2236 (style): Use -n instead of ! -z. For more information: https://www.shellcheck.net/wiki/SC1105 -- Shells disambiguate (( differentl... https://www.shellcheck.net/wiki/SC1007 -- Remove space after = if trying to... https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... Checking tools/testing/selftests/net/vlan_bridge_binding.sh - 62b03e4b302fe2b5de91ca98e5714f032b4653afda5976a3b9816c2df41c5328 In vlan_bridge_binding.sh line 51: local operstate=$(ip -j link show $dev | jq -r .[].operstate) ^-------^ 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 operstate=$(ip -j link show "$dev" | jq -r .[].operstate) In vlan_bridge_binding.sh line 57: echo -n $operstate ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo -n "$operstate" In vlan_bridge_binding.sh line 58: [[ $operstate == $expect ]] ^-----^ SC2053 (warning): Quote the right-hand side of == in [[ ]] to prevent glob matching. In vlan_bridge_binding.sh line 77: adf_ip_link_add $link.$id link $link type vlan id $id "$@" ^---^ 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: adf_ip_link_add "$link"."$id" link "$link" type vlan id "$id" "$@" In vlan_bridge_binding.sh line 101: ip_link_set_down $dev ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip_link_set_down "$dev" In vlan_bridge_binding.sh line 112: check_operstate br.11 $opst_11 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_operstate br.11 "$opst_11" In vlan_bridge_binding.sh line 113: check_operstate br.12 $opst_12 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_operstate br.12 "$opst_12" In vlan_bridge_binding.sh line 114: check_operstate br.13 $opst_13 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_operstate br.13 "$opst_13" In vlan_bridge_binding.sh line 115: check_operstate br.14 $opst_14 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_operstate br.14 "$opst_14" In vlan_bridge_binding.sh line 132: check_operstates $opsts_d1 ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_operstates "$opsts_d1" In vlan_bridge_binding.sh line 138: check_operstates $opsts_d2 ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_operstates "$opsts_d2" In vlan_bridge_binding.sh line 144: check_operstates $opsts_d12 ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_operstates "$opsts_d12" In vlan_bridge_binding.sh line 150: check_operstates $opsts_d123 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_operstates "$opsts_d123" For more information: https://www.shellcheck.net/wiki/SC2053 -- Quote the right-hand side of == i... https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... tools/testing/selftests/net/forwarding/bridge_activity_notify.sh is shellcheck compliant tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh is shellcheck compliant tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh is shellcheck compliant