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.30nzG4e2LB and /tmp/tmp.amznkPW1Fl Tree base: d512279d1164 ("net: vlan: fix VLAN 0 refcount imbalance of toggling filtering during runtime") Now at: 6156e8fa681e ("selftests: Add test cases for vlan_filter modification during runtime") ====== Checking before the patch ====== Checking tools/testing/selftests/net/vlan_hw_filter.sh - 7aa6c1351c66be9d25d745325fb3c72ea5cdb54770badc08ac6bc22936ae32d8 In vlan_hw_filter.sh line 4: readonly NETNS="ns-$(mktemp -u XXXXXX)" ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In vlan_hw_filter.sh line 9: ip netns del $NETNS ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns del "$NETNS" In vlan_hw_filter.sh line 15: echo "ERROR: ${1:-unexpected return code} (ret: $_)" >&2 ^-- SC3028 (warning): In POSIX sh, _ is undefined. In vlan_hw_filter.sh line 19: ip netns add ${NETNS} ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns add "${NETNS}" In vlan_hw_filter.sh line 20: ip netns exec ${NETNS} ip link add bond0 type bond mode 0 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link add bond0 type bond mode 0 In vlan_hw_filter.sh line 21: ip netns exec ${NETNS} ip link add bond_slave_1 type veth peer veth2 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link add bond_slave_1 type veth peer veth2 In vlan_hw_filter.sh line 22: ip netns exec ${NETNS} ip link set bond_slave_1 master bond0 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link set bond_slave_1 master bond0 In vlan_hw_filter.sh line 23: ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter off ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ethtool -K bond0 rx-vlan-filter off In vlan_hw_filter.sh line 24: ip netns exec ${NETNS} ip link add link bond_slave_1 name bond_slave_1.0 type vlan id 0 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link add link bond_slave_1 name bond_slave_1.0 type vlan id 0 In vlan_hw_filter.sh line 25: ip netns exec ${NETNS} ip link add link bond0 name bond0.0 type vlan id 0 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link add link bond0 name bond0.0 type vlan id 0 In vlan_hw_filter.sh line 26: ip netns exec ${NETNS} ip link set bond_slave_1 nomaster ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link set bond_slave_1 nomaster In vlan_hw_filter.sh line 27: ip netns exec ${NETNS} ip link del veth2 || fail "Please check vlan HW filter function" ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link del veth2 || fail "Please check vlan HW filter function" For more information: https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC3028 -- In POSIX sh, _ is undefined. https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/vlan_hw_filter.sh - 7aa6c1351c66be9d25d745325fb3c72ea5cdb54770badc08ac6bc22936ae32d8 In vlan_hw_filter.sh line 4: readonly NETNS="ns-$(mktemp -u XXXXXX)" ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In vlan_hw_filter.sh line 17: ip netns add ${NETNS} ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns add "${NETNS}" In vlan_hw_filter.sh line 21: ip netns del $NETNS 2>/dev/null ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns del "$NETNS" 2>/dev/null In vlan_hw_filter.sh line 27: echo "ERROR: ${1:-unexpected return code} (ret: $_)" >&2 ^-- SC3028 (warning): In POSIX sh, _ is undefined. In vlan_hw_filter.sh line 33: local current_test ^----------------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In vlan_hw_filter.sh line 41: ip netns exec ${NETNS} ip link add bond0 type bond mode 0 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link add bond0 type bond mode 0 In vlan_hw_filter.sh line 42: ip netns exec ${NETNS} ip link add bond_slave_1 type veth peer veth2 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link add bond_slave_1 type veth peer veth2 In vlan_hw_filter.sh line 43: ip netns exec ${NETNS} ip link set bond_slave_1 master bond0 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link set bond_slave_1 master bond0 In vlan_hw_filter.sh line 44: ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter off ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ethtool -K bond0 rx-vlan-filter off In vlan_hw_filter.sh line 45: ip netns exec ${NETNS} ip link add link bond_slave_1 name bond_slave_1.0 type vlan id 0 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link add link bond_slave_1 name bond_slave_1.0 type vlan id 0 In vlan_hw_filter.sh line 46: ip netns exec ${NETNS} ip link add link bond0 name bond0.0 type vlan id 0 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link add link bond0 name bond0.0 type vlan id 0 In vlan_hw_filter.sh line 47: ip netns exec ${NETNS} ip link set bond_slave_1 nomaster ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link set bond_slave_1 nomaster In vlan_hw_filter.sh line 48: ip netns exec ${NETNS} ip link del veth2 || fail "Please check vlan HW filter function" ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link del veth2 || fail "Please check vlan HW filter function" In vlan_hw_filter.sh line 55: ip netns exec ${NETNS} ip link add bond0 type bond mode 0 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link add bond0 type bond mode 0 In vlan_hw_filter.sh line 56: ip netns exec ${NETNS} ip link add link bond0 name vlan0 type vlan id 0 protocol 802.1q ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link add link bond0 name vlan0 type vlan id 0 protocol 802.1q In vlan_hw_filter.sh line 57: ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter off ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ethtool -K bond0 rx-vlan-filter off In vlan_hw_filter.sh line 58: ip netns exec ${NETNS} ifconfig bond0 up ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ifconfig bond0 up In vlan_hw_filter.sh line 59: ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter on ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ethtool -K bond0 rx-vlan-filter on In vlan_hw_filter.sh line 60: ip netns exec ${NETNS} ifconfig bond0 down ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ifconfig bond0 down In vlan_hw_filter.sh line 61: ip netns exec ${NETNS} ifconfig bond0 up ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ifconfig bond0 up In vlan_hw_filter.sh line 62: ip netns exec ${NETNS} ip link del vlan0 || fail "Please check vlan HW filter function" ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link del vlan0 || fail "Please check vlan HW filter function" In vlan_hw_filter.sh line 69: ip netns exec ${NETNS} ip link add bond0 type bond mode 0 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link add bond0 type bond mode 0 In vlan_hw_filter.sh line 70: ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter off ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ethtool -K bond0 rx-vlan-filter off In vlan_hw_filter.sh line 71: ip netns exec ${NETNS} ifconfig bond0 up ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ifconfig bond0 up In vlan_hw_filter.sh line 72: ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter on ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ethtool -K bond0 rx-vlan-filter on In vlan_hw_filter.sh line 73: ip netns exec ${NETNS} ip link add link bond0 name vlan0 type vlan id 0 protocol 802.1q ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link add link bond0 name vlan0 type vlan id 0 protocol 802.1q In vlan_hw_filter.sh line 74: ip netns exec ${NETNS} ifconfig bond0 down ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ifconfig bond0 down In vlan_hw_filter.sh line 75: ip netns exec ${NETNS} ifconfig bond0 up ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ifconfig bond0 up In vlan_hw_filter.sh line 76: ip netns exec ${NETNS} ip link del vlan0 || fail "Please check vlan HW filter function" ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link del vlan0 || fail "Please check vlan HW filter function" In vlan_hw_filter.sh line 84: ip netns exec ${NETNS} ip link add bond0 type bond mode 0 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link add bond0 type bond mode 0 In vlan_hw_filter.sh line 85: ip netns exec ${NETNS} ip link add link bond0 name vlan0 type vlan id 0 protocol 802.1q ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link add link bond0 name vlan0 type vlan id 0 protocol 802.1q In vlan_hw_filter.sh line 86: ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter off ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ethtool -K bond0 rx-vlan-filter off In vlan_hw_filter.sh line 87: ip netns exec ${NETNS} ifconfig bond0 up ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ifconfig bond0 up In vlan_hw_filter.sh line 88: ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter on ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ethtool -K bond0 rx-vlan-filter on In vlan_hw_filter.sh line 89: ip netns exec ${NETNS} ifconfig bond0 down ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ifconfig bond0 down In vlan_hw_filter.sh line 90: ip netns exec ${NETNS} ip link del vlan0 || fail "Please check vlan HW filter function" ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link del vlan0 || fail "Please check vlan HW filter function" In vlan_hw_filter.sh line 96: ip netns exec ${NETNS} ip link add bond0 up type bond mode 0 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link add bond0 up type bond mode 0 In vlan_hw_filter.sh line 97: ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter off ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ethtool -K bond0 rx-vlan-filter off In vlan_hw_filter.sh line 98: ip netns exec ${NETNS} ip link del dev bond0 || fail "Please check vlan HW filter function" ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NETNS}" ip link del dev bond0 || fail "Please check vlan HW filter function" For more information: https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC3028 -- In POSIX sh, _ is undefined. https://www.shellcheck.net/wiki/SC3043 -- In POSIX sh, 'local' is undefined.