odp_queue_capability() returns max_queues which may be more than 64K. Use malloc to allocate an array of queue handles to test the ability to create max_queues to avoid limiting the test to 64K queues.
Signed-off-by: Bill Fischofer <[email protected]> --- test/validation/queue/queue.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/validation/queue/queue.c b/test/validation/queue/queue.c index c21897b..9af8c9c 100644 --- a/test/validation/queue/queue.c +++ b/test/validation/queue/queue.c @@ -11,7 +11,6 @@ #define MAX_BUFFER_QUEUE (8) #define MSG_POOL_SIZE (4 * 1024 * 1024) #define CONFIG_MAX_ITERATION (100) -#define MAX_QUEUES (64 * 1024) static int queue_context = 0xff; static odp_pool_t pool; @@ -55,7 +54,7 @@ void queue_test_capa(void) odp_queue_capability_t capa; odp_queue_param_t qparams; char name[ODP_QUEUE_NAME_LEN]; - odp_queue_t queue[MAX_QUEUES]; + odp_queue_t *queue; int num_queues, i; memset(&capa, 0, sizeof(odp_queue_capability_t)); @@ -71,10 +70,9 @@ void queue_test_capa(void) name[ODP_QUEUE_NAME_LEN - 1] = 0; - if (capa.max_queues > MAX_QUEUES) - num_queues = MAX_QUEUES; - else - num_queues = capa.max_queues; + num_queues = capa.max_queues; + queue = malloc(num_queues * sizeof(odp_queue_t)); + CU_ASSERT_FATAL(queue != NULL); odp_queue_param_init(&qparams); @@ -93,6 +91,8 @@ void queue_test_capa(void) for (i = 0; i < num_queues; i++) CU_ASSERT(odp_queue_destroy(queue[i]) == 0); + + free(queue); } void queue_test_mode(void) -- 2.7.4 _______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
