* [PATCH 0/1] qemurunner:log testimage qemu launch command @ 2016-09-09 16:38 bavery 2016-09-09 16:38 ` [PATCH 1/1] qemurunner: print out the runqemu command bavery 0 siblings, 1 reply; 4+ messages in thread From: bavery @ 2016-09-09 16:38 UTC (permalink / raw) To: openembedded-core This logs the command that "bitbake <image> -c testimage" used to launch qemu. This is helpful if a test failed and you would like to manually start qemu in the same way to debug the failed test. With this addition you can just cut and paste the runqemu command from the log.do_testimage file. -b The following changes since commit 2679a347c576f5411fbe802d2f6201c94036ecb2: maintainers.inc: rename gtk-doc-stub to gtk-doc, reassign to me (2016-09-09 12:12:59 +0100) are available in the git repository at: git://git.yoctoproject.org/poky-contrib bavery/log-runqemu http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/log-runqemu bavery (1): qemurunner: print out the runqemu command meta/lib/oeqa/utils/qemurunner.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 1.9.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] qemurunner: print out the runqemu command 2016-09-09 16:38 [PATCH 0/1] qemurunner:log testimage qemu launch command bavery @ 2016-09-09 16:38 ` bavery 2016-09-12 8:19 ` Joshua Lock 0 siblings, 1 reply; 4+ messages in thread From: bavery @ 2016-09-09 16:38 UTC (permalink / raw) To: openembedded-core This logs the launch command that was used for runqemu while running -c testimage. This way, if I'd like to easily launch qemu manually in order to debug a failed test, I know what commmand was run to create the qemu instance. Signed-off-by: bavery <brian.avery@intel.com> --- meta/lib/oeqa/utils/qemurunner.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 9783ff8..1f98682 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py @@ -141,6 +141,8 @@ class QemuRunner: else: logger.info('Not using kvm for runqemu') launch_cmd += 'tcpserial=%s %s %s %s' % (self.serverport, self.machine, self.rootfs, self.qemuparams) + logger.info('launchcmd=%s'%(launch_cmd)) + # FIXME: We pass in stdin=subprocess.PIPE here to work around stty # blocking at the end of the runqemu script when using this within # oe-selftest (this makes stty error out immediately). There ought @@ -149,12 +151,12 @@ class QemuRunner: output = self.runqemu.stdout # - # We need the preexec_fn above so that all runqemu processes can easily be killed + # We need the preexec_fn above so that all runqemu processes can easily be killed # (by killing their process group). This presents a problem if this controlling - # process itself is killed however since those processes don't notice the death + # process itself is killed however since those processes don't notice the death # of the parent and merrily continue on. # - # Rather than hack runqemu to deal with this, we add something here instead. + # Rather than hack runqemu to deal with this, we add something here instead. # Basically we fork off another process which holds an open pipe to the parent # and also is setpgrp. If/when the pipe sees EOF from the parent dieing, it kills # the process group. This is like pctrl's PDEATHSIG but for a process group -- 1.9.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] qemurunner: print out the runqemu command 2016-09-09 16:38 ` [PATCH 1/1] qemurunner: print out the runqemu command bavery @ 2016-09-12 8:19 ` Joshua Lock 2016-09-12 16:29 ` Brian Avery 0 siblings, 1 reply; 4+ messages in thread From: Joshua Lock @ 2016-09-12 8:19 UTC (permalink / raw) To: bavery, openembedded-core On Fri, 2016-09-09 at 09:38 -0700, bavery wrote: > This logs the launch command that was used for runqemu while running > -c > testimage. This way, if I'd like to easily launch qemu manually in > order to debug a failed test, I know what commmand was run to create > the qemu instance. I already have this in my runqemu output: runqemu - INFO - Running /home/joshuagl/Projects/poky/build/tmp/sysroots/x86_64- linux/usr/bin/qemu-system-ppc -net tap,vlan=0,ifname=tap0,script=no,downscript=no -net nic,model=pcnet - machine mac99 -cpu G4 -m 256 -drive file=/home/joshuagl/mess/35/core- image-lsb-qemuppc-20160902090100.rootfs.ext4,if=virtio,format=raw - show-cursor -usb -usbdevice tablet -device virtio-rng-pci -kernel /home/joshuagl/mess/35/vmlinux-qemuppc.bin -append 'root=/dev/vda rw highres=off mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 console=ttyS0 console=tty' ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] qemurunner: print out the runqemu command 2016-09-12 8:19 ` Joshua Lock @ 2016-09-12 16:29 ` Brian Avery 0 siblings, 0 replies; 4+ messages in thread From: Brian Avery @ 2016-09-12 16:29 UTC (permalink / raw) To: Joshua Lock; +Cc: openembedded-core [-- Attachment #1: Type: text/plain, Size: 1773 bytes --] true, you do, kind of. This commit explicitly prints out what the runqemu cmd is (for instance "runqemu snapshot -m 1024"), which is a lot easier to enter if you want to rerun qemu the way the test did. It's not a big deal, I just ended up adding it while i was trying to figure out how the tests were getting started and where my params were ending up. Your's prints out the long complete cmd line, mine prints out the shortcut :). The long one is definitely necessary. Mine is a convenience. -b an intel employee. On Mon, Sep 12, 2016 at 1:19 AM, Joshua Lock <joshua.g.lock@linux.intel.com> wrote: > On Fri, 2016-09-09 at 09:38 -0700, bavery wrote: > > This logs the launch command that was used for runqemu while running > > -c > > testimage. This way, if I'd like to easily launch qemu manually in > > order to debug a failed test, I know what commmand was run to create > > the qemu instance. > > I already have this in my runqemu output: > > runqemu - INFO - Running > /home/joshuagl/Projects/poky/build/tmp/sysroots/x86_64- > linux/usr/bin/qemu-system-ppc -net > tap,vlan=0,ifname=tap0,script=no,downscript=no -net nic,model=pcnet - > machine mac99 -cpu G4 -m 256 -drive file=/home/joshuagl/mess/35/core- > image-lsb-qemuppc-20160902090100.rootfs.ext4,if=virtio,format=raw - > show-cursor -usb -usbdevice tablet -device virtio-rng-pci -kernel > /home/joshuagl/mess/35/vmlinux-qemuppc.bin -append 'root=/dev/vda rw > highres=off mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 > console=ttyS0 console=tty' > > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core > [-- Attachment #2: Type: text/html, Size: 2616 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-12 16:29 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-09-09 16:38 [PATCH 0/1] qemurunner:log testimage qemu launch command bavery 2016-09-09 16:38 ` [PATCH 1/1] qemurunner: print out the runqemu command bavery 2016-09-12 8:19 ` Joshua Lock 2016-09-12 16:29 ` Brian Avery
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox