The purpose of this test is to validate that these can be set to
non-default values, hence the explicit initialization statements.

On Mon, Jul 13, 2015 at 6:29 AM, Maxim Uvarov <maxim.uva...@linaro.org>
wrote:

> On 07/10/15 22:46, Bill Fischofer wrote:
>
>> Add validation test coverage for the following APIs:
>> odp_queue_sched_group()
>> odp_queue_sched_prio()
>> odp_queue_sched_type()
>>
>> Signed-off-by: Bill Fischofer <bill.fischo...@linaro.org>
>> ---
>>   test/validation/queue/queue.c | 13 ++++++++++++-
>>   1 file changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/test/validation/queue/queue.c b/test/validation/queue/queue.c
>> index b700e88..5830d9b 100644
>> --- a/test/validation/queue/queue.c
>> +++ b/test/validation/queue/queue.c
>> @@ -51,9 +51,15 @@ static void queue_test_sunnydays(void)
>>         int nr_deq_entries = 0;
>>         int max_iteration = CONFIG_MAX_ITERATION;
>>         void *prtn = NULL;
>> +       odp_queue_param_t qparams;
>> +
>> +       odp_queue_param_init(&qparams);
>> +       qparams.sched.prio = ODP_SCHED_PRIO_LOWEST;
>> +       qparams.sched.sync = ODP_SCHED_SYNC_NONE;
>> +       qparams.sched.group = ODP_SCHED_GROUP_WORKER;
>>         queue_creat_id = odp_queue_create("test_queue",
>> -                                         ODP_QUEUE_TYPE_POLL, NULL);
>> +                                         ODP_QUEUE_TYPE_POLL, &qparams);
>>
>
> That is the same code as was before. But now we need 4 more lines of
> initialization. It looks like it's good to set default
> values inside odp_queue_param_init().
>
> Maxim.
>
>>         CU_ASSERT(ODP_QUEUE_INVALID != queue_creat_id);
>>         CU_ASSERT_EQUAL(ODP_QUEUE_TYPE_POLL,
>> @@ -62,6 +68,11 @@ static void queue_test_sunnydays(void)
>>         queue_id = odp_queue_lookup("test_queue");
>>         CU_ASSERT_EQUAL(queue_creat_id, queue_id);
>>   +     CU_ASSERT_EQUAL(ODP_SCHED_GROUP_WORKER,
>> +                       odp_queue_sched_group(queue_id));
>> +       CU_ASSERT_EQUAL(ODP_SCHED_PRIO_LOWEST,
>> odp_queue_sched_prio(queue_id));
>> +       CU_ASSERT_EQUAL(ODP_SCHED_SYNC_NONE,
>> odp_queue_sched_type(queue_id));
>> +
>>         CU_ASSERT(0 == odp_queue_set_context(queue_id, &queue_contest));
>>         prtn = odp_queue_get_context(queue_id);
>>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to