diff mbox series

[meta,kirkstone] rt-tests: rt_bmark.py: fix TypeError

Message ID 20241014085514.724667-1-libo.chen.cn@windriver.com
State New
Headers show
Series [meta,kirkstone] rt-tests: rt_bmark.py: fix TypeError | expand

Commit Message

libo.chen.cn@windriver.com Oct. 14, 2024, 8:55 a.m. UTC
From: Libo Chen <libo.chen.cn@windriver.com>

Fix the 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: Libo Chen <libo.chen.cn@windriver.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..19a617f413 100755
--- a/meta/recipes-rt/rt-tests/files/rt_bmark.py
+++ b/meta/recipes-rt/rt-tests/files/rt_bmark.py
@@ -268,7 +268,7 @@  cmd = ("cyclictest",
 rex = re.compile(r"C:\s*(\d+).*Min:\s*(\d+).*Avg:\s*(\d+).*Max:\s*(\d+)")
 
 def run_cyclictest_once():
-        res = subprocess.check_output(cmd)
+        res = subprocess.check_output(cmd, encoding='utf-8')
 
         # minlist and maxlist are lists with the extremes for each core
         # avg_cnt is the sum of cycles for all cores