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.2DSkv7Ihoi and /tmp/tmp.2aNbv5UdAg Tree base: 14cd01c28fb1 ("Merge branch 'fbnic-synchronize-address-handling-with-bmc'") Now at: 9e66c8868ea5 ("selftests: net: fix spelling and grammar mistakes") ====== Checking before the patch ====== Checking tools/testing/selftests/net/rps_default_mask.sh - 6a92456d3a9d50213bfcd5904dd6cab1806a27d8d738893720efc253ca350e42 In rps_default_mask.sh line 5: readonly cpus=$(nproc) ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. In rps_default_mask.sh line 8: [ $cpus -gt 2 ] || exit $ksft_skip ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$cpus" -gt 2 ] || exit $ksft_skip In rps_default_mask.sh line 10: readonly INITIAL_RPS_DEFAULT_MASK=$(cat /proc/sys/net/core/rps_default_mask) ^----------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In rps_default_mask.sh line 11: readonly TAG="$(mktemp -u XXXXXX)" ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In rps_default_mask.sh line 21: echo $INITIAL_RPS_DEFAULT_MASK > /proc/sys/net/core/rps_default_mask ^-----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$INITIAL_RPS_DEFAULT_MASK" > /proc/sys/net/core/rps_default_mask In rps_default_mask.sh line 22: ip netns del $NETNS ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns del "$NETNS" In rps_default_mask.sh line 34: rps_mask=$($cmd /sys/class/net/$dev_name/queues/rx-0/rps_cpus) ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rps_mask=$($cmd /sys/class/net/"$dev_name"/queues/rx-0/rps_cpus) In rps_default_mask.sh line 40: if [ $rps_mask -eq $expected_rps_mask ]; 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 [ "$rps_mask" -eq "$expected_rps_mask" ]; then In rps_default_mask.sh line 52: chk_rps "empty rps_default_mask" $NETNS lo 0 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: chk_rps "empty rps_default_mask" "$NETNS" lo 0 In rps_default_mask.sh line 57: chk_rps "changing rps_default_mask dont affect existing devices" "" lo $INITIAL_RPS_DEFAULT_MASK ^-----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: chk_rps "changing rps_default_mask dont affect existing devices" "" lo "$INITIAL_RPS_DEFAULT_MASK" In rps_default_mask.sh line 60: chk_rps "changing rps_default_mask dont affect existing netns" $NETNS lo 0 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: chk_rps "changing rps_default_mask dont affect existing netns" "$NETNS" lo 0 In rps_default_mask.sh line 62: ip link add name $VETH type veth peer netns $NETNS name $VETH ^---^ 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 link add name "$VETH" type veth peer netns "$NETNS" name "$VETH" In rps_default_mask.sh line 63: ip link set dev $VETH up ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$VETH" up In rps_default_mask.sh line 64: ip -n $NETNS link set dev $VETH 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 -n "$NETNS" link set dev "$VETH" up In rps_default_mask.sh line 65: chk_rps "changing rps_default_mask affect newly created devices" "" $VETH 3 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: chk_rps "changing rps_default_mask affect newly created devices" "" "$VETH" 3 In rps_default_mask.sh line 66: chk_rps "changing rps_default_mask don't affect newly child netns[II]" $NETNS $VETH 0 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: chk_rps "changing rps_default_mask don't affect newly child netns[II]" "$NETNS" "$VETH" 0 In rps_default_mask.sh line 67: ip link del dev $VETH ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link del dev "$VETH" In rps_default_mask.sh line 68: ip netns del $NETNS ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns del "$NETNS" In rps_default_mask.sh line 73: ip netns exec $NETNS sysctl -qw net.core.rps_default_mask=1 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$NETNS" sysctl -qw net.core.rps_default_mask=1 In rps_default_mask.sh line 74: ip link add name $VETH type veth peer netns $NETNS name $VETH ^---^ 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 link add name "$VETH" type veth peer netns "$NETNS" name "$VETH" In rps_default_mask.sh line 75: chk_rps "changing rps_default_mask in child ns don't affect the main one" "" lo $INITIAL_RPS_DEFAULT_MASK ^-----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: chk_rps "changing rps_default_mask in child ns don't affect the main one" "" lo "$INITIAL_RPS_DEFAULT_MASK" In rps_default_mask.sh line 76: chk_rps "changing rps_default_mask in child ns affects new childns devices" $NETNS $VETH 1 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: chk_rps "changing rps_default_mask in child ns affects new childns devices" "$NETNS" "$VETH" 1 In rps_default_mask.sh line 77: chk_rps "changing rps_default_mask in child ns don't affect existing devices" $NETNS lo 0 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: chk_rps "changing rps_default_mask in child ns don't affect existing devices" "$NETNS" lo 0 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 the tree with the patch ====== Checking tools/testing/selftests/net/rps_default_mask.sh - 6a92456d3a9d50213bfcd5904dd6cab1806a27d8d738893720efc253ca350e42 In rps_default_mask.sh line 5: readonly cpus=$(nproc) ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. In rps_default_mask.sh line 8: [ $cpus -gt 2 ] || exit $ksft_skip ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$cpus" -gt 2 ] || exit $ksft_skip In rps_default_mask.sh line 10: readonly INITIAL_RPS_DEFAULT_MASK=$(cat /proc/sys/net/core/rps_default_mask) ^----------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In rps_default_mask.sh line 11: readonly TAG="$(mktemp -u XXXXXX)" ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In rps_default_mask.sh line 21: echo $INITIAL_RPS_DEFAULT_MASK > /proc/sys/net/core/rps_default_mask ^-----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$INITIAL_RPS_DEFAULT_MASK" > /proc/sys/net/core/rps_default_mask In rps_default_mask.sh line 22: ip netns del $NETNS ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns del "$NETNS" In rps_default_mask.sh line 34: rps_mask=$($cmd /sys/class/net/$dev_name/queues/rx-0/rps_cpus) ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rps_mask=$($cmd /sys/class/net/"$dev_name"/queues/rx-0/rps_cpus) In rps_default_mask.sh line 40: if [ $rps_mask -eq $expected_rps_mask ]; 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 [ "$rps_mask" -eq "$expected_rps_mask" ]; then In rps_default_mask.sh line 52: chk_rps "empty rps_default_mask" $NETNS lo 0 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: chk_rps "empty rps_default_mask" "$NETNS" lo 0 In rps_default_mask.sh line 57: chk_rps "changing rps_default_mask doesn't affect existing devices" "" lo $INITIAL_RPS_DEFAULT_MASK ^-----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: chk_rps "changing rps_default_mask doesn't affect existing devices" "" lo "$INITIAL_RPS_DEFAULT_MASK" In rps_default_mask.sh line 60: chk_rps "changing rps_default_mask doesn't affect existing netns" $NETNS lo 0 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: chk_rps "changing rps_default_mask doesn't affect existing netns" "$NETNS" lo 0 In rps_default_mask.sh line 62: ip link add name $VETH type veth peer netns $NETNS name $VETH ^---^ 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 link add name "$VETH" type veth peer netns "$NETNS" name "$VETH" In rps_default_mask.sh line 63: ip link set dev $VETH up ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$VETH" up In rps_default_mask.sh line 64: ip -n $NETNS link set dev $VETH 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 -n "$NETNS" link set dev "$VETH" up In rps_default_mask.sh line 65: chk_rps "changing rps_default_mask affects newly created devices" "" $VETH 3 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: chk_rps "changing rps_default_mask affects newly created devices" "" "$VETH" 3 In rps_default_mask.sh line 66: chk_rps "changing rps_default_mask doesn't affect newly child netns[II]" $NETNS $VETH 0 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: chk_rps "changing rps_default_mask doesn't affect newly child netns[II]" "$NETNS" "$VETH" 0 In rps_default_mask.sh line 67: ip link del dev $VETH ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link del dev "$VETH" In rps_default_mask.sh line 68: ip netns del $NETNS ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns del "$NETNS" In rps_default_mask.sh line 73: ip netns exec $NETNS sysctl -qw net.core.rps_default_mask=1 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$NETNS" sysctl -qw net.core.rps_default_mask=1 In rps_default_mask.sh line 74: ip link add name $VETH type veth peer netns $NETNS name $VETH ^---^ 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 link add name "$VETH" type veth peer netns "$NETNS" name "$VETH" In rps_default_mask.sh line 75: chk_rps "changing rps_default_mask in child ns doesn't affect the main one" "" lo $INITIAL_RPS_DEFAULT_MASK ^-----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: chk_rps "changing rps_default_mask in child ns doesn't affect the main one" "" lo "$INITIAL_RPS_DEFAULT_MASK" In rps_default_mask.sh line 76: chk_rps "changing rps_default_mask in child ns affects new childns devices" $NETNS $VETH 1 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: chk_rps "changing rps_default_mask in child ns affects new childns devices" "$NETNS" "$VETH" 1 In rps_default_mask.sh line 77: chk_rps "changing rps_default_mask in child ns doesn't affect existing devices" $NETNS lo 0 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: chk_rps "changing rps_default_mask in child ns doesn't affect existing devices" "$NETNS" lo 0 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 ...