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 19425A0032; Fri, 22 Apr 2022 11:38:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 12A7A4067B; Fri, 22 Apr 2022 11:38:52 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id EEEA540042 for ; Fri, 22 Apr 2022 11:38:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650620330; x=1682156330; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Q43i/14538vsLWVX5CoSWbWB/P6oTRDEEnX55Ay0fhQ=; b=dinh7h5A7Nk11hid2tEODyvU9YdpDR7EzfCbT/rkFdxVVUBTzmbRNbb1 6SIluQaRs5Fl/C+S//gCysxxDQTtSMniumw1aP2Vc2WUS4xJ9+SEN9M1u 8kR6Uw6f1wn8ftl51+PzIS19psdaqnqTP+zAAYrc/cCjhCBj+j4IknDDI W6LsPyMbS0Fv0xJNg2AcFtFas9Wa1JGOc0uB3KN5XUjjsU8QXcT+l70AX JGiCZTUFLM7hWP3z390cj3aLtPqqIOGJpH8FF6B0vj1zYdzebXPuQ+iSd D3c7mvItD95vPv7mvbghWGE9koezo+WrbJf1EFiayS3BWk3Mj/vTHWx3M w==; X-IronPort-AV: E=McAfee;i="6400,9594,10324"; a="246536521" X-IronPort-AV: E=Sophos;i="5.90,281,1643702400"; d="scan'208";a="246536521" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2022 02:38:48 -0700 X-IronPort-AV: E=Sophos;i="5.90,281,1643702400"; d="scan'208";a="626925057" Received: from shwdenpg197.ccr.corp.intel.com ([10.253.109.70]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2022 02:38:47 -0700 From: Jun Dong To: dts@dpdk.org Cc: lijuan.tu@intel.com, qingx.sun@intel.com, junx.dong@intel.com Subject: [PATCH V1] nics/system_info: fix bug of re pattern expression Date: Fri, 22 Apr 2022 17:38:34 +0800 Message-Id: <20220422093834.5188-1-junx.dong@intel.com> X-Mailer: git-send-email 2.33.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org There are some different forms of location information of memory in different platform, such as: "Locator: DIMM_A1", "Locator: DIMM 0", "P1-DIMMA1","Locator: CPU1_DIMM_A2". The original re pattern expression cann't match in some platform, this patch fixed it. Signed-off-by: Jun Dong --- nics/system_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nics/system_info.py b/nics/system_info.py index 5ecdd77d..fa8525de 100644 --- a/nics/system_info.py +++ b/nics/system_info.py @@ -80,7 +80,7 @@ class SystemInfo(object): """ s_regex = r"(\s+)Size: (\d+) MB" s1_regex = r"(\s+)Size: (\d+) GB" - l_regex = r"(\s+)Locator: .*_(\w+)" + l_regex = r"(\s+)Locator: .*[_\-\s](\w+)" speed_regex = r"(\s+)Speed: (.*)" size = "" locate = "" -- 2.33.1.windows.1