]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: net: Add bridge VLAN range grouping tests
authorDanielle Ratson <danieller@nvidia.com>
Wed, 25 Feb 2026 14:39:56 +0000 (16:39 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 27 Feb 2026 03:24:29 +0000 (19:24 -0800)
commit13540021be228dcda63d02b2245ce8dad01d8473
tree154449f5c9df8448f45a12c7f6d4e2620ef86ebe
parent93c9475c04acad2457a7e7ea4e3ec40a6e6d94a7
selftests: net: Add bridge VLAN range grouping tests

Add a new test file bridge_vlan_dump.sh with four test cases that verify
VLANs with different per-VLAN options are not incorrectly grouped into
ranges in the dump output.

The tests verify the kernel's br_vlan_opts_eq_range() function correctly
prevents VLAN range grouping when neigh_suppress, mcast_max_groups,
mcast_n_groups, or mcast_enabled options differ.

Each test verifies that VLANs with different option values appear as
individual entries rather than ranges, and that VLANs with matching
values are properly grouped together.

Example output:

$ ./bridge_vlan_dump.sh
TEST: VLAN range grouping with neigh_suppress                       [ OK ]
TEST: VLAN range grouping with mcast_max_groups                     [ OK ]
TEST: VLAN range grouping with mcast_n_groups                       [ OK ]
TEST: VLAN range grouping with mcast_enabled                        [ OK ]

Signed-off-by: Danielle Ratson <danieller@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Link: https://patch.msgid.link/20260225143956.3995415-3-danieller@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/Makefile
tools/testing/selftests/net/bridge_vlan_dump.sh [new file with mode: 0755]