To enable automated functional testing, `tests/sys/net/routing` has been created. Currently there are 23 tests, with 10-15 more to come.
Forwarding and output tests has been added to the tree (the latter is still under review in D24138 ),
To enable unit testing, `modules/tests/routing` has been created. Currently there are only 3 tests, with ~20 more to come.
```
13:08 [1] m@current s kyua test -k /usr/tests/sys/net/routing/Kyuafile
test_rtsock_l3:rtm_add_v4_gu_ifa_ordered_success -> passed [0.009s]
test_rtsock_l3:rtm_add_v4_gw_direct_success -> passed [0.006s]
test_rtsock_l3:rtm_add_v4_temporal1_success -> passed [0.017s]
test_rtsock_l3:rtm_add_v6_gu_gw_gu_direct_success -> passed [0.006s]
test_rtsock_l3:rtm_add_v6_gu_ifa_hostroute_success -> passed [0.006s]
test_rtsock_l3:rtm_add_v6_gu_ifa_ordered_success -> passed [0.007s]
test_rtsock_l3:rtm_add_v6_gu_ifa_prefixroute_success -> passed [0.006s]
test_rtsock_l3:rtm_add_v6_temporal1_success -> passed [0.014s]
test_rtsock_l3:rtm_del_v4_gu_ifa_prefixroute_success -> passed [0.008s]
test_rtsock_l3:rtm_del_v4_prefix_nogw_success -> passed [0.010s]
test_rtsock_l3:rtm_del_v6_gu_ifa_hostroute_success -> passed [0.010s]
test_rtsock_l3:rtm_del_v6_gu_ifa_prefixroute_success -> passed [0.011s]
test_rtsock_l3:rtm_del_v6_gu_prefix_nogw_success -> passed [0.006s]
test_rtsock_l3:rtm_get_v4_empty_dst_failure -> passed [0.002s]
test_rtsock_l3:rtm_get_v4_exact_success -> passed [0.007s]
test_rtsock_l3:rtm_get_v4_hostbits_failure -> passed [0.008s]
test_rtsock_l3:rtm_get_v4_lpm_success -> passed [0.008s]
test_rtsock_lladdr:rtm_add_v4_gu_lle_success -> passed [0.006s]
test_rtsock_lladdr:rtm_add_v6_gu_lle_success -> passed [0.005s]
test_rtsock_lladdr:rtm_add_v6_ll_lle_success -> passed [0.004s]
test_rtsock_lladdr:rtm_del_v4_gu_lle_success -> passed [0.006s]
test_rtsock_lladdr:rtm_del_v6_gu_lle_success -> passed [0.004s]
test_rtsock_lladdr:rtm_del_v6_ll_lle_success -> passed [0.004s]
forward6:fwd_ip6_gu_icmp_gw_gu_fast_success -> passed [3.226s]
forward6:fwd_ip6_gu_icmp_gw_gu_slow_success -> passed [2.919s]
forward6:fwd_ip6_gu_icmp_gw_ll_fast_success -> passed [3.023s]
forward6:fwd_ip6_gu_icmp_gw_ll_slow_success -> passed [2.800s]
forward6:fwd_ip6_gu_icmp_iface_fast_success -> passed [2.598s]
forward6:fwd_ip6_gu_icmp_iface_slow_success -> passed [2.784s]
output6:output6_raw_flowid_mpath_success -> passed [2.321s]
output6:output6_raw_success -> passed [2.012s]
output6:output6_tcp_flowid_mpath_success -> passed [2.558s]
output6:output6_tcp_setup_success -> passed [1.981s]
output6:output6_udp_flowid_mpath_success -> passed [4.790s]
output6:output6_udp_setup_success -> passed [3.052s]
forward:fwd_ip_icmp_gw_fast_success -> passed [1.179s]
forward:fwd_ip_icmp_gw_slow_success -> passed [1.149s]
forward:fwd_ip_icmp_iface_fast_success -> passed [1.145s]
forward:fwd_ip_icmp_iface_slow_success -> passed [1.154s]
output:output_raw_flowid_mpath_success -> passed [0.452s]
output:output_raw_success -> passed [0.070s]
output:output_tcp_flowid_mpath_success -> passed [1.784s]
output:output_tcp_setup_success -> passed [0.141s]
output:output_udp_flowid_mpath_success -> passed [9.037s]
output:output_udp_setup_success -> passed [1.319s]
```
```
Loaded /usr/obj/usr/home/melifaro/free/head/amd64.amd64/sys/modules/tests/routing/routing_test.ko, id=8
13:06 [1] m@current for s in `sysctl -N kern.test.routing`; do s sysctl $s=1 ; done
kern.test.routing.route_ctl.test_add_route_pinned_success: 0 -> 0
kern.test.routing.route_ctl.test_add_route_exist_fail: 0 -> 0
kern.test.routing.route_ctl.test_add_route_plain_add_success: 0 -> 0
dmesg
running item 2: test_add_route_pinned_success
done running item 2: test_add_route_pinned_success - ret 0
running item 1: test_add_route_exist_fail
done running item 1: test_add_route_exist_fail - ret 0
running item 0: test_add_route_plain_add_success
done running item 0: test_add_route_plain_add_success - ret 0
```