On 6 March 2015 at 13:27, Maxim Uvarov <[email protected]> wrote:
> On 03/06/15 12:40, Ola Liljedahl wrote:
>>
>> Free queue and timeouts, destroy timeout pool before termination.
>> https://bugs.linaro.org/show_bug.cgi?id=1285
>>
>> Signed-off-by: Ola Liljedahl <[email protected]>
>> ---
>> (This document/code contribution attached is provided under the terms of
>> agreement LES-LTM-21309)
>>
>> v2:
>> Removed reference to Linaro CARDS as this is internal.
>>
>> v3:
>> Added check of return value from odp_queue_destroy().
>>
>>   test/validation/odp_timer.c | 10 ++++++++++
>>   1 file changed, 10 insertions(+)
>>
>> diff --git a/test/validation/odp_timer.c b/test/validation/odp_timer.c
>> index 88af61b..4cb2379 100644
>> --- a/test/validation/odp_timer.c
>> +++ b/test/validation/odp_timer.c
>> @@ -336,6 +336,12 @@ static void *worker_entrypoint(void *arg)
>>         if (ev != ODP_EVENT_INVALID)
>>                 CU_FAIL("Unexpected event received");
>>   +     int rc = odp_queue_destroy(queue);
>
>
> can int rc go on top of the function?
Yes but why?

>>
>> +       CU_ASSERT(rc == 0);
>> +       for (i = 0; i < NTIMERS; i++) {
>> +               if (tt[i].ev != ODP_EVENT_INVALID)
>> +
>> odp_timeout_free(odp_timeout_from_event(tt[i].ev));
>> +       }
>>         LOG_DBG("Thread %u: exiting\n", thr);
>>         return NULL;
>>   }
>> @@ -426,6 +432,10 @@ static void test_odp_timer_all(void)
>>         /* Destroy timer pool, all timers must have been freed */
>>         odp_timer_pool_destroy(tp);
>>   +     /* Destroy timeout pool, all timeouts must have been freed */
>> +       int rc = odp_pool_destroy(tbp);
>
> same here.
>>
>> +       CU_ASSERT(rc == 0);
>> +
>>         CU_PASS("ODP timer test");
>>   }
>>
>
>
>
> _______________________________________________
> lng-odp mailing list
> [email protected]
> http://lists.linaro.org/mailman/listinfo/lng-odp

_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to