Add tests to make sure:
- Default metric is enforced.
- Lowest metric wins.
- Deleting routes by specifying gateway/metric works.
Depends on D57011
Differential D57016
routing: Add tests for metric Authored by pouria on May 15 2026, 2:09 PM. Tags None Referenced Files
Details
Add tests to make sure:
Depends on D57011 # kyua test -k /usr/tests/Kyuafile sys/net/routing/test_routing sys/net/routing/test_routing:add_default_metric -> passed [0.084s] sys/net/routing/test_routing:add_lowest_metric -> passed [0.111s] sys/net/routing/test_routing:delete_route_with_metric -> passed [0.174s] Results file id is usr_tests.20260515-140531-295066 Results saved to /root/.kyua/store/results.usr_tests.20260515-140531-295066.db 3/3 passed (0 broken, 0 failed, 0 skipped)
Diff Detail
Event TimelineComment Actions All of these tests create a single jail and operate on it. But we could instead use execenv=jail and get kyua to create the VNET jail for us. Then:
Comment Actions Remove mkjail for each test and add execenv=jail to Makefile. Comment Actions It seems the main goal here was not about parallelism, so maybe it's not so important, but I just wanted to mention that the newly added test cases are still marked as exclusive as the Makefile makes it so for all of them: # cat /usr/tests/sys/net/routing/Kyuafile
-- Automatically generated by bsd.test.mk.
syntax(2)
test_suite("FreeBSD")
atf_test_program{name="test_routing", is_exclusive=true, execenv="jail", execenv_jail_params="vnet"}
atf_test_program{name="test_routing_l3.py", is_exclusive=true, required_programs="pytest"}
atf_test_program{name="test_rtsock_l3", is_exclusive=true}
atf_test_program{name="test_rtsock_lladdr", is_exclusive=true}
atf_test_program{name="test_rtsock_multipath.py", is_exclusive=true, required_programs="pytest"}
atf_test_program{name="test_rtsock_ops", is_exclusive=true}Comment Actions Good catch, I suspect that the is_exclusive annotation can be removed. I will try this. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||