Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: mlxsw: Adjust test regarding VID 1

Previous patches made it possible to create VLAN devices with VID 1 over
mlxsw ports. Adjust the test to verify such an operation succeeds.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Ido Schimmel and committed by
David S. Miller
29b1e34e d8a1f7ab

+8 -5
+8 -5
tools/testing/selftests/drivers/net/mlxsw/rtnetlink.sh
··· 255 255 256 256 vlan_1_test() 257 257 { 258 - # Test that VLAN 1 cannot be configured, as it is used internally for 259 - # untagged traffic. See commit 47bf9df2e820 ("mlxsw: spectrum: Forbid 260 - # creation of VLAN 1 over port/LAG") for more details 258 + # Test that VLAN 1 can be configured over mlxsw ports. In the past it 259 + # was used internally for untagged traffic. See commit 47bf9df2e820 260 + # ("mlxsw: spectrum: Forbid creation of VLAN 1 over port/LAG") for more 261 + # details 261 262 RET=0 262 263 263 - ip link add link $swp1 name $swp1.1 type vlan id 1 &> /dev/null 264 - check_fail $? "managed to create vlan 1 when should not" 264 + ip link add link $swp1 name $swp1.1 type vlan id 1 265 + check_err $? "did not manage to create vlan 1 when should" 265 266 266 267 log_test "vlan 1" 268 + 269 + ip link del dev $swp1.1 267 270 } 268 271 269 272 lag_bridge_upper_test()