diff mbox

[PATCHv2] validation: pktio: fix odp_errno usage

Message ID 1424954239-30354-1-git-send-email-taras.kondratiuk@linaro.org
State Accepted
Commit fdac7327486c4791f663f2ca56eac30aec59cb82
Headers show

Commit Message

Taras Kondratiuk Feb. 26, 2015, 12:37 p.m. UTC
__odp_errno is a private variable.
odp_errno() function should be used instead.

Also, until we have defined the set of standard ODP errno values,
just verify that odp_errno contains 'some' error.

Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
---
v2: don't check for an exact errno value

 test/validation/odp_pktio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Maxim Uvarov Feb. 26, 2015, 3:06 p.m. UTC | #1
Merged,
Maxim.

On 02/26/2015 04:39 PM, Savolainen, Petri (Nokia - FI/Espoo) wrote:
> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org>
>
>> -----Original Message-----
>> From: ext Taras Kondratiuk [mailto:taras.kondratiuk@linaro.org]
>> Sent: Thursday, February 26, 2015 2:37 PM
>> To: lng-odp@lists.linaro.org; Savolainen, Petri (Nokia - FI/Espoo)
>> Cc: Taras Kondratiuk
>> Subject: [PATCHv2] validation: pktio: fix odp_errno usage
>>
>> __odp_errno is a private variable.
>> odp_errno() function should be used instead.
>>
>> Also, until we have defined the set of standard ODP errno values,
>> just verify that odp_errno contains 'some' error.
>>
>> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
>> ---
>> v2: don't check for an exact errno value
>>
>>   test/validation/odp_pktio.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c
>> index d6a3f1f..8df367d 100644
>> --- a/test/validation/odp_pktio.c
>> +++ b/test/validation/odp_pktio.c
>> @@ -568,7 +568,7 @@ static void test_odp_pktio_lookup(void)
>>   	CU_ASSERT(odp_pktio_lookup(iface_name[0]) == pktio);
>>
>>   	pktio_inval = odp_pktio_open(iface_name[0], default_pkt_pool);
>> -	CU_ASSERT(__odp_errno == EEXIST);
>> +	CU_ASSERT(odp_errno() != 0);
>>   	CU_ASSERT(pktio_inval == ODP_PKTIO_INVALID);
>>
>>   	CU_ASSERT(odp_pktio_close(pktio) == 0);
>> --
>> 1.9.1
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c
index d6a3f1f..8df367d 100644
--- a/test/validation/odp_pktio.c
+++ b/test/validation/odp_pktio.c
@@ -568,7 +568,7 @@  static void test_odp_pktio_lookup(void)
 	CU_ASSERT(odp_pktio_lookup(iface_name[0]) == pktio);
 
 	pktio_inval = odp_pktio_open(iface_name[0], default_pkt_pool);
-	CU_ASSERT(__odp_errno == EEXIST);
+	CU_ASSERT(odp_errno() != 0);
 	CU_ASSERT(pktio_inval == ODP_PKTIO_INVALID);
 
 	CU_ASSERT(odp_pktio_close(pktio) == 0);