[v1,3/3] validation: cls: test cos_num_queue and cos_queues

Message ID 1518703206-19713-4-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • Add missing validation tests
Related show

Commit Message

Github ODP bot Feb. 15, 2018, 2 p.m.
From: Petri Savolainen <petri.savolainen@linaro.org>


Added single queue tests for cos_num_queue and cos_queues.
This way functions are called at least once from validation
test suite.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
/** Email created from pull request 484 (psavol:master-missing-validation)
 ** https://github.com/Linaro/odp/pull/484
 ** Patch: https://github.com/Linaro/odp/pull/484.patch
 ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847
 ** Merge commit sha: 595ea205e4c4680f6a9a674fbe637dcab24b038e
 **/
 test/validation/api/classification/odp_classification_basic.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/test/validation/api/classification/odp_classification_basic.c b/test/validation/api/classification/odp_classification_basic.c
index c31a7530e..20f073740 100644
--- a/test/validation/api/classification/odp_classification_basic.c
+++ b/test/validation/api/classification/odp_classification_basic.c
@@ -149,6 +149,7 @@  void classification_test_cos_set_queue(void)
 	odp_queue_t queue_cos;
 	odp_cos_t cos_queue;
 	odp_queue_t recvqueue;
+	odp_queue_t queue_out = ODP_QUEUE_INVALID;
 
 	pool = pool_create("cls_basic_pool");
 	CU_ASSERT_FATAL(pool != ODP_POOL_INVALID);
@@ -171,6 +172,9 @@  void classification_test_cos_set_queue(void)
 	CU_ASSERT(retval == 0);
 	recvqueue = odp_cos_queue(cos_queue);
 	CU_ASSERT(recvqueue == queue_cos);
+	CU_ASSERT(odp_cls_cos_num_queue(cos_queue) == 1);
+	CU_ASSERT(odp_cls_cos_queues(cos_queue, &queue_out, 1) == 1);
+	CU_ASSERT(queue_out == queue_cos);
 
 	odp_cos_destroy(cos_queue);
 	odp_queue_destroy(queue_cos);