Page MenuHomeFreeBSD

tests: Add some simple regression tests for ip_mroute
ClosedPublic

Authored by markj on Feb 10 2026, 10:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 14, 10:16 PM
Unknown Object (File)
Fri, Mar 13, 4:21 AM
Unknown Object (File)
Wed, Mar 11, 10:11 AM
Unknown Object (File)
Sun, Mar 8, 10:27 AM
Unknown Object (File)
Sat, Mar 7, 10:15 AM
Unknown Object (File)
Feb 23 2026, 4:29 PM
Unknown Object (File)
Feb 21 2026, 3:26 AM
Unknown Object (File)
Feb 19 2026, 12:32 AM

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable