diff mbox

validation: pktio check return code for pool_destroy

Message ID 1426062985-13816-1-git-send-email-maxim.uvarov@linaro.org
State Accepted
Commit 272595a6ace987f56352b89ada41980c67caf15d
Headers show

Commit Message

Maxim Uvarov March 11, 2015, 8:36 a.m. UTC
Fix CID 88056 to check return code of pool_destroy.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 test/validation/odp_pktio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stuart Haslam March 11, 2015, 9:40 a.m. UTC | #1
On Wed, Mar 11, 2015 at 11:36:25AM +0300, Maxim Uvarov wrote:
> Fix CID 88056 to check return code of pool_destroy.
> 
> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>

> ---
>  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 6359452..e022c33 100644
> --- a/test/validation/odp_pktio.c
> +++ b/test/validation/odp_pktio.c
> @@ -259,7 +259,7 @@ static odp_pktio_t create_pktio(const char *iface)
>  
>  	pool = odp_pool_lookup(pool_name);
>  	if (pool != ODP_POOL_INVALID)
> -		odp_pool_destroy(pool);
> +		CU_ASSERT(odp_pool_destroy(pool) == 0);
>  
>  	pool = odp_pool_create(pool_name, ODP_SHM_NULL, &params);
>  	CU_ASSERT(pool != ODP_POOL_INVALID);
> -- 
> 1.9.1
> 
> 
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
Maxim Uvarov March 12, 2015, 9:11 a.m. UTC | #2
Merged,
Maxim.

On 03/11/15 12:40, Stuart Haslam wrote:
> On Wed, Mar 11, 2015 at 11:36:25AM +0300, Maxim Uvarov wrote:
>> Fix CID 88056 to check return code of pool_destroy.
>>
>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>
>
>> ---
>>   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 6359452..e022c33 100644
>> --- a/test/validation/odp_pktio.c
>> +++ b/test/validation/odp_pktio.c
>> @@ -259,7 +259,7 @@ static odp_pktio_t create_pktio(const char *iface)
>>   
>>   	pool = odp_pool_lookup(pool_name);
>>   	if (pool != ODP_POOL_INVALID)
>> -		odp_pool_destroy(pool);
>> +		CU_ASSERT(odp_pool_destroy(pool) == 0);
>>   
>>   	pool = odp_pool_create(pool_name, ODP_SHM_NULL, &params);
>>   	CU_ASSERT(pool != ODP_POOL_INVALID);
>> -- 
>> 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 6359452..e022c33 100644
--- a/test/validation/odp_pktio.c
+++ b/test/validation/odp_pktio.c
@@ -259,7 +259,7 @@  static odp_pktio_t create_pktio(const char *iface)
 
 	pool = odp_pool_lookup(pool_name);
 	if (pool != ODP_POOL_INVALID)
-		odp_pool_destroy(pool);
+		CU_ASSERT(odp_pool_destroy(pool) == 0);
 
 	pool = odp_pool_create(pool_name, ODP_SHM_NULL, &params);
 	CU_ASSERT(pool != ODP_POOL_INVALID);