test suite reviews and discussions
 help / color / mirror / Atom feed
* [PATCH V1] nics/system_info: fix bug of re pattern expression
@ 2022-04-22  9:38 Jun Dong
  2022-04-26  3:15 ` lijuan.tu
  0 siblings, 1 reply; 2+ messages in thread
From: Jun Dong @ 2022-04-22  9:38 UTC (permalink / raw)
  To: dts; +Cc: lijuan.tu, qingx.sun, junx.dong

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 <junx.dong@intel.com>
---
 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


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

* [PATCH V1] nics/system_info: fix bug of re pattern expression
  2022-04-22  9:38 [PATCH V1] nics/system_info: fix bug of re pattern expression Jun Dong
@ 2022-04-26  3:15 ` lijuan.tu
  0 siblings, 0 replies; 2+ messages in thread
From: lijuan.tu @ 2022-04-26  3:15 UTC (permalink / raw)
  To: dts, Jun Dong; +Cc: lijuan.tu, qingx.sun, junx.dong

On Fri, 22 Apr 2022 17:38:34 +0800, Jun Dong <junx.dong@intel.com> wrote:
> 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 <junx.dong@intel.com>

Acked-by: Lijuan Tu <lijuan.tu@intel.com>
Applied, thanks

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

end of thread, other threads:[~2022-04-26  3:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-22  9:38 [PATCH V1] nics/system_info: fix bug of re pattern expression Jun Dong
2022-04-26  3:15 ` lijuan.tu

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