[API-NEXT,v2,4/15] validation: packet: verify odp_packet_l2_type()

Message ID 1519236011-14987-5-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series
  • [API-NEXT,v2,1/15] api: don't create special case for the tunnel-dummy packets
Related show

Commit Message

Github ODP bot Feb. 21, 2018, 6 p.m.
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 494 (lumag:ipsec-tfc-imp)
 ** https://github.com/Linaro/odp/pull/494
 ** Patch: https://github.com/Linaro/odp/pull/494.patch
 ** Base sha: ea2afab619ae74108a03798bc358fdfcd29fdd88
 ** Merge commit sha: 0b6ae2680a00027c3958ebcafbbcf92642a68f5e
 **/
 test/validation/api/packet/packet.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Patch

diff --git a/test/validation/api/packet/packet.c b/test/validation/api/packet/packet.c
index f829d0cb1..91e69204e 100644
--- a/test/validation/api/packet/packet.c
+++ b/test/validation/api/packet/packet.c
@@ -2552,6 +2552,8 @@  void packet_test_parse(void)
 		CU_ASSERT(odp_packet_has_udp(pkt[i]));
 		CU_ASSERT(!odp_packet_has_ipv6(pkt[i]));
 		CU_ASSERT(!odp_packet_has_tcp(pkt[i]));
+		CU_ASSERT_EQUAL(odp_packet_l2_type(pkt[i]),
+				ODP_PROTO_L2_TYPE_ETH);
 		CU_ASSERT_EQUAL(odp_packet_l3_type(pkt[i]),
 				ODP_PROTO_L3_TYPE_IPV4);
 		CU_ASSERT_EQUAL(odp_packet_l4_type(pkt[i]),
@@ -2620,6 +2622,8 @@  void packet_test_parse(void)
 		CU_ASSERT(odp_packet_has_tcp(pkt[i]));
 		CU_ASSERT(!odp_packet_has_ipv6(pkt[i]));
 		CU_ASSERT(!odp_packet_has_udp(pkt[i]));
+		CU_ASSERT_EQUAL(odp_packet_l2_type(pkt[i]),
+				ODP_PROTO_L2_TYPE_ETH);
 		CU_ASSERT_EQUAL(odp_packet_l3_type(pkt[i]),
 				ODP_PROTO_L3_TYPE_IPV4);
 		CU_ASSERT_EQUAL(odp_packet_l4_type(pkt[i]),
@@ -2655,6 +2659,8 @@  void packet_test_parse(void)
 		CU_ASSERT(odp_packet_has_udp(pkt[i]));
 		CU_ASSERT(!odp_packet_has_ipv4(pkt[i]));
 		CU_ASSERT(!odp_packet_has_tcp(pkt[i]));
+		CU_ASSERT_EQUAL(odp_packet_l2_type(pkt[i]),
+				ODP_PROTO_L2_TYPE_ETH);
 		CU_ASSERT_EQUAL(odp_packet_l3_type(pkt[i]),
 				ODP_PROTO_L3_TYPE_IPV6);
 		CU_ASSERT_EQUAL(odp_packet_l4_type(pkt[i]),
@@ -2690,6 +2696,8 @@  void packet_test_parse(void)
 		CU_ASSERT(odp_packet_has_tcp(pkt[i]));
 		CU_ASSERT(!odp_packet_has_ipv4(pkt[i]));
 		CU_ASSERT(!odp_packet_has_udp(pkt[i]));
+		CU_ASSERT_EQUAL(odp_packet_l2_type(pkt[i]),
+				ODP_PROTO_L2_TYPE_ETH);
 		CU_ASSERT_EQUAL(odp_packet_l3_type(pkt[i]),
 				ODP_PROTO_L3_TYPE_IPV6);
 		CU_ASSERT_EQUAL(odp_packet_l4_type(pkt[i]),