void test_flowinfo_mpls_unicast_label_adddel(void) { size_t s; TEST_ASSERT_OBJECTS(); /* The ptree should be clean. */ for (s = 0; s < ARRAY_LEN(test_flow); s++) { TEST_ASSERT_FLOWINFO_NOLABEL(flowinfo, TEST_LABEL(s), MPLS_LABEL_BITLEN, __func__); } /* Add MPLS label matches. */ for (s = 0; s < ARRAY_LEN(test_flow); s++) { FLOW_ADD_MPLS_LABEL_MATCH(test_flow[s], TEST_LABEL(s)); } /* Run the sideeffect-prone scenario. */ TEST_SCENARIO_FLOWINFO_SEP(flowinfo); /* Reset the matches. Mind the prerequisite. */ for (s = 0; s < ARRAY_LEN(test_flow); s++) { TAILQ_INIT(&test_flow[s]->match_list); FLOW_ADD_MPLS_UT_PREREQUISITE(test_flow[s]); } }
void test_flowinfo_ipv6_bare_adddel(void) { size_t s; TEST_ASSERT_OBJECTS(); /* No need to add any IPv6 matches. */ /* Run the sideeffect-prone scenario. */ TEST_SCENARIO_FLOWINFO_SEP(flowinfo); /* Reset the matches. Mind the prerequisite. */ for (s = 0; s < ARRAY_LEN(test_flow); s++) { TAILQ_INIT(&test_flow[s]->match_list); FLOW_ADD_IPV6_PREREQUISITE(test_flow[s]); } }
void test_flowinfo_eth_type_adddel(void) { size_t s; TEST_ASSERT_OBJECTS(); /* Add Ethernet type matches. */ for (s = 0; s < ARRAY_LEN(test_flow); s++) { FLOW_ADD_ETH_TYPE_MATCH(test_flow[s], TEST_ETH_TYPE(s)); } /* Run the sideeffect-prone scenario. */ TEST_SCENARIO_FLOWINFO_SEP(flowinfo); /* Delete the matches. */ for (s = 0; s < ARRAY_LEN(test_flow); s++) { TAILQ_INIT(&test_flow[s]->match_list); } }
void test_flowinfo_ipv6_proto_adddel(void) { size_t s; TEST_ASSERT_OBJECTS(); /* Add the IPv6 protocol matches. */ for (s = 0; s < ARRAY_LEN(test_flow); s++) { FLOW_ADD_IP_PROTO_MATCH(test_flow[s], TEST_IPV6_PROTO(s)); } /* Run the sideeffect-prone scenario. */ TEST_SCENARIO_FLOWINFO_SEP(flowinfo); /* Reset the matches. Mind the prerequisite. */ for (s = 0; s < ARRAY_LEN(test_flow); s++) { TAILQ_INIT(&test_flow[s]->match_list); FLOW_ADD_IPV6_PREREQUISITE(test_flow[s]); } }