From: Lavanya Govindarajan Date: Wed, 3 Jul 2019 13:06:14 +0000 (+0100) Subject: test/eal: add cases for options proc-type and uio X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=eca6aea915e37cff2b3bffae1806c3918d003a62;p=dpdk.git test/eal: add cases for options proc-type and uio Added unit test cases for EAL flags --proc-type=auto and --create-uio-dev in order to cover the below functions eal_proc_type_detect() rte_eal_create_uio_dev() Signed-off-by: Lavanya Govindarajan Reviewed-by: David Marchand Acked-by: Anatoly Burakov --- diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index 2343419b1e..672ca0a7ca 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -903,6 +903,18 @@ test_misc_flags(void) const char *argv15[] = {prgname, "--file-prefix=intr", "--vfio-intr=invalid"}; + /* With process type as auto-detect */ + const char * const argv16[] = {prgname, "--file-prefix=auto", + "--proc-type=auto"}; + + /* With process type as auto-detect with no-shconf */ + const char * const argv17[] = {prgname, "--proc-type=auto", + no_shconf, nosh_prefix, no_huge}; + + /* With process type as --create-uio-dev flag */ + const char * const argv18[] = {prgname, "--file-prefix=uiodev", + "--create-uio-dev"}; + /* run all tests also applicable to FreeBSD first */ if (launch_proc(argv0) == 0) { @@ -979,6 +991,22 @@ test_misc_flags(void) "--vfio-intr invalid parameter\n"); return -1; } + if (launch_proc(argv16) != 0) { + printf("Error - process did not run ok with " + "--proc-type as auto parameter\n"); + return -1; + } + if (launch_proc(argv17) != 0) { + printf("Error - process did not run ok with " + "--proc-type and --no-shconf parameter\n"); + return -1; + } + if (launch_proc(argv18) != 0) { + printf("Error - process did not run ok with " + "--create-uio-dev parameter\n"); + return -1; + } + return 0; }