diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/poky/meta/lib/oeqa/runtime/cases/ksample.py | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/poky/meta/lib/oeqa/runtime/cases/ksample.py')
-rw-r--r-- | external/poky/meta/lib/oeqa/runtime/cases/ksample.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/external/poky/meta/lib/oeqa/runtime/cases/ksample.py b/external/poky/meta/lib/oeqa/runtime/cases/ksample.py index 354cc976..a9a1620e 100644 --- a/external/poky/meta/lib/oeqa/runtime/cases/ksample.py +++ b/external/poky/meta/lib/oeqa/runtime/cases/ksample.py @@ -1,9 +1,12 @@ +# +# SPDX-License-Identifier: MIT +# + import os import time from oeqa.runtime.case import OERuntimeTestCase from oeqa.core.decorator.depends import OETestDepends -from oeqa.core.decorator.oeid import OETestID from oeqa.core.decorator.data import skipIfNotFeature # need some kernel fragments @@ -22,6 +25,12 @@ class KSample(OERuntimeTestCase): self.assertTrue(result, msg) self.assertEqual(status, 0, cmd) + def check_arch(self, archset=''): + status, output = self.target.run("uname -m") + result = ("%s" % output) in archset + if not result: + self.skipTest("This case doesn't support %s" % output) + def check_config(self, config_opt=''): cmd = "zcat /proc/config.gz | grep %s" % config_opt status, output = self.target.run(cmd) @@ -99,6 +108,7 @@ class KSampleTest(KSample): # kprobe @OETestDepends(['ssh.SSHTest.test_ssh']) def test_kprobe_test(self): + self.check_arch("x86_64 i686 ppc") index = ["kprobe", "kretprobe"] for i in index: self.kprobe_func(i) @@ -166,9 +176,9 @@ class KSampleTest(KSample): def test_hw_breakpoint_example(self): # check arch status, output = self.target.run("uname -m") - result = ("x86" in output) or ("aarch64" in output) + result = ("x86_64" in output) or ("aarch64" in output) if not result: - self.skipTest("the arch doesn't support hw breakpoint" % output) + self.skipTest("the arch %s doesn't support hw breakpoint" % output) # check config self.check_config("CONFIG_KALLSYMS_ALL") # make sure if module exists |