Skip to content

Commit

Permalink
oeqa/runtime: add test that the kernel has CONFIG_PREEMPT_RT enabled
Browse files Browse the repository at this point in the history
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 <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  • Loading branch information
rossburton authored and rpurdie committed Jul 20, 2022
1 parent b4f1b78 commit 0301d58
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions meta/lib/oeqa/runtime/cases/rt.py
Original file line number Diff line number Diff line change
@@ -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())

0 comments on commit 0301d58

Please sign in to comment.