diff mbox series

[scarthgap,16/18] rt-tests: rt_bmark.py: fix TypeError

Message ID 9563027c35a4b1961a83100e22d4ea4430abd8b9.1722790925.git.steve@sakoman.com
State Accepted
Delegated to: Steve Sakoman
Headers show
Series [scarthgap,01/18] libstd-rs,rust-cross-canadian: set CVE_PRODUCT to rust | expand

Commit Message

Steve Sakoman Aug. 4, 2024, 5:09 p.m. UTC
From: Changqing Li <changqing.li@windriver.com>

Fix following error:
  File "/usr/lib64/rt-tests/ptest/./rt_bmark.py", line 287, in run_cyclictest_once
    m = rex.search(line)
        ^^^^^^^^^^^^^^^^
TypeError: cannot use a string pattern on a bytes-like object

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c5108da4009ccd3dfc92632171d6bc4dae4507db)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/recipes-rt/rt-tests/files/rt_bmark.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-rt/rt-tests/files/rt_bmark.py b/meta/recipes-rt/rt-tests/files/rt_bmark.py
index 2a4eed412f..5d22623656 100755
--- a/meta/recipes-rt/rt-tests/files/rt_bmark.py
+++ b/meta/recipes-rt/rt-tests/files/rt_bmark.py
@@ -284,7 +284,7 @@  def run_cyclictest_once():
         avg_cnt = 0
 
         for line in res.splitlines():
-                m = rex.search(line)
+                m = rex.search(line.decode('utf-8'))
                 if m is not None:
                         minlist.append(int(m.group(2)))
                         maxlist.append(int(m.group(4)))