mbox series

[0/2] rteval: Miscellaneous fixes

Message ID 20210909080547.1331581-1-punitagrawal@gmail.com
Headers show
Series rteval: Miscellaneous fixes | expand

Message

Punit Agrawal Sept. 9, 2021, 8:05 a.m. UTC
Hi,

Since the previous two patchsets fixing blockers[0], [1], I
encountered a couple of more benign issues - noticed when staring at
the generated report - summary.xml.

The first patch fixes a problem with incorrect detection of RT
kernels. I've tried to retain the old behaviour in case somebody is
still using older kernels. The change can be made more robust if
that's no longer needed.

The second patch fixes an issue with incorrect detection of init
system and container environment. This is a result of change in how
strings are treated in python3 (compared to python2).

As usual, all feedback welcome.

Thanks,
Punit

[0] https://lore.kernel.org/all/20210901080816.721731-1-punitagrawal@gmail.com/
[1] https://lore.kernel.org/all/20210902092452.726905-1-punitagrawal@gmail.com/

Punit Agrawal (2):
  rteval: osinfo.py: Fix RT kernel detection
  rteval: services.py: Fix incorrect detection of container environment

 rteval/sysinfo/osinfo.py   | 2 +-
 rteval/sysinfo/services.py | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

John Kacur Sept. 10, 2021, 4:30 p.m. UTC | #1
On Thu, 9 Sep 2021, Punit Agrawal wrote:

> From: Punit Agrawal <punit1.agrawal@toshiba.co.jp>

> 

> Since the osinfo.py module was developed, RT kernels have moved on

> from identifying as "RT" to "PREEMPT_RT". This change in the kernel

> identifier causes osinfo.py to incorrectly detect RT kernels as

> non-RT.

> 

> Update the check for detecting RT kernel to be able to handle both the

> variants.

> 

> Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp>

> ---

>  rteval/sysinfo/osinfo.py | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/rteval/sysinfo/osinfo.py b/rteval/sysinfo/osinfo.py

> index 98e5b4422cad..7b7bfe9ce4ec 100644

> --- a/rteval/sysinfo/osinfo.py

> +++ b/rteval/sysinfo/osinfo.py

> @@ -91,7 +91,7 @@ class OSInfo:

>  

>          (sys, node, release, ver, machine) = os.uname()

>          isrt = 1

> -        if ver.find(' RT ') == -1:

> +        if 'RT ' not in ver:

>              isrt = 0

>  

>          node_n = libxml2.newNode("node")

> -- 

> 2.32.0

> 

> 


Signed-off-by: John Kacur <jkacur@redhat.com>