All of lore.kernel.org
 help / color / mirror / Atom feed
From: Armin Kuster <akuster808@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 19/20] OEQA: add crosstab selftest
Date: Mon, 11 Nov 2019 20:33:38 -0800	[thread overview]
Message-ID: <44db8662a436e4a4451aa5013ecf403c2c05a3ab.1573532188.git.akuster808@gmail.com> (raw)
In-Reply-To: <cover.1573532188.git.akuster808@gmail.com>

Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta/lib/oeqa/selftest/cases/runtime_test.py | 78 ++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 28804ea..ec99573 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -339,3 +339,81 @@ class Bsp(OESelftestTestCase):
         with runqemu('core-image-minimal') as qemu:
             result = runCmd("which bash" , shell=True)
             self.assertEqual(0, result.status, "Couldn't find bash")
+
+
+class SystemTap(OESelftestTestCase):
+        """
+        Summary:        The purpose of this test case is to verify native crosstap
+                        works while talking to a target.
+        Expected:       The script should successfully connect to the qemu machine
+                        and run some systemtap examples on a qemu machine.
+        """
+
+        @classmethod
+        def setUpClass(cls):
+            super(SystemTap, cls).setUpClass()
+            cls.image = "core-image-minimal"
+
+        def default_config(self):
+            return """
+# These aren't the actual IP addresses but testexport class needs something defined
+TEST_SERVER_IP = "192.168.7.1"
+TEST_TARGET_IP = "192.168.7.2"
+
+EXTRA_IMAGE_FEATURES += "tools-profile dbg-pkgs"
+IMAGE_FEATURES_append = " ssh-server-dropbear"
+
+# enables kernel debug symbols
+KERNEL_EXTRA_FEATURES_append = " features/debug/debug-kernel.scc"
+KERNEL_EXTRA_FEATURES_append = " features/systemtap/systemtap.scc"
+
+# add systemtap run-time into target image if it is not there yet
+IMAGE_INSTALL_append = " systemtap"
+"""
+
+        def test_crosstap_helloworld(self):
+            self.write_config(self.default_config())
+            bitbake('systemtap-native')
+            systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
+            bitbake(self.image)
+
+            with runqemu(self.image) as qemu:
+                cmd = "crosstap -r root@192.168.7.2 -s %s/general/helloworld.stp " % systemtap_examples 
+                result = runCmd(cmd)
+                self.assertEqual(0, result.status, 'crosstap helloworld returned a non 0 status:%s' % result.output)
+
+        def test_crosstap_pstree(self):
+            self.write_config(self.default_config())
+
+            bitbake('systemtap-native')
+            systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
+            bitbake(self.image)
+
+            with runqemu(self.image) as qemu:
+                cmd = "crosstap -r root@192.168.7.2 -s %s/process/pstree.stp" % systemtap_examples
+                result = runCmd(cmd)
+                self.assertEqual(0, result.status, 'crosstap pstree returned a non 0 status:%s' % result.output)
+
+        def test_crosstap_syscalls_by_proc(self):
+            self.write_config(self.default_config())
+
+            bitbake('systemtap-native')
+            systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
+            bitbake(self.image)
+
+            with runqemu(self.image) as qemu:
+                cmd = "crosstap -r root@192.168.7.2 -s %s/process/ syscalls_by_proc.stp" % systemtap_examples
+                result = runCmd(cmd)
+                self.assertEqual(0, result.status, 'crosstap  syscalls_by_proc returned a non 0 status:%s' % result.output)
+
+        def test_crosstap_syscalls_by_pid(self):
+            self.write_config(self.default_config())
+
+            bitbake('systemtap-native')
+            systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
+            bitbake(self.image)
+
+            with runqemu(self.image) as qemu:
+                cmd = "crosstap -r root@192.168.7.2 -s %s/process/ syscalls_by_pid.stp" % systemtap_examples
+                result = runCmd(cmd)
+                self.assertEqual(0, result.status, 'crosstap  syscalls_by_pid returned a non 0 status:%s' % result.output)
-- 
2.7.4



  parent reply	other threads:[~2019-11-12  4:33 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12  4:33 [PATCH 00/20] QA updates Armin Kuster
2019-11-12  4:33 ` [PATCH 01/20] OEQA: Add a check for MACHINE Armin Kuster
2019-11-12  4:33 ` [PATCH 02/20] OEQA: Add qemu checks Armin Kuster
2019-11-12  4:33 ` [PATCH 03/20] OEQA: Centrilize the base LTP routines Armin Kuster
2019-11-12  4:33 ` [PATCH 04/20] OEQA: update ltp runtimes to use new structure Armin Kuster
2019-11-14  1:53   ` Mittal, Anuj
2019-11-14  3:42     ` akuster808
2019-11-12  4:33 ` [PATCH 05/20] OEQA/runtime: Add ltp stress test Armin Kuster
2019-11-12  4:33 ` [PATCH 06/20] OEQA/manual: remove crash " Armin Kuster
2019-11-12  4:33 ` [PATCH 07/20] manual qa: drop ltpstress test Armin Kuster
2019-11-12  4:33 ` [PATCH 08/20] manual qa/bsp-qemu: remove rpm tests already done in runtime Armin Kuster
2019-11-12  4:33 ` [PATCH 09/20] manual qa/bsp-qemu: remove KVM enabled which is already done in selftest runqemu Armin Kuster
2019-11-12  4:33 ` [PATCH 10/20] manual/bsp-qemu: drop xserver test done at runtime Armin Kuster
2019-11-12  4:33 ` [PATCH 11/20] manual/bsp-qemu: remove only_one_connmand_in_background " Armin Kuster
2019-11-12  4:33 ` [PATCH 12/20] OEQA: remove postinit test done w/selftest runtime Armin Kuster
2019-11-12  4:33 ` [PATCH 13/20] OEQA: eclipse support was dropped in warrior Armin Kuster
2019-11-12  4:33 ` [PATCH 14/20] OEQA: move manual bash test to runtime Armin Kuster
2019-11-13  1:33   ` Mittal, Anuj
2019-11-13  1:49     ` akuster808
2019-11-12  4:33 ` [PATCH 15/20] OEQA: remove manual bash test Armin Kuster
2019-11-12  4:33 ` [PATCH 16/20] OEQA: remove manual useradd test Armin Kuster
2019-11-12  4:33 ` [PATCH 17/20] OEQA: move list-packageconfig-flags tests from manual to self Armin Kuster
2019-11-12  4:33 ` [PATCH 18/20] OEQA: remove manual PACKAGECONFIG_FLAGS tests Armin Kuster
2019-11-12  4:33 ` Armin Kuster [this message]
2019-11-12  4:33 ` [PATCH 20/20] OEQA: remove crosstab test from manual Armin Kuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44db8662a436e4a4451aa5013ecf403c2c05a3ab.1573532188.git.akuster808@gmail.com \
    --to=akuster808@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.