test suite reviews and discussions
 help / color / mirror / Atom feed
From: Jun Dong <junx.dong@intel.com>
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	[thread overview]
Message-ID: <20220422093834.5188-1-junx.dong@intel.com> (raw)

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


             reply	other threads:[~2022-04-22  9:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22  9:38 Jun Dong [this message]
2022-04-26  3:15 ` lijuan.tu

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=20220422093834.5188-1-junx.dong@intel.com \
    --to=junx.dong@intel.com \
    --cc=dts@dpdk.org \
    --cc=lijuan.tu@intel.com \
    --cc=qingx.sun@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).