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.P7x4oLVnFa and /tmp/tmp.THsDeDNzP2 Tree base: d82d57310876 ("net: netdevsim: Support setting dev->perm_addr on port creation") Now at: 5a8800248d24 ("selftests: net: add netdev-l2addr.sh for testing L2 address functionality") ====== Checking before the patch ====== 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 259: 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 270: 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 282: 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 285: 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 286: 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 288: 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 289: 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 296: 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 304: 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 305: if (( $? )); then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In lib.sh line 327: read a ^--^ SC2162 (info): read without -r will mangle backslashes. In lib.sh line 385: 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 386: return $RET ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$RET" In lib.sh line 391: 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 396: 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 412: $current_test ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$current_test" In lib.sh line 448: 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 450: 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 480: 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 493: 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 501: { 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 510: return $EXIT_STATUS ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$EXIT_STATUS" In lib.sh line 519: exit $EXIT_STATUS ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: exit "$EXIT_STATUS" In lib.sh line 545: local old_addr=$(mac_get "$name") ^------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 555: local state=$(ip -j link show "$name" | ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 616: [ ${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 618: if ip netns exec "${listener_ns}" awk '{print $2" "$4}' \ ^---------------^ SC2016 (info): Expressions don't expand in single quotes, use double quotes for that. 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 the tree with the patch ====== 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 249: echo "$port_id $perm_addr" | ip netns exec $ns tee /sys/bus/netdevsim/devices/netdevsim$nsim_id/new_port > /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: echo "$port_id $perm_addr" | ip netns exec "$ns" tee /sys/bus/netdevsim/devices/netdevsim"$nsim_id"/new_port > /dev/null In lib.sh line 251: local orig_dev=$(basename $(ip netns exec $ns find /sys/bus/netdevsim/devices/netdevsim$nsim_id/net/ -maxdepth 1 -name 'e*' | tail -n 1)) ^------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^-- SC2046 (warning): Quote this to prevent 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: local orig_dev=$(basename $(ip netns exec "$ns" find /sys/bus/netdevsim/devices/netdevsim"$nsim_id"/net/ -maxdepth 1 -name 'e*' | tail -n 1)) In lib.sh line 254: ip -netns $ns link set dev $orig_dev name $new_dev ^-^ 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 "$orig_dev" name "$new_dev" In lib.sh line 255: ip -netns $ns link set dev $new_dev 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 "$new_dev" up In lib.sh line 257: echo $new_dev ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$new_dev" In lib.sh line 276: 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 287: 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 299: 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 302: 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 303: 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 305: 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 306: 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 313: 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 321: 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 322: if (( $? )); then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In lib.sh line 344: read a ^--^ SC2162 (info): read without -r will mangle backslashes. In lib.sh line 402: 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 403: return $RET ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$RET" In lib.sh line 408: 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 413: 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 429: $current_test ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$current_test" In lib.sh line 465: 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 467: 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 497: 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 510: 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 518: { 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 527: return $EXIT_STATUS ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$EXIT_STATUS" In lib.sh line 536: exit $EXIT_STATUS ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: exit "$EXIT_STATUS" In lib.sh line 562: local old_addr=$(mac_get "$name") ^------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 572: local state=$(ip -j link show "$name" | ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In lib.sh line 633: [ ${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 635: if ip netns exec "${listener_ns}" awk '{print $2" "$4}' \ ^---------------^ SC2016 (info): Expressions don't expand in single quotes, use double quotes for that. 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/SC2046 -- Quote this to prevent word splitt... Checking tools/testing/selftests/net/netdev-l2addr.sh - f55d020e64818fa89b0a4b9ac0c8beb1b37984bb816455a45321df839246135a In netdev-l2addr.sh line 13: cleanup_netdevsim $NSIM_ADDR ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: cleanup_netdevsim "$NSIM_ADDR" In netdev-l2addr.sh line 14: cleanup_ns $NS ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: cleanup_ns "$NS" In netdev-l2addr.sh line 31: local output=$(ip -n $ns link show dev $dev | grep "link/") ^----^ 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 output=$(ip -n "$ns" link show dev "$dev" | grep "link/") In netdev-l2addr.sh line 35: echo $k ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$k" In netdev-l2addr.sh line 48: nsim=$(create_netdevsim $NSIM_ADDR $NS) ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: nsim=$(create_netdevsim $NSIM_ADDR "$NS") In netdev-l2addr.sh line 50: get_addr link/ether $nsim $NS >/dev/null || fail "Couldn't get ether addr" ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: get_addr link/ether "$nsim" "$NS" >/dev/null || fail "Couldn't get ether addr" In netdev-l2addr.sh line 51: get_addr brd $nsim $NS >/dev/null || fail "Couldn't get brd addr" ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: get_addr brd "$nsim" "$NS" >/dev/null || fail "Couldn't get brd addr" In netdev-l2addr.sh line 52: get_addr perm $nsim $NS && fail "Found perm_addr without setting it" ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: get_addr perm "$nsim" "$NS" && fail "Found perm_addr without setting it" In netdev-l2addr.sh line 54: ip -n $NS link set dev $nsim address $TEST_ADDR ^-^ 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 dev "$nsim" address $TEST_ADDR In netdev-l2addr.sh line 55: ip -n $NS link set dev $nsim brd $TEST_ADDR ^-^ 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 dev "$nsim" brd $TEST_ADDR In netdev-l2addr.sh line 57: [[ "$(get_addr link/ether $nsim $NS)" == "$TEST_ADDR" ]] || fail "Couldn't set ether addr" ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [[ "$(get_addr link/ether "$nsim" "$NS")" == "$TEST_ADDR" ]] || fail "Couldn't set ether addr" In netdev-l2addr.sh line 58: [[ "$(get_addr brd $nsim $NS)" == "$TEST_ADDR" ]] || fail "Couldn't set brd addr" ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [[ "$(get_addr brd "$nsim" "$NS")" == "$TEST_ADDR" ]] || fail "Couldn't set brd addr" In netdev-l2addr.sh line 60: nsim_port=$(create_netdevsim_port $NSIM_ADDR $NS 2 $TEST_ADDR) ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: nsim_port=$(create_netdevsim_port $NSIM_ADDR "$NS" 2 $TEST_ADDR) In netdev-l2addr.sh line 62: get_addr link/ether $nsim_port $NS >/dev/null || fail "Couldn't get ether addr" ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: get_addr link/ether "$nsim_port" "$NS" >/dev/null || fail "Couldn't get ether addr" In netdev-l2addr.sh line 63: get_addr brd $nsim_port $NS >/dev/null || fail "Couldn't get brd addr" ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: get_addr brd "$nsim_port" "$NS" >/dev/null || fail "Couldn't get brd addr" In netdev-l2addr.sh line 64: [[ "$(get_addr permaddr $nsim_port $NS)" == "$TEST_ADDR" ]] || fail "Couldn't get permaddr" ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [[ "$(get_addr permaddr "$nsim_port" "$NS")" == "$TEST_ADDR" ]] || fail "Couldn't get permaddr" In netdev-l2addr.sh line 66: cleanup_netdevsim $NSIM_ADDR $NS ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: cleanup_netdevsim $NSIM_ADDR "$NS" 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 ...