Page MenuHomeFreeBSD

tests: Add some simple regression tests for ip_mroute
Needs ReviewPublic

Authored by markj on Tue, Feb 10, 10:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Feb 11, 8:56 AM
Unknown Object (File)
Wed, Feb 11, 8:45 AM
Unknown Object (File)
Wed, Feb 11, 2:30 AM
Unknown Object (File)
Wed, Feb 11, 2:06 AM
Unknown Object (File)
Wed, Feb 11, 1:29 AM

Details

Reviewers
None
Group Reviewers
network
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 70606
Build 67489: arc lint + arc unit