On 02/06/17 18:01, Mike Holmes wrote:
> On 6 February 2017 at 09:55, Maxim Uvarov <[email protected]> wrote:
>> On 02/06/17 17:49, Savolainen, Petri (Nokia - FI/Espoo) wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: lng-odp [mailto:[email protected]] On Behalf Of Mike
>>>> Holmes
>>>> Sent: Monday, February 06, 2017 4:41 PM
>>>> To: Maxim Uvarov <[email protected]>
>>>> Cc: lng-odp <[email protected]>
>>>> Subject: Re: [lng-odp] [PATCH 05/10] validation: packet: print reason for
>>>> suite init failure
>>>>
>>>> On 6 February 2017 at 09:34, Maxim Uvarov <[email protected]> wrote:
>>>>> On 02/06/17 15:37, Petri Savolainen wrote:
>>>>>> Knowing the reason for suite init function failure helps in
>>>>>> debugging.
>>>>>>
>>>>>> Signed-off-by: Petri Savolainen <[email protected]>
>>>>>> ---
>>>>>>  test/common_plat/validation/api/packet/packet.c | 23
>>>> ++++++++++++++++++-----
>>>>>>  1 file changed, 18 insertions(+), 5 deletions(-)
>>>>>>
>>>>>> diff --git a/test/common_plat/validation/api/packet/packet.c
>>>> b/test/common_plat/validation/api/packet/packet.c
>>>>>> index fa5206f..e3d28f6 100644
>>>>>> --- a/test/common_plat/validation/api/packet/packet.c
>>>>>> +++ b/test/common_plat/validation/api/packet/packet.c
>>>>>> @@ -110,8 +110,10 @@ int packet_suite_init(void)
>>>>>>       uint8_t data = 0;
>>>>>>       uint32_t i;
>>>>>>
>>>>>> -     if (odp_pool_capability(&capa) < 0)
>>>>>> +     if (odp_pool_capability(&capa) < 0) {
>>>>>> +             printf("pool_capability failed\n");
>>>>
>>>> We have defined LOG_DBG in test_debug.h, shoudl we be using that ?
>>>>
>>>
>>> All other xxx_suite_init() just use printf() or don't print at all. This is 
>>> just applying the current practice.
>>>
>>> -Petri
>>>
>>>
>>
>> LOG_ for implementation only, not for tests.
> 
> That is not true currently, but happy if we delete the current cases
> or document why we pick  either method.
> 
> common_plat/validation/api/system/system.c:
> LOG_DBG("\nBAD VERSION=%s\n", version_string);
> common_plat/validation/api/timer/timer.c:       LOG_DBG("Timer handle:
> %" PRIu64 "\n", odp_timer_to_u64(tim));
> common_plat/validation/api/timer/timer.c:       LOG_DBG("Timeout
> handle: %" PRIu64 "\n", odp_timeout_to_u64(tmo));
> common_plat/validation/api/timer/timer.c:
> LOG_DBG("Wrong tick: expected %" PRIu64
> common_plat/validation/api/timer/timer.c:
> LOG_DBG("Too late tick: %" PRIu64
> common_plat/validation/api/timer/timer.c:
> LOG_DBG("Failed to allocate timeout (%" PRIu32 "/%d)\n",
> common_plat/validation/api/timer/timer.c:
> LOG_DBG("Failed to allocate timer
> ....
> 
> 
> I think we should be consistent, looks like there are two standards,
> some with printf


unbelievable LOG_ are defined in test/test_debug.h
In that case we should use them in tests.

Maxim.

> 
>>
>>
>> Maxim.
>>
> 
> 
> 

Reply via email to