This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via e9d434fd193e501ef9ca69f530ce4e5f9448594d (commit) via 50078445f1a944309fb88946582a2015fd098f6b (commit) from 8e6e5e999ce3d9edb704e18bedf6bc0ebc6ecf79 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit e9d434fd193e501ef9ca69f530ce4e5f9448594d Author: Bill Fischofer bill.fischofer@linaro.org Date: Wed Jun 29 06:59:43 2016 -0500
validation: queue: use malloc to avoid limits on max_queues
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. If this malloc fails then attempt a reduced test with 64K queues.
Signed-off-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/validation/queue/queue.c b/test/validation/queue/queue.c index 96941f4..2c8658e 100644 --- a/test/validation/queue/queue.c +++ b/test/validation/queue/queue.c @@ -55,7 +55,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; uint32_t num_queues, i;
memset(&capa, 0, sizeof(odp_queue_capability_t)); @@ -71,10 +71,15 @@ void queue_test_capa(void)
name[ODP_QUEUE_NAME_LEN - 1] = 0;
- if (capa.max_queues > MAX_QUEUES) + num_queues = capa.max_queues; + queue = malloc(num_queues * sizeof(odp_queue_t)); + if (queue == NULL) { + printf("Unable to alloc %d queues, trying with %d\n", + num_queues, MAX_QUEUES); num_queues = MAX_QUEUES; - else - 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 +98,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)
commit 50078445f1a944309fb88946582a2015fd098f6b Author: Bill Fischofer bill.fischofer@linaro.org Date: Wed Jun 29 06:59:41 2016 -0500
validation: queue: avoid out of bounds references
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2377 by correcting loop bounds for error case.
Signed-off-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/validation/queue/queue.c b/test/validation/queue/queue.c index be9c0dc..96941f4 100644 --- a/test/validation/queue/queue.c +++ b/test/validation/queue/queue.c @@ -84,7 +84,7 @@ void queue_test_capa(void)
if (queue[i] == ODP_QUEUE_INVALID) { CU_FAIL("Queue create failed"); - num_queues = i - 1; + num_queues = i; break; }
-----------------------------------------------------------------------
Summary of changes: test/validation/queue/queue.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
hooks/post-receive