From: armbru@redhat.com
To: qemu-devel@nongnu.org
Cc: afaerber@suse.de
Subject: [Qemu-devel] [PATCH 2/2] qom-test: Test shutdown in addition to startup
Date: Fri, 10 Jan 2014 14:31:39 +0100 [thread overview]
Message-ID: <1389360699-9183-3-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1389360699-9183-1-git-send-email-armbru@redhat.com>
From: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
tests/qom-test.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/qom-test.c b/tests/qom-test.c
index 3cbd480..8f42716 100644
--- a/tests/qom-test.c
+++ b/tests/qom-test.c
@@ -48,17 +48,17 @@ static bool is_blacklisted(const char *arch, const char *mach)
return false;
}
-static void test_nop(gconstpointer data)
+static void test_machine(gconstpointer data)
{
- QTestState *s;
const char *machine = data;
char *args;
+ QDict *response;
args = g_strdup_printf("-machine %s", machine);
- s = qtest_start(args);
- if (s) {
- qtest_quit(s);
- }
+ qtest_start(args);
+ response = qmp("{ 'execute': 'quit' }");
+ g_assert(qdict_haskey(response, "return"));
+ qtest_end();
g_free(args);
}
@@ -88,7 +88,7 @@ static void add_machine_test_cases(void)
mname = qstring_get_str(qstr);
if (!is_blacklisted(arch, mname)) {
path = g_strdup_printf("/%s/qom/%s", arch, mname);
- g_test_add_data_func(path, mname, test_nop);
+ g_test_add_data_func(path, mname, test_machine);
}
}
qtest_end();
--
1.8.1.4
prev parent reply other threads:[~2014-01-10 13:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-10 13:31 [Qemu-devel] [PATCH 0/2] qom-test: Improve coverage armbru
2014-01-10 13:31 ` [Qemu-devel] [PATCH 1/2] qom-test: Run for all available machines armbru
2014-01-10 13:42 ` Markus Armbruster
2014-01-10 13:51 ` Alexander Graf
2014-01-10 14:17 ` Andreas Färber
2014-01-23 14:41 ` Andreas Färber
2014-01-23 15:40 ` Peter Maydell
2014-01-23 15:45 ` Andreas Färber
2014-01-23 16:00 ` Peter Maydell
2014-01-23 17:14 ` Andreas Färber
2014-01-23 14:54 ` Markus Armbruster
2014-01-31 12:33 ` Andreas Färber
2014-01-31 13:42 ` Markus Armbruster
2014-02-03 12:40 ` Markus Armbruster
2014-02-05 15:47 ` Andreas Färber
2014-02-05 17:51 ` Stefano Stabellini
2014-01-10 13:31 ` armbru [this message]
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=1389360699-9183-3-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=afaerber@suse.de \
--cc=qemu-devel@nongnu.org \
/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).