On 03/29/2018 06:38 PM, Eduardo Habkost wrote: > This will allow us to log QEMU crashes even if the test code uses > .wait() instead of .shutdown(). > > Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> > --- > scripts/qemu.py | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/scripts/qemu.py b/scripts/qemu.py > index 226d2c4d48..e19e4b34d0 100644 > --- a/scripts/qemu.py > +++ b/scripts/qemu.py > @@ -225,6 +225,15 @@ class QEMUMachine(object): > shutil.rmtree(self._temp_dir) > self._temp_dir = None > > + exitcode = self.exitcode() > + if exitcode is not None and exitcode < 0: > + msg = 'qemu received signal %i: %s' > + if self._qemu_full_args: > + command = ' '.join(self._qemu_full_args) > + else: > + command = '' > + LOG.warn(msg, exitcode, command) > + > self._launched = False > > def launch(self): > @@ -279,15 +288,6 @@ class QEMUMachine(object): > > self.wait() > > - exitcode = self.exitcode() > - if exitcode is not None and exitcode < 0: > - msg = 'qemu received signal %i: %s' > - if self._qemu_full_args: > - command = ' '.join(self._qemu_full_args) > - else: > - command = '' > - LOG.warn(msg, exitcode, command) > - > def qmp(self, cmd, conv_keys=True, **args): > '''Invoke a QMP command and return the response dict''' > qmp_args = dict() >