|
36 | 36 | #include "unit_tests_ip_arp_recv.c" |
37 | 37 | #include "unit_tests_dns_edges.c" |
38 | 38 | #include "unit_tests_misc_edges.c" |
| 39 | +#include "unit_tests_vlan.c" |
39 | 40 |
|
40 | 41 | Suite *wolf_suite(void) |
41 | 42 | { |
@@ -1481,6 +1482,44 @@ Suite *wolf_suite(void) |
1481 | 1482 | #endif /* WOLFIP_PACKET_SOCKETS */ |
1482 | 1483 | tcase_add_test(tc_core, test_bind_port_in_use_different_ips_no_collision); |
1483 | 1484 |
|
| 1485 | +#if WOLFIP_VLAN |
| 1486 | + /* --- unit_tests_vlan.c (30 tests for 802.1Q support) --- */ |
| 1487 | + tcase_add_test(tc_proto, test_vlan_api_create_basic); |
| 1488 | + tcase_add_test(tc_proto, test_vlan_api_create_vid_max_ok); |
| 1489 | + tcase_add_test(tc_proto, test_vlan_api_create_vid_4095_rejected); |
| 1490 | + tcase_add_test(tc_proto, test_vlan_api_create_vid_above_max_rejected); |
| 1491 | + tcase_add_test(tc_proto, test_vlan_api_create_pcp_above_7_rejected); |
| 1492 | + tcase_add_test(tc_proto, test_vlan_api_create_dei_above_1_rejected); |
| 1493 | + tcase_add_test(tc_proto, test_vlan_api_create_duplicate_vid_rejected); |
| 1494 | + tcase_add_test(tc_proto, test_vlan_api_create_same_vid_two_parents_ok); |
| 1495 | + tcase_add_test(tc_proto, test_vlan_api_create_parent_not_physical_rejected); |
| 1496 | + tcase_add_test(tc_proto, test_vlan_api_create_exhausts_max); |
| 1497 | + tcase_add_test(tc_proto, test_vlan_api_create_uninitialized_parent_rejected); |
| 1498 | + tcase_add_test(tc_proto, test_vlan_api_create_loopback_parent_rejected); |
| 1499 | + tcase_add_test(tc_proto, test_vlan_api_create_null_args_rejected); |
| 1500 | + tcase_add_test(tc_proto, test_vlan_api_delete_basic); |
| 1501 | + tcase_add_test(tc_proto, test_vlan_api_delete_physical_rejected); |
| 1502 | + tcase_add_test(tc_proto, test_vlan_api_delete_bad_ifidx_rejected); |
| 1503 | + tcase_add_test(tc_proto, test_vlan_api_get_null_args_rejected); |
| 1504 | + tcase_add_test(tc_proto, test_vlan_api_get_dangling_parent_pointer_rejected); |
| 1505 | + tcase_add_test(tc_proto, test_vlan_tx_active_without_parent_rejected); |
| 1506 | + tcase_add_test(tc_proto, test_vlan_tx_tag_inserted); |
| 1507 | + tcase_add_test(tc_proto, test_vlan_tx_pcp_and_dei_encoded); |
| 1508 | + tcase_add_test(tc_proto, test_vlan_tx_vid_zero_priority_tag); |
| 1509 | + tcase_add_test(tc_proto, test_vlan_tx_vid_4094_encoded); |
| 1510 | + tcase_add_test(tc_proto, test_vlan_tx_oversize_rejected); |
| 1511 | + tcase_add_test(tc_proto, test_vlan_tx_runt_rejected); |
| 1512 | + tcase_add_test(tc_proto, test_vlan_rx_tagged_match_delivered); |
| 1513 | + tcase_add_test(tc_proto, test_vlan_rx_tagged_mismatch_dropped); |
| 1514 | + tcase_add_test(tc_proto, test_vlan_rx_untagged_on_physical_ok); |
| 1515 | + tcase_add_test(tc_proto, test_vlan_rx_runt_tagged_dropped); |
| 1516 | + tcase_add_test(tc_proto, test_vlan_rx_multiple_subs_correct_dispatch); |
| 1517 | + tcase_add_test(tc_proto, test_vlan_rx_delete_then_dropped); |
| 1518 | + tcase_add_test(tc_proto, test_vlan_rx_dei_bit_accepted); |
| 1519 | + tcase_add_test(tc_proto, test_vlan_rx_tagged_arp_processed); |
| 1520 | + tcase_add_test(tc_proto, test_vlan_mtu_inherited); |
| 1521 | +#endif /* WOLFIP_VLAN */ |
| 1522 | + |
1484 | 1523 | suite_add_tcase(s, tc_core); |
1485 | 1524 | suite_add_tcase(s, tc_utils); |
1486 | 1525 | suite_add_tcase(s, tc_proto); |
|
0 commit comments