summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils
diff options
context:
space:
mode:
authorbavery <brian.avery@intel.com>2016-09-09 09:38:54 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-16 15:24:02 +0100
commit92862c678f1da4f35f2576a0c15ea736d0ecb9d2 (patch)
tree98bd4186bb515341360430fb200a5e245e410679 /meta/lib/oeqa/utils
parentd0b4ac310bb8d4bfaa4db06a12e404a0f7c7253d (diff)
downloadpoky-92862c678f1da4f35f2576a0c15ea736d0ecb9d2.tar.gz
qemurunner: print out the runqemu command
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. (From OE-Core rev: 34aa20c6f323bbf7ad53beb643126e4e03634708) Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils')
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 9783ff88a5..1f98682f75 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -141,6 +141,8 @@ class QemuRunner:
141 else: 141 else:
142 logger.info('Not using kvm for runqemu') 142 logger.info('Not using kvm for runqemu')
143 launch_cmd += 'tcpserial=%s %s %s %s' % (self.serverport, self.machine, self.rootfs, self.qemuparams) 143 launch_cmd += 'tcpserial=%s %s %s %s' % (self.serverport, self.machine, self.rootfs, self.qemuparams)
144 logger.info('launchcmd=%s'%(launch_cmd))
145
144 # FIXME: We pass in stdin=subprocess.PIPE here to work around stty 146 # FIXME: We pass in stdin=subprocess.PIPE here to work around stty
145 # blocking at the end of the runqemu script when using this within 147 # blocking at the end of the runqemu script when using this within
146 # oe-selftest (this makes stty error out immediately). There ought 148 # oe-selftest (this makes stty error out immediately). There ought
@@ -149,12 +151,12 @@ class QemuRunner:
149 output = self.runqemu.stdout 151 output = self.runqemu.stdout
150 152
151 # 153 #
152 # We need the preexec_fn above so that all runqemu processes can easily be killed 154 # We need the preexec_fn above so that all runqemu processes can easily be killed
153 # (by killing their process group). This presents a problem if this controlling 155 # (by killing their process group). This presents a problem if this controlling
154 # process itself is killed however since those processes don't notice the death 156 # process itself is killed however since those processes don't notice the death
155 # of the parent and merrily continue on. 157 # of the parent and merrily continue on.
156 # 158 #
157 # Rather than hack runqemu to deal with this, we add something here instead. 159 # Rather than hack runqemu to deal with this, we add something here instead.
158 # Basically we fork off another process which holds an open pipe to the parent 160 # Basically we fork off another process which holds an open pipe to the parent
159 # and also is setpgrp. If/when the pipe sees EOF from the parent dieing, it kills 161 # and also is setpgrp. If/when the pipe sees EOF from the parent dieing, it kills
160 # the process group. This is like pctrl's PDEATHSIG but for a process group 162 # the process group. This is like pctrl's PDEATHSIG but for a process group