Skip to contentSkip to conversation

rt-tests: rt_bmark.py: fix TypeError

PATCH New [email protected] 1 participant 1 message Oct 14, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rt-tests: rt_bmark.py: fix TypeError

From: Libo Chen <[email protected]>

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

---
 meta/recipes-rt/rt-tests/files/rt_bmark.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-rt/rt-tests/files/rt_bmark.py +1 -1
index 2a4eed412f..19a617f413 100755
@@ -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
Signature · 1 line
2.25.1