Re: [PATCH net 2/2] selftests: net: Add bridge VLAN range grouping tests

Paolo Abeni <[email protected]>
Newsgroups gmane.linux.network.bridge
Message-ID <d3a43f4c-1b6e-4cac-a127-3e297fd6d224__27766.7283940659$1771932447$gmane$org@redhat.com>
On 2/24/26 9:00 AM, Simon Horman wrote:
> On Sun, Feb 22, 2026 at 10:53:38AM +0200, Danielle Ratson wrote:
>> 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 <[email protected]>
>> Reviewed-by: Petr Machata <[email protected]>
>> ---
>>  tools/testing/selftests/net/Makefile          |   1 +
>>  .../testing/selftests/net/bridge_vlan_dump.sh | 203 ++++++++++++++++++
>>  2 files changed, 204 insertions(+)
>>  create mode 100755 tools/testing/selftests/net/bridge_vlan_dump.sh
> 
> Hi Danielle,
> 
> I'm wondering if you could consider running running shellcheck over this
> and cleaning  things up a little.
> 
> I see SC2086 which I think can be trivially addressed.
> And SC2329, which I think would be best ignored using #shellcheck disable=SC2086

@Danielle: please address the shellcheck-reported issues. We are trying
to avoid them in the new code, and with time we will hopefully achieve
code consistency.

You can use the ingest_mdir.py script from
https://github.com/linux-netdev/nipa/ to automate the shellcheck test
before submission.

Thanks,

Paolo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.