Reviewed-by: Balasubramanian Manoharan <[email protected]>

On 27 April 2016 at 05:47, Bill Fischofer <[email protected]> wrote:

> Add touch tests for the following APIs:
> odp_packet_has_l2_error()
> odp_packet_has_l3_error()
> odp_packet_has_l4_error()
>
> Signed-off-by: Bill Fischofer <[email protected]>
> ---
>  test/validation/packet/packet.c | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/test/validation/packet/packet.c
> b/test/validation/packet/packet.c
> index 4b9da46..180250a 100644
> --- a/test/validation/packet/packet.c
> +++ b/test/validation/packet/packet.c
> @@ -627,12 +627,21 @@ void packet_test_error_flags(void)
>         int err;
>
>         /**
> -        * The packet have not been classified so it doesn't have error
> flag
> -        * properly set. Just check that function return one of allowed
> values.
> -        * @todo: check classified packet when classifier is added in
> place.
> +        * The packet have not been classified so it doesn't have error
> flags
> +        * properly set. Just check that functions return one of allowed
> values.
> +        * @todo: try with known good and bad packets.
>          */
>         err = odp_packet_has_error(pkt);
>         CU_ASSERT(err == 0 || err == 1);
> +
> +       err = odp_packet_has_l2_error(pkt);
> +       CU_ASSERT(err == 0 || err == 1);
> +
> +       err = odp_packet_has_l3_error(pkt);
> +       CU_ASSERT(err == 0 || err == 1);
> +
> +       err = odp_packet_has_l4_error(pkt);
> +       CU_ASSERT(err == 0 || err == 1);
>  }
>
>  struct packet_metadata {
> --
> 2.5.0
>
> _______________________________________________
> lng-odp mailing list
> [email protected]
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to