diff mbox series

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

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

Commit Message

Github ODP bot Jan. 22, 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: 5fba303faf04d29b616f687ce1f721400b2c6f9c
 ** Merge commit sha: d3ec5308bd5a6917dc91dee1860dab99bd6e9b15
 **/
 test/validation/api/pktio/pktio.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/test/validation/api/pktio/pktio.c b/test/validation/api/pktio/pktio.c
index c144294b5..5f9b11fd9 100644
--- a/test/validation/api/pktio/pktio.c
+++ b/test/validation/api/pktio/pktio.c
@@ -554,10 +554,7 @@  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(num_rx == num || odp_time_diff_ns(ts2, ts1) >= ns);
 
 	return num_rx;
 }
@@ -981,7 +978,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,