From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>,
Marcel Apfelbaum <marcel@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: [Qemu-devel] [PATCH v3 2/3] qemu.py: Add QEMUMachine.exitcode() method
Date: Fri, 26 May 2017 15:11:59 -0300 [thread overview]
Message-ID: <20170526181200.17227-3-ehabkost@redhat.com> (raw)
In-Reply-To: <20170526181200.17227-1-ehabkost@redhat.com>
Allow the exit code of QEMU to be queried by scripts.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
scripts/qemu.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 16934f1e02..ebe1c4b919 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -88,6 +88,10 @@ class QEMUMachine(object):
def is_running(self):
return self._popen and (self._popen.returncode is None)
+ def exitcode(self):
+ if self._popen:
+ return self._popen.returncode
+
def get_pid(self):
if not self.is_running():
return None
--
2.11.0.259.g40922b1
next prev parent reply other threads:[~2017-05-26 18:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 18:11 [Qemu-devel] [PATCH v3 0/3] script for crash-testing -device Eduardo Habkost
2017-05-26 18:11 ` [Qemu-devel] [PATCH v3 1/3] qemu.py: Don't set _popen=None on error/shutdown Eduardo Habkost
2017-05-29 16:44 ` Markus Armbruster
2017-05-26 18:11 ` Eduardo Habkost [this message]
2017-05-29 16:53 ` [Qemu-devel] [PATCH v3 2/3] qemu.py: Add QEMUMachine.exitcode() method Markus Armbruster
2017-05-29 17:04 ` Eduardo Habkost
2017-05-30 5:25 ` Markus Armbruster
2017-05-26 18:12 ` [Qemu-devel] [PATCH v3 3/3] scripts: Test script to look for -device crashes Eduardo Habkost
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=20170526181200.17227-3-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=armbru@redhat.com \
--cc=marcel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).