On 08/12/2022 17:28, Ido Schimmel wrote: > Add a selftests that includes the following test cases: > > 1. Configuration tests. Both valid and invalid configurations are > tested across all entry types (e.g., L2, IPv4). > > 2. Forwarding tests. Both host and port group entries are tested across > all entry types. > > 3. Interaction between user installed MDB entries and IGMP / MLD control > packets. > > Example output: > > INFO: # Host entries configuration tests > TEST: Common host entries configuration tests (IPv4) [ OK ] > TEST: Common host entries configuration tests (IPv6) [ OK ] > TEST: Common host entries configuration tests (L2) [ OK ] > > INFO: # Port group entries configuration tests - (*, G) > TEST: Common port group entries configuration tests (IPv4 (*, G)) [ OK ] > TEST: Common port group entries configuration tests (IPv6 (*, G)) [ OK ] > TEST: IPv4 (*, G) port group entries configuration tests [ OK ] > TEST: IPv6 (*, G) port group entries configuration tests [ OK ] > > INFO: # Port group entries configuration tests - (S, G) > TEST: Common port group entries configuration tests (IPv4 (S, G)) [ OK ] > TEST: Common port group entries configuration tests (IPv6 (S, G)) [ OK ] > TEST: IPv4 (S, G) port group entries configuration tests [ OK ] > TEST: IPv6 (S, G) port group entries configuration tests [ OK ] > > INFO: # Port group entries configuration tests - L2 > TEST: Common port group entries configuration tests (L2 (*, G)) [ OK ] > TEST: L2 (*, G) port group entries configuration tests [ OK ] > > INFO: # Forwarding tests > TEST: IPv4 host entries forwarding tests [ OK ] > TEST: IPv6 host entries forwarding tests [ OK ] > TEST: L2 host entries forwarding tests [ OK ] > TEST: IPv4 port group "exclude" entries forwarding tests [ OK ] > TEST: IPv6 port group "exclude" entries forwarding tests [ OK ] > TEST: IPv4 port group "include" entries forwarding tests [ OK ] > TEST: IPv6 port group "include" entries forwarding tests [ OK ] > TEST: L2 port entries forwarding tests [ OK ] > > INFO: # Control packets tests > TEST: IGMPv3 MODE_IS_INCLUE tests [ OK ] > TEST: MLDv2 MODE_IS_INCLUDE tests [ OK ] > > Signed-off-by: Ido Schimmel <idosch@xxxxxxxxxx> > --- > .../testing/selftests/net/forwarding/Makefile | 1 + > .../selftests/net/forwarding/bridge_mdb.sh | 1164 +++++++++++++++++ > 2 files changed, 1165 insertions(+) > create mode 100755 tools/testing/selftests/net/forwarding/bridge_mdb.sh > Nice set of tests! Acked-by: Nikolay Aleksandrov <razor@xxxxxxxxxxxxx>