test suite reviews and discussions
 help / color / mirror / Atom feed
* Re: [dts] [PATCH V1 2/2] update this module to support single cpu env
  2019-07-04  2:46 [dts] [PATCH V1 2/2] update this module to support single cpu env xiao,qimai
@ 2019-07-04  2:43 ` Yao, BingX Y
  0 siblings, 0 replies; 2+ messages in thread
From: Yao, BingX Y @ 2019-07-04  2:43 UTC (permalink / raw)
  To: Xiao, QimaiX, dts; +Cc: Xiao, QimaiX

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dts] [PATCH V1 2/2] update this module to support single cpu env
@ 2019-07-04  2:46 xiao,qimai
  2019-07-04  2:43 ` Yao, BingX Y
  0 siblings, 1 reply; 2+ messages in thread
From: xiao,qimai @ 2019-07-04  2:46 UTC (permalink / raw)
  To: dts; +Cc: xiao,qimai

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-04  2:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-04  2:46 [dts] [PATCH V1 2/2] update this module to support single cpu env xiao,qimai
2019-07-04  2:43 ` Yao, BingX Y

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).