diff mbox series

rt_bmark.py: fix TypeError

Message ID 20241111035215.1633406-1-libo.chen.cn@windriver.com
State New
Headers show
Series rt_bmark.py: fix TypeError | expand

Commit Message

Chen, Libo (CN) Nov. 11, 2024, 3:52 a.m. UTC
From: Libo Chen <libo.chen.cn@windriver.com>

Upstream-Status: Inappropriate [oe-core specific]

Signed-off-by: Libo Chen <libo.chen.cn@windriver.com>
---
 rt_bmark.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Kjellerstedt Nov. 13, 2024, 2:09 p.m. UTC | #1
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Chen, Libo (CN) via
> lists.openembedded.org
> Sent: den 11 november 2024 04:52
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH] rt_bmark.py: fix TypeError
> 
> From: Libo Chen <libo.chen.cn@windriver.com>
> 
> Upstream-Status: Inappropriate [oe-core specific]

Upstream-Status is used in patch files that are part of the layer.

Here you would typically include some motivation for the change, 
such as an error message and the conditions for the error to occur.

> 
> Signed-off-by: Libo Chen <libo.chen.cn@windriver.com>
> ---
>  rt_bmark.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rt_bmark.py b/rt_bmark.py
> index 2a4eed4..19a617f 100755
> --- a/rt_bmark.py
> +++ b/rt_bmark.py

There is no rt_bmark.py at the top of the openembedded-core repository.
Some searching revealed that the actual path for rt_bmark.py is
"meta/recipes-rt/rt-tests/files/rt_bmark.py". This is the path that 
the patch should use or it is not possible to apply it. It is also the 
path that git format-patch would generate unless you give it some extra 
option like --relative, which you should not do.

> @@ -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
> --
> 2.25.1

//Peter
diff mbox series

Patch

diff --git a/rt_bmark.py b/rt_bmark.py
index 2a4eed4..19a617f 100755
--- a/rt_bmark.py
+++ b/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