| #
09e702ad |
| 30-Mar-2026 |
Mark Johnston <markj@FreeBSD.org> |
tests: Add some simple regression tests for ip_mroute
These use atf_python to create a number of hosts linked to a router. The router runs pimd (for IPv4) or ip6_mrouter (simplistic IPv6 multicast r
tests: Add some simple regression tests for ip_mroute
These use atf_python to create a number of hosts linked to a router. The router runs pimd (for IPv4) or ip6_mrouter (simplistic IPv6 multicast router that I wrote since I couldn't find one in the ports tree). The vnet_host*_handler() methods are invoked in different VNET jails connected to the router; they register the connected epair with a multicast group and verify that they can send messages to each other.
The tests are synchronized by sending messages over a unix domain socket. The flow is something like: 1) test startup_method() is called, the unix socket is created, 2) the superclass creates jails and links them together using the declared topology, 3) we wait for all child jails to start up and send a message on the unix socket indicating that they are ready 4) we start the routing daemon in the main jail, 5) the test actually starts; starttest() kicks off the vnet_host*_handlers(), which mostly just verify that they can send messages to each other using multicast packets 6) once they finish running, they signal their completion, and waittest() returns once they're all done
There are two tests, repeated for v4 and v6. One just exchanges packets between two hosts, and the other has four hosts divided across two FIBs.
MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55244
show more ...
|