diff mbox

validation: pktio: don't continue if packet with > MTU is sent

Message ID 1452703617-11652-1-git-send-email-ivan.khoronzhuk@linaro.org
State Accepted
Commit 4198932160019e43f07df13fb47be190c40806ed
Headers show

Commit Message

Ivan Khoronzhuk Jan. 13, 2016, 4:46 p.m. UTC
If packet with size > MTU is sent the test can crash farther,
so better to stop here.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
---
 test/validation/pktio/pktio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stuart Haslam Jan. 15, 2016, 3:51 p.m. UTC | #1
On Wed, Jan 13, 2016 at 06:46:57PM +0200, Ivan Khoronzhuk wrote:
> If packet with size > MTU is sent the test can crash farther,
> so better to stop here.
> 
> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>

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

> ---
>  test/validation/pktio/pktio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c
> index 8121f1e..45c11c5 100644
> --- a/test/validation/pktio/pktio.c
> +++ b/test/validation/pktio/pktio.c
> @@ -968,7 +968,7 @@ void pktio_test_send_failure(void)
>  		 * the initial short packets should be sent successfully */
>  		odp_errno_zero();
>  		ret = odp_pktio_send(pktio_tx, pkt_tbl, TX_BATCH_LEN);
> -		CU_ASSERT(ret == long_pkt_idx);
> +		CU_ASSERT_FATAL(ret == long_pkt_idx);
>  		CU_ASSERT(odp_errno() == 0);
>  
>  		info_rx.id   = pktio_rx;
> -- 
> 1.9.1
>
Ivan Khoronzhuk Jan. 15, 2016, 3:53 p.m. UTC | #2
On 15.01.16 17:51, Stuart Haslam wrote:
> On Wed, Jan 13, 2016 at 06:46:57PM +0200, Ivan Khoronzhuk wrote:
>> If packet with size > MTU is sent the test can crash farther,
>> so better to stop here.
>>
>> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
>
> Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
Reviewed-by?

>
>> ---
>>   test/validation/pktio/pktio.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c
>> index 8121f1e..45c11c5 100644
>> --- a/test/validation/pktio/pktio.c
>> +++ b/test/validation/pktio/pktio.c
>> @@ -968,7 +968,7 @@ void pktio_test_send_failure(void)
>>   		 * the initial short packets should be sent successfully */
>>   		odp_errno_zero();
>>   		ret = odp_pktio_send(pktio_tx, pkt_tbl, TX_BATCH_LEN);
>> -		CU_ASSERT(ret == long_pkt_idx);
>> +		CU_ASSERT_FATAL(ret == long_pkt_idx);
>>   		CU_ASSERT(odp_errno() == 0);
>>
>>   		info_rx.id   = pktio_rx;
>> --
>> 1.9.1
>>
Stuart Haslam Jan. 15, 2016, 3:55 p.m. UTC | #3
On Fri, Jan 15, 2016 at 05:53:20PM +0200, Ivan Khoronzhuk wrote:
> 
> 
> On 15.01.16 17:51, Stuart Haslam wrote:
> >On Wed, Jan 13, 2016 at 06:46:57PM +0200, Ivan Khoronzhuk wrote:
> >>If packet with size > MTU is sent the test can crash farther,
> >>so better to stop here.
> >>
> >>Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
> >
> >Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
> Reviewed-by?

Err, yup, wrong macro, I meant..

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

> >>---
> >>  test/validation/pktio/pktio.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >>diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c
> >>index 8121f1e..45c11c5 100644
> >>--- a/test/validation/pktio/pktio.c
> >>+++ b/test/validation/pktio/pktio.c
> >>@@ -968,7 +968,7 @@ void pktio_test_send_failure(void)
> >>  		 * the initial short packets should be sent successfully */
> >>  		odp_errno_zero();
> >>  		ret = odp_pktio_send(pktio_tx, pkt_tbl, TX_BATCH_LEN);
> >>-		CU_ASSERT(ret == long_pkt_idx);
> >>+		CU_ASSERT_FATAL(ret == long_pkt_idx);
> >>  		CU_ASSERT(odp_errno() == 0);
> >>
> >>  		info_rx.id   = pktio_rx;
> >>--
> >>1.9.1
> >>
> 
> -- 
> Regards,
> Ivan Khoronzhuk
Ivan Khoronzhuk Jan. 18, 2016, 5:54 p.m. UTC | #4
ping

