diff mbox series

[API-NEXT,v6,1/3] test: validation: drop use of indefinite wait in pktio test

Message ID 1516896022-8965-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v6,1/3] test: validation: drop use of indefinite wait in pktio test | expand

Commit Message

Github ODP bot Jan. 25, 2018, 4 p.m. UTC
From: Bill Fischofer <bill.fischofer@linaro.org>


Drop use of deprecated ODP_PKTIN_WAIT timeout option in pktio
tests.

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

---
/** Email created from pull request 410 (Bill-Fischofer-Linaro:pktio-dropwait)
 ** https://github.com/Linaro/odp/pull/410
 ** Patch: https://github.com/Linaro/odp/pull/410.patch
 ** Base sha: 44974a09b01c79adb9637a5dff38539598a76737
 ** Merge commit sha: 50db898f5d832f31dfc63c6fc1360a29e700bdb4
 **/
 test/validation/api/pktio/pktio.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/test/validation/api/pktio/pktio.c b/test/validation/api/pktio/pktio.c
index c144294b5..6592b2600 100644
--- a/test/validation/api/pktio/pktio.c
+++ b/test/validation/api/pktio/pktio.c
@@ -554,10 +554,8 @@  static int recv_packets_tmo(odp_pktio_t pktio, odp_packet_t pkt_tbl[],
 			CU_ASSERT(from_val < (unsigned)num_q);
 	} while (num_rx < num);
 
-	if (tmo == ODP_PKTIN_WAIT)
-		CU_ASSERT(num_rx == num);
 	if (num_rx < num)
-		CU_ASSERT(odp_time_to_ns(odp_time_diff(ts2, ts1)) >=  ns);
+		CU_ASSERT(odp_time_diff_ns(ts2, ts1) >= ns);
 
 	return num_rx;
 }
@@ -981,7 +979,7 @@  static void test_recv_tmo(recv_tmo_mode_e mode)
 	CU_ASSERT_FATAL(ret == test_pkt_count);
 
 	ret = recv_packets_tmo(pktio_rx, &pkt_tbl[0], &pkt_seq[0], 1, mode,
-			       ODP_PKTIN_WAIT, 0);
+			       odp_pktin_wait_time(UINT64_MAX), 0);
 	CU_ASSERT_FATAL(ret == 1);
 
 	ret = recv_packets_tmo(pktio_rx, &pkt_tbl[1], &pkt_seq[1], 1, mode,