From: Ross Burton Date: Wed, 20 Jul 2022 10:59:52 +0000 (+0100) Subject: oeqa/runtime: add test that the kernel has CONFIG_PREEMPT_RT enabled X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~3574 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0301d5845115d09299f87683b3efa46f3b4c7be9;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/runtime/cases/rt.py b/meta/lib/oeqa/runtime/cases/rt.py new file mode 100644 index 00000000000..849ac1914e8 --- /dev/null +++ b/meta/lib/oeqa/runtime/cases/rt.py @@ -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())