[OE-core] [PATCH] oeqa/runtime/stap.py: add runtime test for systemtap
Burton, Ross
ross.burton at intel.com
Mon Mar 26 16:05:58 UTC 2018
On the autobuilder:
| NOTE: FAIL [15.139s]: test_stap (stap.StapTest)
| NOTE: ----------------------------------------------------------------------
| NOTE: Traceback (most recent call last):
| File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-rpm-non-rpm/build/meta/lib/oeqa/core/decorator/__init__.py",
line 32, in wrapped_f
| return func(*args, **kwargs)
| File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-rpm-non-rpm/build/meta/lib/oeqa/core/decorator/__init__.py",
line 32, in wrapped_f
| return func(*args, **kwargs)
| File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-rpm-non-rpm/build/meta/lib/oeqa/core/decorator/__init__.py",
line 32, in wrapped_f
| return func(*args, **kwargs)
| File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-rpm-non-rpm/build/meta/lib/oeqa/runtime/cases/stap.py",
line 33, in test_stap
| self.assertEqual(status, 0, msg='\n'.join([cmd, output]))
| AssertionError: 1 != 0 : stap --disable-cache /tmp/hello.stp
| ERROR: module version mismatch (#1 SMP PREEMPT Mon Mar 26 14:41:21
UTC 2018 vs #1 SMP PREEMPT Mon Mar 26 14:03:27 GMT 2018), release
4.14.24-yocto-standard
| WARNING: /usr/bin/staprun exited with status: 1
| Pass 5: run failed. [man error::pass5]
Is this systemtap-uprobes not being rebuilt when it should?
Ross
On 22 March 2018 at 17:53, Victor Kamensky <kamensky at cisco.com> wrote:
> Add runtime test for stap to test basic SystemTap
> operations: can compile very basic module and run on
> target device.
>
> Signed-off-by: Victor Kamensky <kamensky at cisco.com>
> ---
> meta/lib/oeqa/runtime/cases/stap.py | 33 +++++++++++++++++++++++++++++++++
> meta/lib/oeqa/runtime/files/hello.stp | 1 +
> 2 files changed, 34 insertions(+)
> create mode 100644 meta/lib/oeqa/runtime/cases/stap.py
> create mode 100644 meta/lib/oeqa/runtime/files/hello.stp
>
> diff --git a/meta/lib/oeqa/runtime/cases/stap.py b/meta/lib/oeqa/runtime/cases/stap.py
> new file mode 100644
> index 0000000..005da71
> --- /dev/null
> +++ b/meta/lib/oeqa/runtime/cases/stap.py
> @@ -0,0 +1,33 @@
> +import os
> +
> +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
> +
> +class StapTest(OERuntimeTestCase):
> +
> + @classmethod
> + def setUpClass(cls):
> + src = os.path.join(cls.tc.runtime_files_dir, 'hello.stp')
> + dst = '/tmp/hello.stp'
> + cls.tc.target.copyTo(src, dst)
> +
> + @classmethod
> + def tearDownClass(cls):
> + files = '/tmp/hello.stp'
> + cls.tc.target.run('rm %s' % files)
> +
> + @OETestID(1652)
> + @skipIfNotFeature('tools-profile',
> + 'Test requires tools-profile to be in IMAGE_FEATURES')
> + @OETestDepends(['kernelmodule.KernelModuleTest.test_kernel_module'])
> + def test_stap(self):
> + cmds = [
> + 'cd /usr/src/kernel && make scripts',
> + 'cd /lib/modules/* && (if [ ! -L build ]; then ln -s /usr/src/kernel build; fi)',
> + 'stap --disable-cache /tmp/hello.stp'
> + ]
> + for cmd in cmds:
> + status, output = self.target.run(cmd, 900)
> + self.assertEqual(status, 0, msg='\n'.join([cmd, output]))
> diff --git a/meta/lib/oeqa/runtime/files/hello.stp b/meta/lib/oeqa/runtime/files/hello.stp
> new file mode 100644
> index 0000000..3677147
> --- /dev/null
> +++ b/meta/lib/oeqa/runtime/files/hello.stp
> @@ -0,0 +1 @@
> +probe oneshot { println("hello world") }
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
More information about the Openembedded-core
mailing list