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 72C50A0C44; Mon, 12 Apr 2021 12:07:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 771D91410B2; Mon, 12 Apr 2021 12:07:01 +0200 (CEST) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by mails.dpdk.org (Postfix) with ESMTP id C57C4141087 for ; Mon, 12 Apr 2021 12:06:58 +0200 (CEST) Received: by mail-lj1-f170.google.com with SMTP id o16so14662256ljp.3 for ; Mon, 12 Apr 2021 03:06:58 -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=6RhF6StlcurmT9IGqNfvB2fWsNlOLKsrYoHnRe7TG6U=; b=nYN+vrb8FIRXew382bKx1e5KUT8NUqJra03B5INWqRo7AacrPL09eH4rrFJtHKUUEW E7F32EnQIUz0/Jf62BObY9KFdul5wsmmoVCT+R1APKSgtcOJfGlXfLrY0ebXcAYkyy7y L7XQXSy0Ynco5OmDwpIJYigHD/QxcZOfuQV0E4aB6AstkVXpd4x5HdHdHEDnUWpc0LGR HTmX2qzSysCi/qbJw0350YxM0wSssIY51SQKBslM3a4lyN8912vysjo4xu4nXBV1pAZN 007RPA1De4pZ67JB/8p2JoylRKj+Br6KL3WeR34fXrTkC8oqFWOHdQDKsk+OY7PsKuaR XKtw== 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=6RhF6StlcurmT9IGqNfvB2fWsNlOLKsrYoHnRe7TG6U=; b=EjihqzJQHOW3InNk6ZBm3TOevGjYGpO9RgRgwMKeGhQR83Hv/uAMgU0BO/34hcF/Jo uKg9nLCKuHsXFQgShasrAHJUpTdQAheDORrr1OXwrXmXgnkYCVXvzQ297YwqXJWK4plr VxeL0cVEYPKiK04BygBS9lnkNqi7c2xAojbpm9u1M1afBUGqkuGZ4hOIdvFbDTjv8ic5 +GTH511hs2F6G7CZxoDJ/GVZpfH4bksKpic4hVhI3LH7MrfjaiAqG97/gfxbmpPT6U5H GPqYeuyFmzUTqgoht1XNRTOKp4GkK2UmN/KqQhZOqur+pTWeM11MeFkuNxXA3a4nbT6s mU8A== X-Gm-Message-State: AOAM532knGZZDo8bnuUYIBmeYphZx4uuLjNuoIDKtTQ12UskYA/0Breu D4DTEvJoHD/ndgb/mCpOf36K2g== X-Google-Smtp-Source: ABdhPJwTW232wRskdu0bE5wAhVRPjzlZ98VwtuleGzFUgPxhnQ8V1/Q9+73Y7Gn2CJENqNbluhAH6Q== X-Received: by 2002:a05:651c:513:: with SMTP id o19mr1891914ljp.291.1618222018321; Mon, 12 Apr 2021 03:06:58 -0700 (PDT) Received: from toster.semihalf.com (host-193.106.246.139.static.3s.pl. [193.106.246.139]) by smtp.gmail.com with ESMTPSA id u9sm2781326ljj.0.2021.04.12.03.06.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 03:06:58 -0700 (PDT) From: Stanislaw Kardach To: Anatoly Burakov Cc: dev@dpdk.org, Stanislaw Kardach , stable@dpdk.org Date: Mon, 12 Apr 2021 12:06:44 +0200 Message-Id: <20210412100645.668395-3-kda@semihalf.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210412100645.668395-1-kda@semihalf.com> References: <20210412100645.668395-1-kda@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 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. Note that checkpatch is complaining about argvX arrays not being static const. This patch doesn't change that to not add confusion. Signed-off-by: Stanislaw Kardach Fixes: b5d878e6db56 ("test: fix EAL flags autotest on FreeBSD") Cc: stable@dpdk.org --- app/test/test_eal_flags.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index 462dc6384..cfc54684a 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,17 +365,17 @@ test_invalid_vdev_flag(void) #endif /* Test with invalid vdev option */ - const char *vdevinval[] = {prgname, prefix, no_huge, + const char *vdevinval[] = {prgname, prefix, no_huge_compat, vdev, "eth_dummy"}; /* Test with valid vdev option */ - const char *vdevval1[] = {prgname, prefix, no_huge, + const char *vdevval1[] = {prgname, prefix, no_huge_compat, vdev, "net_ring0"}; - const char *vdevval2[] = {prgname, prefix, no_huge, + const char *vdevval2[] = {prgname, prefix, no_huge_compat, vdev, "net_ring0,args=test"}; - const char *vdevval3[] = {prgname, prefix, no_huge, + const char *vdevval3[] = {prgname, prefix, no_huge_compat, vdev, "net_ring0,nodeaction=r1:0:CREATE"}; if (launch_proc(vdevinval) == 0) { @@ -674,19 +685,19 @@ test_invalid_n_flag(void) #endif /* -n flag but no value */ - const char *argv1[] = { prgname, prefix, no_huge, no_shconf, + const char *argv1[] = { prgname, prefix, no_huge_compat, no_shconf, "-n"}; /* bad numeric value */ - const char *argv2[] = { prgname, prefix, no_huge, no_shconf, + const char *argv2[] = { prgname, prefix, no_huge_compat, no_shconf, "-n", "e" }; /* zero is invalid */ - const char *argv3[] = { prgname, prefix, no_huge, no_shconf, + const char *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, + const char *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 *argv5[] = { prgname, prefix, no_huge_compat, no_shconf}; if (launch_proc(argv1) == 0 || launch_proc(argv2) == 0 @@ -878,7 +889,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 +931,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