On 15.01.16 17:55, Stuart Haslam wrote:
> On Fri, Jan 15, 2016 at 05:53:20PM +0200, Ivan Khoronzhuk wrote:
>>
>>
>> On 15.01.16 17:51, Stuart Haslam wrote:
>>> On Wed, Jan 13, 2016 at 06:46:57PM +0200, Ivan Khoronzhuk wrote:
>>>> If packet with size > MTU is sent the test can crash farther,
>>>> so better to stop here.
>>>>
>>>> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
>>>
>>> Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
>> Reviewed-by?
>
> Err, yup, wrong macro, I meant..
>
> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>
>
>>>> ---
>>>>   test/validation/pktio/pktio.c | 2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c
>>>> index 8121f1e..45c11c5 100644
>>>> --- a/test/validation/pktio/pktio.c
>>>> +++ b/test/validation/pktio/pktio.c
>>>> @@ -968,7 +968,7 @@ void pktio_test_send_failure(void)
>>>>   		 * the initial short packets should be sent successfully */
>>>>   		odp_errno_zero();
>>>>   		ret = odp_pktio_send(pktio_tx, pkt_tbl, TX_BATCH_LEN);
>>>> -		CU_ASSERT(ret == long_pkt_idx);
>>>> +		CU_ASSERT_FATAL(ret == long_pkt_idx);
>>>>   		CU_ASSERT(odp_errno() == 0);
>>>>
>>>>   		info_rx.id   = pktio_rx;
>>>> --
>>>> 1.9.1
>>>>
>>
>> --
>> Regards,
>> Ivan Khoronzhuk
>
Maxim Uvarov Jan. 18, 2016, 6:06 p.m. UTC | #5
merged.
Maxim.

On 01/18/2016 20:54, Ivan Khoronzhuk wrote:
> ping
>
> On 15.01.16 17:55, Stuart Haslam wrote:
>> On Fri, Jan 15, 2016 at 05:53:20PM +0200, Ivan Khoronzhuk wrote:
>>>
>>>
>>> On 15.01.16 17:51, Stuart Haslam wrote:
>>>> On Wed, Jan 13, 2016 at 06:46:57PM +0200, Ivan Khoronzhuk wrote:
>>>>> If packet with size > MTU is sent the test can crash farther,
>>>>> so better to stop here.
>>>>>
>>>>> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
>>>>
>>>> Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
>>> Reviewed-by?
>>
>> Err, yup, wrong macro, I meant..
>>
>> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>
>>
>>>>> ---
>>>>>   test/validation/pktio/pktio.c | 2 +-
>>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/test/validation/pktio/pktio.c 
>>>>> b/test/validation/pktio/pktio.c
>>>>> index 8121f1e..45c11c5 100644
>>>>> --- a/test/validation/pktio/pktio.c
>>>>> +++ b/test/validation/pktio/pktio.c
>>>>> @@ -968,7 +968,7 @@ void pktio_test_send_failure(void)
>>>>>            * the initial short packets should be sent successfully */
>>>>>           odp_errno_zero();
>>>>>           ret = odp_pktio_send(pktio_tx, pkt_tbl, TX_BATCH_LEN);
>>>>> -        CU_ASSERT(ret == long_pkt_idx);
>>>>> +        CU_ASSERT_FATAL(ret == long_pkt_idx);
>>>>>           CU_ASSERT(odp_errno() == 0);
>>>>>
>>>>>           info_rx.id   = pktio_rx;
>>>>> -- 
>>>>> 1.9.1
>>>>>
>>>
>>> -- 
>>> Regards,
>>> Ivan Khoronzhuk
>>
>
diff mbox

Patch

diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c
index 8121f1e..45c11c5 100644
--- a/test/validation/pktio/pktio.c
+++ b/test/validation/pktio/pktio.c
@@ -968,7 +968,7 @@  void pktio_test_send_failure(void)
 		 * the initial short packets should be sent successfully */
 		odp_errno_zero();
 		ret = odp_pktio_send(pktio_tx, pkt_tbl, TX_BATCH_LEN);
-		CU_ASSERT(ret == long_pkt_idx);
+		CU_ASSERT_FATAL(ret == long_pkt_idx);
 		CU_ASSERT(odp_errno() == 0);
 
 		info_rx.id   = pktio_rx;