[dpdk-dev] [PATCH] test/tun: add new test for tun

Ferruh Yigit ferruh.yigit at intel.com
Tue Apr 17 20:02:29 CEST 2018


On 4/5/2018 9:31 AM, Vipin Varghese wrote:
> Add TUN PMD validation for create, port setup, tx, rx and stats functions.
> 
> Signed-off-by: Vipin Varghese <vipin.varghese at intel.com>
> ---
>  test/test/Makefile         |   4 +
>  test/test/autotest_data.py |  13 ++
>  test/test/meson.build      |   4 +
>  test/test/test_tun.c       | 333 +++++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 354 insertions(+)
>  create mode 100644 test/test/test_tun.c
> 
> diff --git a/test/test/Makefile b/test/test/Makefile
> index a88cc38..e5d8200 100644
> --- a/test/test/Makefile
> +++ b/test/test/Makefile
> @@ -193,6 +193,10 @@ endif
>  
>  SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) += test_kvargs.c
>  
> +ifeq ($(CONFIG_RTE_LIBRTE_PMD_TAP),y)
> +SRCS-y += test_tun.c
> +endif
> +
>  CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  CFLAGS += -O3
> diff --git a/test/test/autotest_data.py b/test/test/autotest_data.py
> index aacfe0a..35f3aab 100644
> --- a/test/test/autotest_data.py
> +++ b/test/test/autotest_data.py
> @@ -357,6 +357,19 @@ def per_sockets(num):
>          ]
>      },
>      {
> +        "Prefix":    "tun",
> +        "Memory":    "512",
> +        "Tests":
> +        [
> +            {
> +                "Name":    "TUN autotest",
> +                "Command": "tun_autotest",
> +                "Func":    default_autotest,
> +                "Report":  None,
> +            },
> +        ]
> +    },
> +    {

Hi Vipin,

Thanks for providing unit test for the feature you have added. *I believe we
need more unit test in DPDK.*

Only a few questions:
1- Should this be part of auto test?
2- Second running of the tun_autotest is failing, exit test and re-run works,
any idea?


Overall I am for merging this unit test if there is no objection.


Thanks,
ferruh




More information about the dev mailing list