blob: 84c2cb77e80961cb949c22842c75590a471aba7a [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001#
2# SPDX-License-Identifier: MIT
3#
4
Brad Bishopd7bf8c12018-02-25 22:55:05 -05005from oeqa.selftest.case import OESelftestTestCase
6from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, runqemu
7from oeqa.utils.sshcontrol import SSHControl
Brad Bishopd7bf8c12018-02-25 22:55:05 -05008import os
9import re
10import tempfile
11import shutil
Brad Bishop19323692019-04-05 15:28:33 -040012import oe.lsb
Andrew Geissler82c905d2020-04-13 13:39:40 -050013from oeqa.core.decorator.data import skipIfNotQemu
Brad Bishopd7bf8c12018-02-25 22:55:05 -050014
15class TestExport(OESelftestTestCase):
16
17 @classmethod
18 def tearDownClass(cls):
19 runCmd("rm -rf /tmp/sdk")
20 super(TestExport, cls).tearDownClass()
21
Brad Bishopd7bf8c12018-02-25 22:55:05 -050022 def test_testexport_basic(self):
23 """
24 Summary: Check basic testexport functionality with only ping test enabled.
25 Expected: 1. testexport directory must be created.
26 2. runexported.py must run without any error/exception.
27 3. ping test must succeed.
28 Product: oe-core
29 Author: Mariano Lopez <mariano.lopez@intel.com>
30 """
31
32 features = 'INHERIT += "testexport"\n'
33 # These aren't the actual IP addresses but testexport class needs something defined
34 features += 'TEST_SERVER_IP = "192.168.7.1"\n'
35 features += 'TEST_TARGET_IP = "192.168.7.1"\n'
36 features += 'TEST_SUITES = "ping"\n'
37 self.write_config(features)
38
39 # Build tesexport for core-image-minimal
40 bitbake('core-image-minimal')
41 bitbake('-c testexport core-image-minimal')
42
43 testexport_dir = get_bb_var('TEST_EXPORT_DIR', 'core-image-minimal')
44
45 # Verify if TEST_EXPORT_DIR was created
46 isdir = os.path.isdir(testexport_dir)
47 self.assertEqual(True, isdir, 'Failed to create testexport dir: %s' % testexport_dir)
48
49 with runqemu('core-image-minimal') as qemu:
50 # Attempt to run runexported.py to perform ping test
51 test_path = os.path.join(testexport_dir, "oe-test")
52 data_file = os.path.join(testexport_dir, 'data', 'testdata.json')
53 manifest = os.path.join(testexport_dir, 'data', 'manifest')
54 cmd = ("%s runtime --test-data-file %s --packages-manifest %s "
55 "--target-ip %s --server-ip %s --quiet"
56 % (test_path, data_file, manifest, qemu.ip, qemu.server_ip))
57 result = runCmd(cmd)
58 # Verify ping test was succesful
59 self.assertEqual(0, result.status, 'oe-test runtime returned a non 0 status')
60
Brad Bishopd7bf8c12018-02-25 22:55:05 -050061 def test_testexport_sdk(self):
62 """
63 Summary: Check sdk functionality for testexport.
64 Expected: 1. testexport directory must be created.
65 2. SDK tarball must exists.
66 3. Uncompressing of tarball must succeed.
67 4. Check if the SDK directory is added to PATH.
68 5. Run tar from the SDK directory.
69 Product: oe-core
70 Author: Mariano Lopez <mariano.lopez@intel.com>
71 """
72
73 features = 'INHERIT += "testexport"\n'
74 # These aren't the actual IP addresses but testexport class needs something defined
75 features += 'TEST_SERVER_IP = "192.168.7.1"\n'
76 features += 'TEST_TARGET_IP = "192.168.7.1"\n'
77 features += 'TEST_SUITES = "ping"\n'
78 features += 'TEST_EXPORT_SDK_ENABLED = "1"\n'
79 features += 'TEST_EXPORT_SDK_PACKAGES = "nativesdk-tar"\n'
80 self.write_config(features)
81
82 # Build tesexport for core-image-minimal
83 bitbake('core-image-minimal')
84 bitbake('-c testexport core-image-minimal')
85
86 needed_vars = ['TEST_EXPORT_DIR', 'TEST_EXPORT_SDK_DIR', 'TEST_EXPORT_SDK_NAME']
87 bb_vars = get_bb_vars(needed_vars, 'core-image-minimal')
88 testexport_dir = bb_vars['TEST_EXPORT_DIR']
89 sdk_dir = bb_vars['TEST_EXPORT_SDK_DIR']
90 sdk_name = bb_vars['TEST_EXPORT_SDK_NAME']
91
92 # Check for SDK
93 tarball_name = "%s.sh" % sdk_name
94 tarball_path = os.path.join(testexport_dir, sdk_dir, tarball_name)
95 msg = "Couldn't find SDK tarball: %s" % tarball_path
96 self.assertEqual(os.path.isfile(tarball_path), True, msg)
97
98 # Extract SDK and run tar from SDK
99 result = runCmd("%s -y -d /tmp/sdk" % tarball_path)
100 self.assertEqual(0, result.status, "Couldn't extract SDK")
101
102 env_script = result.output.split()[-1]
103 result = runCmd(". %s; which tar" % env_script, shell=True)
104 self.assertEqual(0, result.status, "Couldn't setup SDK environment")
105 is_sdk_tar = True if "/tmp/sdk" in result.output else False
106 self.assertTrue(is_sdk_tar, "Couldn't setup SDK environment")
107
108 tar_sdk = result.output
109 result = runCmd("%s --version" % tar_sdk)
110 self.assertEqual(0, result.status, "Couldn't run tar from SDK")
111
112
113class TestImage(OESelftestTestCase):
114
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500115 def test_testimage_install(self):
116 """
117 Summary: Check install packages functionality for testimage/testexport.
118 Expected: 1. Import tests from a directory other than meta.
119 2. Check install/uninstall of socat.
120 Product: oe-core
121 Author: Mariano Lopez <mariano.lopez@intel.com>
122 """
123 if get_bb_var('DISTRO') == 'poky-tiny':
124 self.skipTest('core-image-full-cmdline not buildable for poky-tiny')
125
126 features = 'INHERIT += "testimage"\n'
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800127 features += 'IMAGE_INSTALL_append = " libssl"\n'
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500128 features += 'TEST_SUITES = "ping ssh selftest"\n'
129 self.write_config(features)
130
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500131 bitbake('core-image-full-cmdline socat')
132 bitbake('-c testimage core-image-full-cmdline')
133
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500134 def test_testimage_dnf(self):
135 """
136 Summary: Check package feeds functionality for dnf
137 Expected: 1. Check that remote package feeds can be accessed
138 Product: oe-core
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800139 Author: Alexander Kanavin <alex.kanavin@gmail.com>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500140 """
141 if get_bb_var('DISTRO') == 'poky-tiny':
142 self.skipTest('core-image-full-cmdline not buildable for poky-tiny')
143
144 features = 'INHERIT += "testimage"\n'
145 features += 'TEST_SUITES = "ping ssh dnf_runtime dnf.DnfBasicTest.test_dnf_help"\n'
146 # We don't yet know what the server ip and port will be - they will be patched
147 # in at the start of the on-image test
148 features += 'PACKAGE_FEED_URIS = "http://bogus_ip:bogus_port"\n'
149 features += 'EXTRA_IMAGE_FEATURES += "package-management"\n'
150 features += 'PACKAGE_CLASSES = "package_rpm"\n'
151
Brad Bishop6f8dcde2018-10-16 10:47:12 +0800152 bitbake('gnupg-native -c addto_recipe_sysroot')
153
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500154 # Enable package feed signing
155 self.gpg_home = tempfile.mkdtemp(prefix="oeqa-feed-sign-")
Brad Bishop96ff1982019-08-19 13:50:42 -0400156 self.track_for_cleanup(self.gpg_home)
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500157 signing_key_dir = os.path.join(self.testlayer_path, 'files', 'signing')
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500158 runCmd('gpgconf --list-dirs --homedir %s; gpg -v --batch --homedir %s --import %s' % (self.gpg_home, self.gpg_home, os.path.join(signing_key_dir, 'key.secret')), native_sysroot=get_bb_var("RECIPE_SYSROOT_NATIVE", "gnupg-native"), shell=True)
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500159 features += 'INHERIT += "sign_package_feed"\n'
160 features += 'PACKAGE_FEED_GPG_NAME = "testuser"\n'
161 features += 'PACKAGE_FEED_GPG_PASSPHRASE_FILE = "%s"\n' % os.path.join(signing_key_dir, 'key.passphrase')
162 features += 'GPG_PATH = "%s"\n' % self.gpg_home
Andrew Geisslerf0343792020-11-18 10:42:21 -0600163 features += 'PSEUDO_IGNORE_PATHS .= ",%s"\n' % self.gpg_home
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500164 self.write_config(features)
165
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500166 bitbake('core-image-full-cmdline socat')
167 bitbake('-c testimage core-image-full-cmdline')
168
Andrew Geissler82c905d2020-04-13 13:39:40 -0500169 def test_testimage_virgl_gtk_sdl(self):
Brad Bishop19323692019-04-05 15:28:33 -0400170 """
Andrew Geissler82c905d2020-04-13 13:39:40 -0500171 Summary: Check host-assisted accelerate OpenGL functionality in qemu with gtk and SDL frontends
Brad Bishop19323692019-04-05 15:28:33 -0400172 Expected: 1. Check that virgl kernel driver is loaded and 3d acceleration is enabled
173 2. Check that kmscube demo runs without crashing.
174 Product: oe-core
175 Author: Alexander Kanavin <alex.kanavin@gmail.com>
176 """
177 if "DISPLAY" not in os.environ:
178 self.skipTest("virgl gtk test must be run inside a X session")
179 distro = oe.lsb.distro_identifier()
180 if distro and distro == 'debian-8':
181 self.skipTest('virgl isn\'t working with Debian 8')
Andrew Geisslerc182c622020-05-15 14:13:32 -0500182 if distro and distro == 'debian-9':
183 self.skipTest('virgl isn\'t working with Debian 9')
Brad Bishop64c979e2019-11-04 13:55:29 -0500184 if distro and distro == 'centos-7':
185 self.skipTest('virgl isn\'t working with Centos 7')
Andrew Geissler82c905d2020-04-13 13:39:40 -0500186 if distro and distro == 'opensuseleap-15.0':
187 self.skipTest('virgl isn\'t working with Opensuse 15.0')
Brad Bishop19323692019-04-05 15:28:33 -0400188
189 qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native')
Andrew Geissler1e34c2d2020-05-29 16:02:59 -0500190 qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
Brad Bishop19323692019-04-05 15:28:33 -0400191 features = 'INHERIT += "testimage"\n'
192 if 'gtk+' not in qemu_packageconfig:
193 features += 'PACKAGECONFIG_append_pn-qemu-system-native = " gtk+"\n'
Andrew Geissler82c905d2020-04-13 13:39:40 -0500194 if 'sdl' not in qemu_packageconfig:
195 features += 'PACKAGECONFIG_append_pn-qemu-system-native = " sdl"\n'
Andrew Geissler1e34c2d2020-05-29 16:02:59 -0500196 if 'opengl' not in qemu_distrofeatures:
197 features += 'DISTRO_FEATURES_append = " opengl"\n'
Brad Bishop19323692019-04-05 15:28:33 -0400198 features += 'TEST_SUITES = "ping ssh virgl"\n'
199 features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n'
200 features += 'IMAGE_INSTALL_append = " kmscube"\n'
Andrew Geissler82c905d2020-04-13 13:39:40 -0500201 features_gtk = features + 'TEST_RUNQEMUPARAMS = "gtk gl"\n'
202 self.write_config(features_gtk)
203 bitbake('core-image-minimal')
204 bitbake('-c testimage core-image-minimal')
205 features_sdl = features + 'TEST_RUNQEMUPARAMS = "sdl gl"\n'
206 self.write_config(features_sdl)
Brad Bishop19323692019-04-05 15:28:33 -0400207 bitbake('core-image-minimal')
208 bitbake('-c testimage core-image-minimal')
209
Brad Bishop19323692019-04-05 15:28:33 -0400210 def test_testimage_virgl_headless(self):
211 """
212 Summary: Check host-assisted accelerate OpenGL functionality in qemu with egl-headless frontend
213 Expected: 1. Check that virgl kernel driver is loaded and 3d acceleration is enabled
214 2. Check that kmscube demo runs without crashing.
215 Product: oe-core
216 Author: Alexander Kanavin <alex.kanavin@gmail.com>
217 """
218 import subprocess, os
219 try:
220 content = os.listdir("/dev/dri")
221 if len([i for i in content if i.startswith('render')]) == 0:
222 self.skipTest("No render nodes found in /dev/dri: %s" %(content))
223 except FileNotFoundError:
224 self.skipTest("/dev/dri directory does not exist; no render nodes available on this machine.")
225 try:
226 dripath = subprocess.check_output("pkg-config --variable=dridriverdir dri", shell=True)
227 except subprocess.CalledProcessError as e:
228 self.skipTest("Could not determine the path to dri drivers on the host via pkg-config.\nPlease install Mesa development files (particularly, dri.pc) on the host machine.")
Andrew Geissler1e34c2d2020-05-29 16:02:59 -0500229 qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
Brad Bishop19323692019-04-05 15:28:33 -0400230 features = 'INHERIT += "testimage"\n'
Andrew Geissler1e34c2d2020-05-29 16:02:59 -0500231 if 'opengl' not in qemu_distrofeatures:
232 features += 'DISTRO_FEATURES_append = " opengl"\n'
Brad Bishop19323692019-04-05 15:28:33 -0400233 features += 'TEST_SUITES = "ping ssh virgl"\n'
234 features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n'
235 features += 'IMAGE_INSTALL_append = " kmscube"\n'
236 features += 'TEST_RUNQEMUPARAMS = "egl-headless"\n'
237 self.write_config(features)
238 bitbake('core-image-minimal')
239 bitbake('-c testimage core-image-minimal')
240
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500241class Postinst(OESelftestTestCase):
Andrew Geissler82c905d2020-04-13 13:39:40 -0500242
243 def init_manager_loop(self, init_manager):
244 import oe.path
245
246 vars = get_bb_vars(("IMAGE_ROOTFS", "sysconfdir"), "core-image-minimal")
247 rootfs = vars["IMAGE_ROOTFS"]
248 self.assertIsNotNone(rootfs)
249 sysconfdir = vars["sysconfdir"]
250 self.assertIsNotNone(sysconfdir)
251 # Need to use oe.path here as sysconfdir starts with /
252 hosttestdir = oe.path.join(rootfs, sysconfdir, "postinst-test")
253 targettestdir = os.path.join(sysconfdir, "postinst-test")
254
255 for classes in ("package_rpm", "package_deb", "package_ipk"):
256 with self.subTest(init_manager=init_manager, package_class=classes):
257 features = 'CORE_IMAGE_EXTRA_INSTALL = "postinst-delayed-b"\n'
258 features += 'IMAGE_FEATURES += "package-management empty-root-password"\n'
259 features += 'PACKAGE_CLASSES = "%s"\n' % classes
260 if init_manager == "systemd":
261 features += 'DISTRO_FEATURES_append = " systemd"\n'
262 features += 'VIRTUAL-RUNTIME_init_manager = "systemd"\n'
263 features += 'DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"\n'
264 features += 'VIRTUAL-RUNTIME_initscripts = ""\n'
265 self.write_config(features)
266
267 bitbake('core-image-minimal')
268
269 self.assertTrue(os.path.isfile(os.path.join(hosttestdir, "rootfs")),
270 "rootfs state file was not created")
271
272 with runqemu('core-image-minimal') as qemu:
273 # Make the test echo a string and search for that as
274 # run_serial()'s status code is useless.'
275 for filename in ("rootfs", "delayed-a", "delayed-b"):
276 status, output = qemu.run_serial("test -f %s && echo found" % os.path.join(targettestdir, filename))
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600277 self.assertIn("found", output, "%s was not present on boot" % filename)
Andrew Geissler82c905d2020-04-13 13:39:40 -0500278
279
280
281 @skipIfNotQemu('qemuall', 'Test only runs in qemu')
282 def test_postinst_rootfs_and_boot_sysvinit(self):
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500283 """
284 Summary: The purpose of this test case is to verify Post-installation
285 scripts are called when rootfs is created and also test
286 that script can be delayed to run at first boot.
287 Dependencies: NA
288 Steps: 1. Add proper configuration to local.conf file
289 2. Build a "core-image-minimal" image
290 3. Verify that file created by postinst_rootfs recipe is
291 present on rootfs dir.
292 4. Boot the image created on qemu and verify that the file
293 created by postinst_boot recipe is present on image.
294 Expected: The files are successfully created during rootfs and boot
295 time for 3 different package managers: rpm,ipk,deb and
Andrew Geissler82c905d2020-04-13 13:39:40 -0500296 for initialization managers: sysvinit.
297
298 """
299 self.init_manager_loop("sysvinit")
300
301
302 @skipIfNotQemu('qemuall', 'Test only runs in qemu')
303 def test_postinst_rootfs_and_boot_systemd(self):
304 """
305 Summary: The purpose of this test case is to verify Post-installation
306 scripts are called when rootfs is created and also test
307 that script can be delayed to run at first boot.
308 Dependencies: NA
309 Steps: 1. Add proper configuration to local.conf file
310 2. Build a "core-image-minimal" image
311 3. Verify that file created by postinst_rootfs recipe is
312 present on rootfs dir.
313 4. Boot the image created on qemu and verify that the file
314 created by postinst_boot recipe is present on image.
315 Expected: The files are successfully created during rootfs and boot
316 time for 3 different package managers: rpm,ipk,deb and
317 for initialization managers: systemd.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500318
319 """
Brad Bishop316dfdd2018-06-25 12:45:53 -0400320
Andrew Geissler82c905d2020-04-13 13:39:40 -0500321 self.init_manager_loop("systemd")
Brad Bishop316dfdd2018-06-25 12:45:53 -0400322
323
324 def test_failing_postinst(self):
325 """
326 Summary: The purpose of this test case is to verify that post-installation
327 scripts that contain errors are properly reported.
328 Expected: The scriptlet failure is properly reported.
329 The file that is created after the error in the scriptlet is not present.
330 Product: oe-core
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800331 Author: Alexander Kanavin <alex.kanavin@gmail.com>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400332 """
333
334 import oe.path
335
336 vars = get_bb_vars(("IMAGE_ROOTFS", "sysconfdir"), "core-image-minimal")
337 rootfs = vars["IMAGE_ROOTFS"]
338 self.assertIsNotNone(rootfs)
339 sysconfdir = vars["sysconfdir"]
340 self.assertIsNotNone(sysconfdir)
341 # Need to use oe.path here as sysconfdir starts with /
342 hosttestdir = oe.path.join(rootfs, sysconfdir, "postinst-test")
343
344 for classes in ("package_rpm", "package_deb", "package_ipk"):
345 with self.subTest(package_class=classes):
346 features = 'CORE_IMAGE_EXTRA_INSTALL = "postinst-rootfs-failing"\n'
347 features += 'PACKAGE_CLASSES = "%s"\n' % classes
348 self.write_config(features)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800349 bb_result = bitbake('core-image-minimal', ignore_status=True)
350 self.assertGreaterEqual(bb_result.output.find("Postinstall scriptlets of ['postinst-rootfs-failing'] have failed."), 0,
Brad Bishop316dfdd2018-06-25 12:45:53 -0400351 "Warning about a failed scriptlet not found in bitbake output: %s" %(bb_result.output))
352
353 self.assertTrue(os.path.isfile(os.path.join(hosttestdir, "rootfs-before-failure")),
354 "rootfs-before-failure file was not created")
355 self.assertFalse(os.path.isfile(os.path.join(hosttestdir, "rootfs-after-failure")),
356 "rootfs-after-failure file was created")
357
Brad Bishop1d80a2e2019-11-15 16:35:03 -0500358class SystemTap(OESelftestTestCase):
359 """
360 Summary: The purpose of this test case is to verify native crosstap
361 works while talking to a target.
362 Expected: The script should successfully connect to the qemu machine
363 and run some systemtap examples on a qemu machine.
364 """
365
366 @classmethod
367 def setUpClass(cls):
368 super(SystemTap, cls).setUpClass()
369 cls.image = "core-image-minimal"
370
371 def default_config(self):
372 return """
373# These aren't the actual IP addresses but testexport class needs something defined
374TEST_SERVER_IP = "192.168.7.1"
375TEST_TARGET_IP = "192.168.7.2"
376
377EXTRA_IMAGE_FEATURES += "tools-profile dbg-pkgs"
378IMAGE_FEATURES_append = " ssh-server-dropbear"
379
380# enables kernel debug symbols
381KERNEL_EXTRA_FEATURES_append = " features/debug/debug-kernel.scc"
382KERNEL_EXTRA_FEATURES_append = " features/systemtap/systemtap.scc"
383
384# add systemtap run-time into target image if it is not there yet
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600385IMAGE_INSTALL_append = " systemtap-runtime"
Brad Bishop1d80a2e2019-11-15 16:35:03 -0500386"""
387
388 def test_crosstap_helloworld(self):
389 self.write_config(self.default_config())
390 bitbake('systemtap-native')
391 systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
392 bitbake(self.image)
393
394 with runqemu(self.image) as qemu:
395 cmd = "crosstap -r root@192.168.7.2 -s %s/general/helloworld.stp " % systemtap_examples
396 result = runCmd(cmd)
397 self.assertEqual(0, result.status, 'crosstap helloworld returned a non 0 status:%s' % result.output)
398
399 def test_crosstap_pstree(self):
400 self.write_config(self.default_config())
401
402 bitbake('systemtap-native')
403 systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
404 bitbake(self.image)
405
406 with runqemu(self.image) as qemu:
407 cmd = "crosstap -r root@192.168.7.2 -s %s/process/pstree.stp" % systemtap_examples
408 result = runCmd(cmd)
409 self.assertEqual(0, result.status, 'crosstap pstree returned a non 0 status:%s' % result.output)
410
411 def test_crosstap_syscalls_by_proc(self):
412 self.write_config(self.default_config())
413
414 bitbake('systemtap-native')
415 systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
416 bitbake(self.image)
417
418 with runqemu(self.image) as qemu:
419 cmd = "crosstap -r root@192.168.7.2 -s %s/process/ syscalls_by_proc.stp" % systemtap_examples
420 result = runCmd(cmd)
421 self.assertEqual(0, result.status, 'crosstap syscalls_by_proc returned a non 0 status:%s' % result.output)
422
423 def test_crosstap_syscalls_by_pid(self):
424 self.write_config(self.default_config())
425
426 bitbake('systemtap-native')
427 systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
428 bitbake(self.image)
429
430 with runqemu(self.image) as qemu:
431 cmd = "crosstap -r root@192.168.7.2 -s %s/process/ syscalls_by_pid.stp" % systemtap_examples
432 result = runCmd(cmd)
433 self.assertEqual(0, result.status, 'crosstap syscalls_by_pid returned a non 0 status:%s' % result.output)
434