test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Yao, BingX Y" <bingx.y.yao@intel.com>
To: "Xiao, QimaiX" <qimaix.xiao@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Xiao, QimaiX" <qimaix.xiao@intel.com>
Subject: Re: [dts] [PATCH V1 2/2] update this module to support single cpu env
Date: Thu, 4 Jul 2019 02:43:47 +0000	[thread overview]
Message-ID: <95BCD24840F32441BEA74E0F8A31839E058F3DA9@SHSMSX106.ccr.corp.intel.com> (raw)
In-Reply-To: <1562208417-144025-1-git-send-email-qimaix.xiao@intel.com>

Tested-by: Yao, BingX Y <bingx.y.yao@intel.com>

-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xiao,qimai
Sent: Thursday, July 4, 2019 10:47 AM
To: dts@dpdk.org
Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
Subject: [dts] [PATCH V1 2/2] update this module to support single cpu env

fix regular expression of Locator to support both multi-core and single-core cpu

Signed-off-by: xiao,qimai <qimaix.xiao@intel.com>
---
 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


      reply	other threads:[~2019-07-04  2:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04  2:46 xiao,qimai
2019-07-04  2:43 ` Yao, BingX Y [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=95BCD24840F32441BEA74E0F8A31839E058F3DA9@SHSMSX106.ccr.corp.intel.com \
    --to=bingx.y.yao@intel.com \
    --cc=dts@dpdk.org \
    --cc=qimaix.xiao@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).