diff mbox

[API-NEXT] test: drvshm: removing invalid test

Message ID 1480430749-4804-1-git-send-email-christophe.milard@linaro.org
State New
Headers show

Commit Message

Christophe Milard Nov. 29, 2016, 2:45 p.m. UTC
The test trying to free a unallocated address is now erroneous since
ODP is using ishm too: unknown drvshm addresses may well be valid ODP
addresses, in which case the test frees someone else memory!
The test is simply suppressed.

Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

---
 test/common_plat/validation/drv/drvshmem/drvshmem.c | 2 --
 1 file changed, 2 deletions(-)

-- 
2.7.4

Comments

Savolainen, Petri (Nokia - FI/Espoo) Nov. 30, 2016, 11:02 a.m. UTC | #1
Seems to resolve my drvshm crash issue.

Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>



> -----Original Message-----

> From: Christophe Milard [mailto:christophe.milard@linaro.org]

> Sent: Tuesday, November 29, 2016 4:46 PM

> To: maxim.uvarov@linaro.com; Savolainen, Petri (Nokia - FI/Espoo)

> <petri.savolainen@nokia-bell-labs.com>; bill.fischofer@linaro.org; lng-

> odp@lists.linaro.org

> Cc: Christophe Milard <christophe.milard@linaro.org>

> Subject: [API-NEXT PATCH] test: drvshm: removing invalid test

> 

> The test trying to free a unallocated address is now erroneous since

> ODP is using ishm too: unknown drvshm addresses may well be valid ODP

> addresses, in which case the test frees someone else memory!

> The test is simply suppressed.

> 

> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

> ---

>  test/common_plat/validation/drv/drvshmem/drvshmem.c | 2 --

>  1 file changed, 2 deletions(-)

> 

> diff --git a/test/common_plat/validation/drv/drvshmem/drvshmem.c

> b/test/common_plat/validation/drv/drvshmem/drvshmem.c

> index 559c55d..0247a03 100644

> --- a/test/common_plat/validation/drv/drvshmem/drvshmem.c

> +++ b/test/common_plat/validation/drv/drvshmem/drvshmem.c

> @@ -135,8 +135,6 @@ void drvshmem_test_basic(void)

>  	shared_test_data->foo = TEST_SHARE_FOO;

>  	shared_test_data->bar = TEST_SHARE_BAR;

> 

> -	CU_ASSERT(odpdrv_shm_free_by_address((char *)shared_test_data - 1) <

> 0);

> -

>  	thrdarg.numthrds = odp_cpumask_default_worker(&unused, 0);

> 

>  	if (thrdarg.numthrds > MAX_WORKERS)

> --

> 2.7.4
Christophe Milard Nov. 30, 2016, 11:38 a.m. UTC | #2
Thanks for your feedback Petri. Sorry you had to be the first "victim".

Christophe

On 30 November 2016 at 12:02, Savolainen, Petri (Nokia - FI/Espoo)
<petri.savolainen@nokia-bell-labs.com> wrote:
> Seems to resolve my drvshm crash issue.

>

> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>

>

>

>> -----Original Message-----

>> From: Christophe Milard [mailto:christophe.milard@linaro.org]

>> Sent: Tuesday, November 29, 2016 4:46 PM

>> To: maxim.uvarov@linaro.com; Savolainen, Petri (Nokia - FI/Espoo)

>> <petri.savolainen@nokia-bell-labs.com>; bill.fischofer@linaro.org; lng-

>> odp@lists.linaro.org

>> Cc: Christophe Milard <christophe.milard@linaro.org>

>> Subject: [API-NEXT PATCH] test: drvshm: removing invalid test

>>

>> The test trying to free a unallocated address is now erroneous since

>> ODP is using ishm too: unknown drvshm addresses may well be valid ODP

>> addresses, in which case the test frees someone else memory!

>> The test is simply suppressed.

>>

>> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

>> ---

>>  test/common_plat/validation/drv/drvshmem/drvshmem.c | 2 --

>>  1 file changed, 2 deletions(-)

>>

>> diff --git a/test/common_plat/validation/drv/drvshmem/drvshmem.c

>> b/test/common_plat/validation/drv/drvshmem/drvshmem.c

