From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D210CA0A0F; Fri, 4 Jun 2021 16:16:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 399DE410EF; Fri, 4 Jun 2021 16:16:32 +0200 (CEST) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by mails.dpdk.org (Postfix) with ESMTP id 4278140147 for ; Fri, 4 Jun 2021 16:16:29 +0200 (CEST) Received: by mail-lj1-f180.google.com with SMTP id p20so11739767ljj.8 for ; Fri, 04 Jun 2021 07:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ka3RGMBoxXljH0+vTWPfYacb4OuaeQ+iS/nvedYgWeQ=; b=BPE1fU0AKQTPOdRs6oLhpRVOHw+AJ3/uHeNpDkySA2iVGqQxTblgkUTTZ6Qrweb3Be qlCYrJhoSbEFw2V5KsJ9anq0eAIjM9KkcBNOttXhKVrhMlC7XpPx8nDJEmIH8tjwK2H9 BKUACSAYH3vFhwMKWxR12FUSEJ/nvuSj/hd1wHoqkY1Mh7G1c150G5w1GMSuB4pa4LKE zOfcO8iNcTuiNhLznz6CYvt2MX5o/vNA9vD42p0JclrT+Pe0L1T3Bby1Rcbiakfmt0kH N/xcIWarrMNVTxZZNd2l43BIIdzP1XV+iJ00SAuezXbOLEO0JG1PJssgXlenH+egaiE3 XAoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ka3RGMBoxXljH0+vTWPfYacb4OuaeQ+iS/nvedYgWeQ=; b=NutZ52w0Cdpk7Af6Y+5PWfhz5ZSxOD9jbFmhZK08UChOCUdDwfe3arqPg7ma8z35N3 3V9bUWxArmOSOL3gvgBlN0zaJ9f6W4WnmkW5ZB5JLghDz8whddvpyVERlCHeAMfOIbny mmrCPxGLZxr55E/pbhVq61RQr3TC02My0vGGyEGFFcVi+Bfnh/FzT84xWF/0ZFbewP+Q M0HlU5oEehGGFeM9nQFY4Dg8iNwYhiUSamyh88NCF5MmWe9JJZUv7fHScvpCnq3sdg9V R5Tw7vf4nUS4viMLggl0DZM4zSA/hg8+h8cGJSxmQ5ZnTEV6fjwDzVTFPemlKUCYMLgd MjCQ== X-Gm-Message-State: AOAM532AIdQshDBhnbISdIuEbIB0JSxlt3akJd49FF1uEU0wxYdH6GJZ oZBlbTcYn9urFAvEMww8Eq/jsh/ibKJAeQ== X-Google-Smtp-Source: ABdhPJxALImaY9Y0d/IrkL/zqpb7WvdeuNfs8P26ypznpL4SeE31TzoF/l36tRCiC8uWDWmxQ6/ecw== X-Received: by 2002:a2e:b8d5:: with SMTP id s21mr3508175ljp.163.1622816188848; Fri, 04 Jun 2021 07:16:28 -0700 (PDT) Received: from localhost.localdomain (89-73-146-138.dynamic.chello.pl. [89.73.146.138]) by smtp.gmail.com with ESMTPSA id h13sm706377lji.101.2021.06.04.07.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 07:16:28 -0700 (PDT) From: Stanislaw Kardach To: Anatoly Burakov Cc: dev@dpdk.org, Stanislaw Kardach Date: Fri, 4 Jun 2021 16:16:00 +0200 Message-Id: <20210604141601.275430-3-kda@semihalf.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210604141601.275430-1-kda@semihalf.com> References: <20210604141601.275430-1-kda@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 2/3] test: disable no-huge where it's not necessary X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" In tests where no-shconf flag is used, no-huge is also passed due to compatibility with FreeBSD system, as described in: b5d878e6d. However on Linux systems with RTE_IOVA_PA (lack of or an incompatible IOMMU) this causes issues since hugepages are required by EAL. Therefore replace all occurrences of no_huge which don't actually test the no-huge logic with a execution environment conditional no_huge_compat to indicate that it is passed as a compatibility flag, not as a requirement for a test itself. Signed-off-by: Stanislaw Kardach Fixes: b5d878e6db56 ("test: fix EAL flags autotest on FreeBSD") Cc: anatoly.burakov@intel.com --- app/test/test_eal_flags.c | 50 ++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index 462dc63842..e2248a5d9a 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -29,6 +29,17 @@ #define mp_flag "--proc-type=secondary" #define no_hpet "--no-hpet" #define no_huge "--no-huge" +/* FreeBSD does not support running multiple primary processes, hence for tests + * requiring no-shconf, no-huge is also required. + * On Linux on the other hand no-huge is not needed so don't pass it as it + * would break cases when IOMMU is not able to provide IOVA translation + * (rte_eal_iova_mode() == RTE_IOVA_PA). + */ +#ifdef RTE_EXEC_ENV_LINUX +#define no_huge_compat "" +#else +#define no_huge_compat no_huge +#endif #define no_shconf "--no-shconf" #define allow "--allow" #define vdev "--vdev" @@ -354,18 +365,18 @@ test_invalid_vdev_flag(void) #endif /* Test with invalid vdev option */ - const char *vdevinval[] = {prgname, prefix, no_huge, - vdev, "eth_dummy"}; + const char * const vdevinval[] = {prgname, prefix, no_huge_compat, + vdev, "eth_dummy"}; /* Test with valid vdev option */ - const char *vdevval1[] = {prgname, prefix, no_huge, - vdev, "net_ring0"}; + const char * const vdevval1[] = {prgname, prefix, no_huge_compat, + vdev, "net_ring0"}; - const char *vdevval2[] = {prgname, prefix, no_huge, - vdev, "net_ring0,args=test"}; + const char * const vdevval2[] = {prgname, prefix, no_huge_compat, + vdev, "net_ring0,args=test"}; - const char *vdevval3[] = {prgname, prefix, no_huge, - vdev, "net_ring0,nodeaction=r1:0:CREATE"}; + const char * const vdevval3[] = {prgname, prefix, no_huge_compat, + vdev, "net_ring0,nodeaction=r1:0:CREATE"}; if (launch_proc(vdevinval) == 0) { printf("Error - process did run ok with invalid " @@ -674,19 +685,20 @@ test_invalid_n_flag(void) #endif /* -n flag but no value */ - const char *argv1[] = { prgname, prefix, no_huge, no_shconf, - "-n"}; + const char * const argv1[] = { prgname, prefix, no_huge_compat, + no_shconf, "-n"}; /* bad numeric value */ - const char *argv2[] = { prgname, prefix, no_huge, no_shconf, - "-n", "e" }; + const char * const argv2[] = { prgname, prefix, no_huge_compat, + no_shconf, "-n", "e" }; /* zero is invalid */ - const char *argv3[] = { prgname, prefix, no_huge, no_shconf, - "-n", "0" }; + const char * const argv3[] = { prgname, prefix, no_huge_compat, + no_shconf, "-n", "0" }; /* sanity test - check with good value */ - const char *argv4[] = { prgname, prefix, no_huge, no_shconf, - "-n", "2" }; + const char * const argv4[] = { prgname, prefix, no_huge_compat, + no_shconf, "-n", "2" }; /* sanity test - check with no -n flag */ - const char *argv5[] = { prgname, prefix, no_huge, no_shconf}; + const char * const argv5[] = { prgname, prefix, no_huge_compat, + no_shconf}; if (launch_proc(argv1) == 0 || launch_proc(argv2) == 0 @@ -878,7 +890,7 @@ test_misc_flags(void) 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, "-m", DEFAULT_MEM_SIZE, - no_shconf, nosh_prefix, no_huge}; + no_shconf, nosh_prefix, no_huge_compat}; /* With --huge-dir */ const char *argv7[] = {prgname, "-m", DEFAULT_MEM_SIZE, @@ -920,7 +932,7 @@ test_misc_flags(void) /* With process type as auto-detect with no-shconf */ const char * const argv17[] = {prgname, "--proc-type=auto", - no_shconf, nosh_prefix, no_huge}; + no_shconf, nosh_prefix, no_huge_compat}; /* With process type as --create-uio-dev flag */ const char * const argv18[] = {prgname, "--file-prefix=uiodev", -- 2.27.0