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 984E8A00C3; Wed, 8 Dec 2021 02:51:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7227042734; Wed, 8 Dec 2021 02:51:14 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id E3830410E8 for ; Wed, 8 Dec 2021 02:51:07 +0100 (CET) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 9AB4720B7187; Tue, 7 Dec 2021 17:51:06 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9AB4720B7187 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1638928266; bh=I7CwcRiVEtDlrx2C/+7MrCrhr17EFreOl0A6jYVVxrE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UyB7045qOJ6Kr/ixvcG7NPB3SUcw/YsXzlaYKAZLhMCCH0glq1BybNcWKV+HCUpJH UbD+/E1xyH7QmojWWB4hT/c1DUdgBx8zm933wQzL/TTmgOV4BL5Il9zGgwgMVITJ9S Ud4PJN3XmYQTuwpgbCwrzC367gYi1rE9MpwsZleQ= From: Jie Zhou To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, bruce.richardson@intel.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net, aconole@redhat.com Subject: [PATCH v13 05/11] app/test: skip two logs_autotest cases on Windows Date: Tue, 7 Dec 2021 17:50:56 -0800 Message-Id: <1638928262-13177-6-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1638928262-13177-1-git-send-email-jizh@linux.microsoft.com> References: <1638912263-7054-1-git-send-email-jizh@linux.microsoft.com> <1638928262-13177-1-git-send-email-jizh@linux.microsoft.com> 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 DPDK logs_autotest on Windows failed at "dynamic log types" tests. The failures are on 2 test cases for rte_log_set_level_regexp API, due to regular expression is not supported on Windows in DPDK yet and regcomp/regexec are just stubs on Windows (in regex.h). In app\test\test_logs.c, ifndef these two test cases, and for the rte_log_set_level_pattern validation case following these two cases, differentiate the expected log level passed into macro CHECK_LEVELS Now logs_autotest completes for all dynamic log types and static log types. Signed-off-by: Jie Zhou Acked-by: Dmitry Kozlyuk --- app/test/test_logs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/test/test_logs.c b/app/test/test_logs.c index 7abb6eeca2..7c001c1ab3 100644 --- a/app/test/test_logs.c +++ b/app/test/test_logs.c @@ -113,6 +113,7 @@ test_logs(void) rte_log_set_level(logtype1, RTE_LOG_ERR); CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR); +#ifndef RTE_EXEC_ENV_WINDOWS rte_log_set_level_regexp("type$", RTE_LOG_EMERG); CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR); @@ -121,7 +122,10 @@ test_logs(void) rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG); CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG); - +#else + ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG); + CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR); +#endif /* set logtype level low to so we can test global level */ rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG); CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG); -- 2.31.0.vfs.0.1