[PATH,V1] framework/crb: optimization script

Message ID 20220114133804.18796-1-songx.jiale@intel.com (mailing list archive)
State Accepted
Headers
Series [PATH,V1] framework/crb: optimization script |

Checks

Context Check Description
ci/Intel-dts-suite-test fail Testing issues

Commit Message

Jiale, SongX Jan. 14, 2022, 1:38 p.m. UTC
  the format of priv-flags may be like 'link-down-on-close: on',
so regular expressions need to be optimized

Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
 framework/crb.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 mode change 100755 => 100644 framework/crb.py
  

Comments

Tu, Lijuan Jan. 14, 2022, 7:23 a.m. UTC | #1
> -----Original Message-----
> From: Jiale Song <songx.jiale@intel.com>
> Sent: 2022年1月14日 21:38
> To: dts@dpdk.org
> Cc: Jiale, SongX <songx.jiale@intel.com>
> Subject: [dts] [PATH V1] framework/crb: optimization script
> 
> the format of priv-flags may be like 'link-down-on-close: on', so regular
> expressions need to be optimized
> 
> Signed-off-by: Jiale Song <songx.jiale@intel.com>

Applied.
Btw, please don't add "PATH" in subject. The version is enough.
  

Patch

diff --git a/framework/crb.py b/framework/crb.py
old mode 100755
new mode 100644
index bd4f565d..c33edf14
--- a/framework/crb.py
+++ b/framework/crb.py
@@ -900,7 +900,7 @@  class Crb(object):
         '''
         check_flag = "ethtool --show-priv-flags %s" % intf
         out = self.send_expect(check_flag, "# ", timeout)
-        p = re.compile('%s\s+:\s+(\w+)' % flag)
+        p = re.compile('%s\s*:\s+(\w+)' % flag)
         state = re.search(p, out)
         if state:
             return state.group(1)