From c023a28d48df507d20c98975a5d3fe2ce906afcc Mon Sep 17 00:00:00 2001 From: Jerin Jacob Date: Fri, 3 Mar 2017 22:58:20 +0530 Subject: [PATCH] test/eventdev: add remaining tests based on existing helpers Add the following tests based existing helper functions - Queue based producer-consumer ingress order test - Run existing queue and flow based ordering test in dequeue timeout mode Signed-off-by: Jerin Jacob Acked-by: Harry van Haaren --- test/test/test_eventdev_octeontx.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/test/test_eventdev_octeontx.c b/test/test/test_eventdev_octeontx.c index 0ea094b9ad..033744f517 100644 --- a/test/test/test_eventdev_octeontx.c +++ b/test/test/test_eventdev_octeontx.c @@ -244,6 +244,12 @@ eventdev_setup_priority(void) return _eventdev_setup(TEST_EVENTDEV_SETUP_PRIORITY); } +static inline int +eventdev_setup_dequeue_timeout(void) +{ + return _eventdev_setup(TEST_EVENTDEV_SETUP_DEQUEUE_TIMEOUT); +} + static inline void eventdev_teardown(void) { @@ -1300,6 +1306,14 @@ test_flow_producer_consumer_ingress_order_test(void) worker_flow_based_pipeline); } +/* Queue based producer consumer ingress order test */ +static int +test_queue_producer_consumer_ingress_order_test(void) +{ + return test_producer_consumer_ingress_order_test( + worker_group_based_pipeline); +} + static struct unit_test_suite eventdev_octeontx_testsuite = { .suite_name = "eventdev octeontx unit test suite", .setup = testsuite_setup, @@ -1365,6 +1379,13 @@ static struct unit_test_suite eventdev_octeontx_testsuite = { test_multi_port_mixed_max_stages_random_sched_type), TEST_CASE_ST(eventdev_setup, eventdev_teardown, test_flow_producer_consumer_ingress_order_test), + TEST_CASE_ST(eventdev_setup, eventdev_teardown, + test_queue_producer_consumer_ingress_order_test), + /* Tests with dequeue timeout */ + TEST_CASE_ST(eventdev_setup_dequeue_timeout, eventdev_teardown, + test_multi_port_flow_ordered_to_atomic), + TEST_CASE_ST(eventdev_setup_dequeue_timeout, eventdev_teardown, + test_multi_port_queue_ordered_to_atomic), TEST_CASES_END() /**< NULL terminate unit test array */ } }; -- 2.20.1