aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPunit Agrawal <punit1.agrawal@toshiba.co.jp>2021-09-09 17:05:46 +0900
committerJohn Kacur <jkacur@redhat.com>2021-09-13 08:42:13 -0400
commitdc1d108be1226d8b3b5841249fc26b568a98f07b (patch)
treee58949a8422d97331725df60a85b7f5453f7d096
parent49d2dce1f08a82e72bc084fab3f63301d6632fb2 (diff)
downloadrteval-dc1d108be1226d8b3b5841249fc26b568a98f07b.tar.gz
rteval: osinfo.py: Fix RT kernel detection
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> Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r--rteval/sysinfo/osinfo.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rteval/sysinfo/osinfo.py b/rteval/sysinfo/osinfo.py
index 98e5b44..7b7bfe9 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")