>> index 559c55d..0247a03 100644

>> --- a/test/common_plat/validation/drv/drvshmem/drvshmem.c

>> +++ b/test/common_plat/validation/drv/drvshmem/drvshmem.c

>> @@ -135,8 +135,6 @@ void drvshmem_test_basic(void)

>>       shared_test_data->foo = TEST_SHARE_FOO;

>>       shared_test_data->bar = TEST_SHARE_BAR;

>>

>> -     CU_ASSERT(odpdrv_shm_free_by_address((char *)shared_test_data - 1) <

>> 0);

>> -

>>       thrdarg.numthrds = odp_cpumask_default_worker(&unused, 0);

>>

>>       if (thrdarg.numthrds > MAX_WORKERS)

>> --

>> 2.7.4

>
Maxim Uvarov Nov. 30, 2016, 1:57 p.m. UTC | #3
Merged,
Maxim.

On 11/30/16 14:38, Christophe Milard wrote:
> Thanks for your feedback Petri. Sorry you had to be the first "victim".

>

> Christophe

>

> On 30 November 2016 at 12:02, Savolainen, Petri (Nokia - FI/Espoo)

> <petri.savolainen@nokia-bell-labs.com> wrote:

>> Seems to resolve my drvshm crash issue.

>>

>> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>

>>

>>

>>> -----Original Message-----

>>> From: Christophe Milard [mailto:christophe.milard@linaro.org]

>>> Sent: Tuesday, November 29, 2016 4:46 PM

>>> To: maxim.uvarov@linaro.com; Savolainen, Petri (Nokia - FI/Espoo)

>>> <petri.savolainen@nokia-bell-labs.com>; bill.fischofer@linaro.org; lng-

>>> odp@lists.linaro.org

>>> Cc: Christophe Milard <christophe.milard@linaro.org>

>>> Subject: [API-NEXT PATCH] test: drvshm: removing invalid test

>>>

>>> The test trying to free a unallocated address is now erroneous since

>>> ODP is using ishm too: unknown drvshm addresses may well be valid ODP

>>> addresses, in which case the test frees someone else memory!

>>> The test is simply suppressed.

>>>

>>> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

>>> ---

>>>   test/common_plat/validation/drv/drvshmem/drvshmem.c | 2 --

>>>   1 file changed, 2 deletions(-)

>>>

>>> diff --git a/test/common_plat/validation/drv/drvshmem/drvshmem.c

>>> b/test/common_plat/validation/drv/drvshmem/drvshmem.c

>>> index 559c55d..0247a03 100644

>>> --- a/test/common_plat/validation/drv/drvshmem/drvshmem.c

>>> +++ b/test/common_plat/validation/drv/drvshmem/drvshmem.c

>>> @@ -135,8 +135,6 @@ void drvshmem_test_basic(void)

>>>        shared_test_data->foo = TEST_SHARE_FOO;

>>>        shared_test_data->bar = TEST_SHARE_BAR;

>>>

>>> -     CU_ASSERT(odpdrv_shm_free_by_address((char *)shared_test_data - 1) <

>>> 0);

>>> -

>>>        thrdarg.numthrds = odp_cpumask_default_worker(&unused, 0);

>>>

>>>        if (thrdarg.numthrds > MAX_WORKERS)

>>> --

>>> 2.7.4
diff mbox

Patch

diff --git a/test/common_plat/validation/drv/drvshmem/drvshmem.c b/test/common_plat/validation/drv/drvshmem/drvshmem.c
index 559c55d..0247a03 100644
--- a/test/common_plat/validation/drv/drvshmem/drvshmem.c
+++ b/test/common_plat/validation/drv/drvshmem/drvshmem.c
@@ -135,8 +135,6 @@  void drvshmem_test_basic(void)
 	shared_test_data->foo = TEST_SHARE_FOO;
 	shared_test_data->bar = TEST_SHARE_BAR;
 
-	CU_ASSERT(odpdrv_shm_free_by_address((char *)shared_test_data - 1) < 0);
-
 	thrdarg.numthrds = odp_cpumask_default_worker(&unused, 0);
 
 	if (thrdarg.numthrds > MAX_WORKERS)