From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F131CA0487 for ; Thu, 4 Jul 2019 04:42:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BF9501F28; Thu, 4 Jul 2019 04:42:17 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 9BB361BE0 for ; Thu, 4 Jul 2019 04:42:16 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2019 19:42:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,449,1557212400"; d="scan'208";a="247816492" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.176.135]) by orsmga001.jf.intel.com with ESMTP; 03 Jul 2019 19:42:14 -0700 From: "xiao,qimai" To: dts@dpdk.org Cc: "xiao,qimai" Date: Thu, 4 Jul 2019 10:46:57 +0800 Message-Id: <1562208417-144025-1-git-send-email-qimaix.xiao@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1 2/2] update this module to support single cpu env X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "dts" fix regular expression of Locator to support both multi-core and single-core cpu Signed-off-by: xiao,qimai --- nics/system_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nics/system_info.py b/nics/system_info.py index c813cd4..c4fea66 100644 --- a/nics/system_info.py +++ b/nics/system_info.py @@ -77,7 +77,7 @@ class SystemInfo(object): Size: 8192 MB Locator: DIMM_A1 Speed: 2133 MHz """ s_regex = r"(\s+)Size: (\d+) MB" - l_regex= r"(\s+)Locator: .*_(\w+)" + l_regex= r"(\s+)Locator: (CPU\d+_|)(\w+)" speed_regex = r"(\s+)Speed: (.*)" size = "" locate = "" @@ -92,7 +92,7 @@ class SystemInfo(object): size = m.group(2) l_m = re.match(l_regex, line) if l_m: - locate = l_m.group(2) + locate = l_m.group(3) s_m = re.match(speed_regex, line) if s_m: speed = s_m.group(2) -- 2.17.1