From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 3B6FFA0096 for ; Tue, 4 Jun 2019 11:01:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2E1BF1BC0F; Tue, 4 Jun 2019 11:00:57 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 53AFB1BB76 for ; Tue, 4 Jun 2019 11:00:55 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C7A633107B3D; Tue, 4 Jun 2019 09:00:54 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 34E861868F; Tue, 4 Jun 2019 09:00:52 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com Date: Tue, 4 Jun 2019 10:59:48 +0200 Message-Id: <1559638792-8608-11-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 04 Jun 2019 09:00:54 +0000 (UTC) Subject: [dpdk-dev] [PATCH 10/14] test/eal: set core mask/list config only in dedicated test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Setting a coremask was mandatory a long time ago but has been optional for a while. The checks on PCI whitelist/blacklist, vdev, memory rank, memory channel, HPET, memory size and other miscs options have no requirement wrt cores. Let's remove those coremasks so that we only care about it in the dedicated checks. Signed-off-by: David Marchand --- app/test/test_eal_flags.c | 141 ++++++++++++++++++++++++---------------------- 1 file changed, 73 insertions(+), 68 deletions(-) diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index e82e56a..5e11b9f 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -245,25 +245,25 @@ enum hugepage_action { #endif const char *wlinval[][11] = { - {prgname, prefix, mp_flag, "-c", "1", + {prgname, prefix, mp_flag, pci_whitelist, "error", "", ""}, - {prgname, prefix, mp_flag, "-c", "1", + {prgname, prefix, mp_flag, pci_whitelist, "0:0:0", "", ""}, - {prgname, prefix, mp_flag, "-c", "1", + {prgname, prefix, mp_flag, pci_whitelist, "0:error:0.1", "", ""}, - {prgname, prefix, mp_flag, "-c", "1", + {prgname, prefix, mp_flag, pci_whitelist, "0:0:0.1error", "", ""}, - {prgname, prefix, mp_flag, "-c", "1", + {prgname, prefix, mp_flag, pci_whitelist, "error0:0:0.1", "", ""}, - {prgname, prefix, mp_flag, "-c", "1", + {prgname, prefix, mp_flag, pci_whitelist, "0:0:0.1.2", "", ""}, }; /* Test with valid whitelist option */ - const char *wlval1[] = {prgname, prefix, mp_flag, "-c", "1", + const char *wlval1[] = {prgname, prefix, mp_flag, pci_whitelist, "00FF:09:0B.3"}; - const char *wlval2[] = {prgname, prefix, mp_flag, "-c", "1", + const char *wlval2[] = {prgname, prefix, mp_flag, pci_whitelist, "09:0B.3", pci_whitelist, "0a:0b.1"}; - const char *wlval3[] = {prgname, prefix, mp_flag, "-c", "1", + const char *wlval3[] = {prgname, prefix, mp_flag, pci_whitelist, "09:0B.3,type=test", pci_whitelist, "08:00.1,type=normal", }; @@ -311,15 +311,15 @@ enum hugepage_action { #endif const char *blinval[][9] = { - {prgname, prefix, mp_flag, "-c", "1", "-b", "error"}, - {prgname, prefix, mp_flag, "-c", "1", "-b", "0:0:0"}, - {prgname, prefix, mp_flag, "-c", "1", "-b", "0:error:0.1"}, - {prgname, prefix, mp_flag, "-c", "1", "-b", "0:0:0.1error"}, - {prgname, prefix, mp_flag, "-c", "1", "-b", "error0:0:0.1"}, - {prgname, prefix, mp_flag, "-c", "1", "-b", "0:0:0.1.2"}, + {prgname, prefix, mp_flag, "-b", "error"}, + {prgname, prefix, mp_flag, "-b", "0:0:0"}, + {prgname, prefix, mp_flag, "-b", "0:error:0.1"}, + {prgname, prefix, mp_flag, "-b", "0:0:0.1error"}, + {prgname, prefix, mp_flag, "-b", "error0:0:0.1"}, + {prgname, prefix, mp_flag, "-b", "0:0:0.1.2"}, }; /* Test with valid blacklist option */ - const char *blval[] = {prgname, prefix, mp_flag, "-c", "1", + const char *blval[] = {prgname, prefix, mp_flag, "-b", "FF:09:0B.3"}; int i; @@ -356,17 +356,17 @@ enum hugepage_action { /* Test with invalid vdev option */ const char *vdevinval[] = {prgname, prefix, no_huge, - "-c", "1", vdev, "eth_dummy"}; + vdev, "eth_dummy"}; /* Test with valid vdev option */ const char *vdevval1[] = {prgname, prefix, no_huge, - "-c", "1", vdev, "net_ring0"}; + vdev, "net_ring0"}; const char *vdevval2[] = {prgname, prefix, no_huge, - "-c", "1", vdev, "net_ring0,args=test"}; + vdev, "net_ring0,args=test"}; const char *vdevval3[] = {prgname, prefix, no_huge, - "-c", "1", vdev, "net_ring0,nodeaction=r1:0:CREATE"}; + vdev, "net_ring0,nodeaction=r1:0:CREATE"}; if (launch_proc(vdevinval) == 0) { printf("Error - process did run ok with invalid " @@ -413,13 +413,13 @@ enum hugepage_action { #endif const char *rinval[][9] = { - {prgname, prefix, mp_flag, "-c", "1", "-r", "error"}, - {prgname, prefix, mp_flag, "-c", "1", "-r", "0"}, - {prgname, prefix, mp_flag, "-c", "1", "-r", "-1"}, - {prgname, prefix, mp_flag, "-c", "1", "-r", "17"}, + {prgname, prefix, mp_flag, "-r", "error"}, + {prgname, prefix, mp_flag, "-r", "0"}, + {prgname, prefix, mp_flag, "-r", "-1"}, + {prgname, prefix, mp_flag, "-r", "17"}, }; /* Test with valid blacklist option */ - const char *rval[] = {prgname, prefix, mp_flag, "-c", "1", "-r", "16"}; + const char *rval[] = {prgname, prefix, mp_flag, "-r", "16"}; int i; @@ -661,15 +661,19 @@ enum hugepage_action { #endif /* -n flag but no value */ - const char *argv1[] = { prgname, prefix, no_huge, no_shconf, "-c", "1", "-n"}; + const char *argv1[] = { prgname, prefix, no_huge, no_shconf, + "-n"}; /* bad numeric value */ - const char *argv2[] = { prgname, prefix, no_huge, no_shconf, "-c", "1", "-n", "e" }; + const char *argv2[] = { prgname, prefix, no_huge, no_shconf, + "-n", "e" }; /* zero is invalid */ - const char *argv3[] = { prgname, prefix, no_huge, no_shconf, "-c", "1", "-n", "0" }; + const char *argv3[] = { prgname, prefix, no_huge, no_shconf, + "-n", "0" }; /* sanity test - check with good value */ - const char *argv4[] = { prgname, prefix, no_huge, no_shconf, "-c", "1", "-n", "2" }; + const char *argv4[] = { prgname, prefix, no_huge, no_shconf, + "-n", "2" }; /* sanity test - check with no -n flag */ - const char *argv5[] = { prgname, prefix, no_huge, no_shconf, "-c", "1"}; + const char *argv5[] = { prgname, prefix, no_huge, no_shconf}; if (launch_proc(argv1) == 0 || launch_proc(argv2) == 0 @@ -710,9 +714,9 @@ enum hugepage_action { #endif /* With --no-hpet */ - const char *argv1[] = {prgname, prefix, mp_flag, no_hpet, "-c", "1"}; + const char *argv1[] = {prgname, prefix, mp_flag, no_hpet}; /* Without --no-hpet */ - const char *argv2[] = {prgname, prefix, mp_flag, "-c", "1"}; + const char *argv2[] = {prgname, prefix, mp_flag}; if (launch_proc(argv1) != 0) { printf("Error - process did not run ok with --no-hpet flag\n"); @@ -741,16 +745,16 @@ enum hugepage_action { #endif /* With --no-huge */ - const char *argv1[] = {prgname, prefix, no_huge, "-c", "1"}; + const char *argv1[] = {prgname, prefix, no_huge}; /* With --no-huge and -m */ - const char *argv2[] = {prgname, prefix, no_huge, "-c", "1", + const char *argv2[] = {prgname, prefix, no_huge, "-m", DEFAULT_MEM_SIZE}; /* With --no-huge and --socket-mem */ - const char *argv3[] = {prgname, prefix, no_huge, "-c", "1", + const char *argv3[] = {prgname, prefix, no_huge, "--socket-mem=" DEFAULT_MEM_SIZE}; /* With --no-huge, -m and --socket-mem */ - const char *argv4[] = {prgname, prefix, no_huge, "-c", "1", + const char *argv4[] = {prgname, prefix, no_huge, "-m", DEFAULT_MEM_SIZE, "--socket-mem=" DEFAULT_MEM_SIZE}; if (launch_proc(argv1) != 0) { printf("Error - process did not run ok with --no-huge flag\n"); @@ -837,55 +841,56 @@ enum hugepage_action { * No further testing of output done. */ /* sanity check - failure with invalid option */ - const char *argv0[] = {prgname, prefix, mp_flag, "-c", "1", "--invalid-opt"}; + const char *argv0[] = {prgname, prefix, mp_flag, "--invalid-opt"}; /* With --no-pci */ - const char *argv1[] = {prgname, prefix, mp_flag, "-c", "1", "--no-pci"}; + const char *argv1[] = {prgname, prefix, mp_flag, "--no-pci"}; /* With -v */ - const char *argv2[] = {prgname, prefix, mp_flag, "-c", "1", "-v"}; + const char *argv2[] = {prgname, prefix, mp_flag, "-v"}; /* With valid --syslog */ - const char *argv3[] = {prgname, prefix, mp_flag, "-c", "1", + const char *argv3[] = {prgname, prefix, mp_flag, "--syslog", "syslog"}; /* With empty --syslog (should fail) */ - const char *argv4[] = {prgname, prefix, mp_flag, "-c", "1", "--syslog"}; + const char *argv4[] = {prgname, prefix, mp_flag, "--syslog"}; /* With invalid --syslog */ - const char *argv5[] = {prgname, prefix, mp_flag, "-c", "1", "--syslog", "error"}; + const char *argv5[] = {prgname, prefix, mp_flag, "--syslog", "error"}; /* With no-sh-conf, also use no-huge to ensure this test runs on BSD */ - const char *argv6[] = {prgname, "-c", "1", "-m", DEFAULT_MEM_SIZE, + const char *argv6[] = {prgname, "-m", DEFAULT_MEM_SIZE, no_shconf, nosh_prefix, no_huge}; /* With --huge-dir */ - const char *argv7[] = {prgname, "-c", "1", "-m", DEFAULT_MEM_SIZE, + const char *argv7[] = {prgname, "-m", DEFAULT_MEM_SIZE, "--file-prefix=hugedir", "--huge-dir", hugepath}; /* With empty --huge-dir (should fail) */ - const char *argv8[] = {prgname, "-c", "1", "-m", DEFAULT_MEM_SIZE, + const char *argv8[] = {prgname, "-m", DEFAULT_MEM_SIZE, "--file-prefix=hugedir", "--huge-dir"}; /* With invalid --huge-dir */ - const char *argv9[] = {prgname, "-c", "1", "-m", DEFAULT_MEM_SIZE, + const char *argv9[] = {prgname, "-m", DEFAULT_MEM_SIZE, "--file-prefix=hugedir", "--huge-dir", "invalid"}; /* Secondary process with invalid --huge-dir (should run as flag has no * effect on secondary processes) */ - const char *argv10[] = {prgname, prefix, mp_flag, "-c", "1", "--huge-dir", "invalid"}; + const char *argv10[] = {prgname, prefix, mp_flag, + "--huge-dir", "invalid"}; /* try running with base-virtaddr param */ const char *argv11[] = {prgname, "--file-prefix=virtaddr", - "-c", "1", "--base-virtaddr=0x12345678"}; + "--base-virtaddr=0x12345678"}; /* try running with --vfio-intr INTx flag */ const char *argv12[] = {prgname, "--file-prefix=intr", - "-c", "1", "--vfio-intr=legacy"}; + "--vfio-intr=legacy"}; /* try running with --vfio-intr MSI flag */ const char *argv13[] = {prgname, "--file-prefix=intr", - "-c", "1", "--vfio-intr=msi"}; + "--vfio-intr=msi"}; /* try running with --vfio-intr MSI-X flag */ const char *argv14[] = {prgname, "--file-prefix=intr", - "-c", "1", "--vfio-intr=msix"}; + "--vfio-intr=msix"}; /* try running with --vfio-intr invalid flag */ const char *argv15[] = {prgname, "--file-prefix=intr", - "-c", "1", "--vfio-intr=invalid"}; + "--vfio-intr=invalid"}; /* run all tests also applicable to FreeBSD first */ @@ -996,25 +1001,25 @@ enum hugepage_action { #endif /* this should fail unless the test itself is run with "memtest" prefix */ - const char *argv0[] = {prgname, mp_flag, "-c", "1", "-m", + const char *argv0[] = {prgname, mp_flag, "-m", DEFAULT_MEM_SIZE, "--file-prefix=" memtest }; /* primary process with memtest1 and default mem mode */ - const char *argv1[] = {prgname, "-c", "1", "-m", + const char *argv1[] = {prgname, "-m", DEFAULT_MEM_SIZE, "--file-prefix=" memtest1 }; /* primary process with memtest1 and legacy mem mode */ - const char *argv2[] = {prgname, "-c", "1", "-m", + const char *argv2[] = {prgname, "-m", DEFAULT_MEM_SIZE, "--file-prefix=" memtest1, "--legacy-mem" }; /* primary process with memtest2 and legacy mem mode */ - const char *argv3[] = {prgname, "-c", "1", "-m", + const char *argv3[] = {prgname, "-m", DEFAULT_MEM_SIZE, "--file-prefix=" memtest2, "--legacy-mem" }; /* primary process with memtest2 and default mem mode */ - const char *argv4[] = {prgname, "-c", "1", "-m", + const char *argv4[] = {prgname, "-m", DEFAULT_MEM_SIZE, "--file-prefix=" memtest2 }; /* check if files for current prefix are present */ @@ -1159,39 +1164,39 @@ enum hugepage_action { #endif /* valid -m flag and mp flag */ - const char *argv0[] = {prgname, prefix, mp_flag, "-c", "10", + const char *argv0[] = {prgname, prefix, mp_flag, "-m", DEFAULT_MEM_SIZE}; /* valid -m flag */ - const char *argv1[] = {prgname, "-c", "10", + const char *argv1[] = {prgname, "--file-prefix=" memtest, "-m", DEFAULT_MEM_SIZE}; /* valid (zero) --socket-mem flag */ - const char *argv2[] = {prgname, "-c", "10", + const char *argv2[] = {prgname, "--file-prefix=" memtest, "--socket-mem=0,0,0,0"}; /* invalid (incomplete) --socket-mem flag */ - const char *argv3[] = {prgname, "-c", "10", + const char *argv3[] = {prgname, "--file-prefix=" memtest, "--socket-mem=2,2,"}; /* invalid (mixed with invalid data) --socket-mem flag */ - const char *argv4[] = {prgname, "-c", "10", + const char *argv4[] = {prgname, "--file-prefix=" memtest, "--socket-mem=2,2,Fred"}; /* invalid (with numeric value as last character) --socket-mem flag */ - const char *argv5[] = {prgname, "-c", "10", + const char *argv5[] = {prgname, "--file-prefix=" memtest, "--socket-mem=2,2,Fred0"}; /* invalid (with empty socket) --socket-mem flag */ - const char *argv6[] = {prgname, "-c", "10", + const char *argv6[] = {prgname, "--file-prefix=" memtest, "--socket-mem=2,,2"}; /* invalid (null) --socket-mem flag */ - const char *argv7[] = {prgname, "-c", "10", + const char *argv7[] = {prgname, "--file-prefix=" memtest, "--socket-mem="}; /* valid --socket-mem specified together with -m flag */ - const char *argv8[] = {prgname, "-c", "10", + const char *argv8[] = {prgname, "--file-prefix=" memtest, "-m", DEFAULT_MEM_SIZE, "--socket-mem=2,2"}; /* construct an invalid socket mask with 2 megs on each socket plus @@ -1243,11 +1248,11 @@ enum hugepage_action { } /* invalid --socket-mem flag (with extra socket) */ - const char *argv9[] = {prgname, "-c", "10", + const char *argv9[] = {prgname, "--file-prefix=" memtest, invalid_socket_mem}; /* valid --socket-mem flag */ - const char *argv10[] = {prgname, "-c", "10", + const char *argv10[] = {prgname, "--file-prefix=" memtest, valid_socket_mem}; if (launch_proc(argv0) != 0) { -- 1.8.3.1