[dpdk-dev,v4,03/17] test/eventdev: rework timeout ticks test

Message ID 1489175012-101439-4-git-send-email-harry.van.haaren@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Jerin Jacob
Headers

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Van Haaren, Harry March 10, 2017, 7:43 p.m. UTC
  This commit reworks the failing of the timeout_ticks
test to pass when -ENOTSUP is returned, as this is a valid
return if the PMD does not support waiting on dequeue().

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 app/test/test_eventdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Patch

diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c
index 324ef5a..2ab51c3 100644
--- a/app/test/test_eventdev.c
+++ b/app/test/test_eventdev.c
@@ -519,7 +519,9 @@  test_eventdev_timeout_ticks(void)
 	uint64_t timeout_ticks;
 
 	ret = rte_event_dequeue_timeout_ticks(TEST_DEV_ID, 100, &timeout_ticks);
-	TEST_ASSERT_SUCCESS(ret, "Fail to get timeout_ticks");
+	/* -ENOTSUP is a valid return if timeout is not supported by device  */
+	if (ret != -ENOTSUP)
+		TEST_ASSERT_SUCCESS(ret, "Fail to get timeout_ticks");
 
 	return TEST_SUCCESS;
 }