Skip to contentSkip to conversation

oeqa/runtime: add test that the kernel has CONFIG_PREEMPT_RT enabled

PATCH New Ross Burton 1 participant 1 message Jul 20, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oeqa/runtime: add test that the kernel has CONFIG_PREEMPT_RT enabled

This is the absolute bare minimum for testing the RT patches, but it does mean we if we build and boot a RT kernel we can verify that it is what we expect.

---
 meta/lib/oeqa/runtime/cases/rt.py | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 meta/lib/oeqa/runtime/cases/rt.py
meta/lib/oeqa/runtime/cases/rt.py new file +17 -0
new file mode 100644
index 00000000000..849ac1914e8
@@ -0,0 +1,17 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+
+class RtTest(OERuntimeTestCase):
+    @OETestDepends(['ssh.SSHTest.test_ssh'])
+    def test_is_rt(self):
+        """
+        Check that the kernel has CONFIG_PREEMPT_RT enabled.
+        """
+        status, output = self.target.run("uname -a")
+        self.assertEqual(status, 0, msg=output)
+        # Split so we don't get a substring false-positive
+        self.assertIn("PREEMPT_RT", output.split())
Signature · 1 line
2.34.1