From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Thomas Huth" <thuth@redhat.com>
Subject: [Qemu-devel] [PULL 1/3] tests: add qmp/missing-any-arg test
Date: Tue, 20 Nov 2018 11:52:21 +0100 [thread overview]
Message-ID: <1542711143-1946-2-git-send-email-thuth@redhat.com> (raw)
In-Reply-To: <1542711143-1946-1-git-send-email-thuth@redhat.com>
From: Marc-André Lureau <marcandre.lureau@redhat.com>
test_qmp_missing_any_arg() is about a bug in infrastructure used by
the QMP core, fixed in commit c489780203. We covered the bug in
infrastructure unit tests (commit bce3035a44). Let's test
it at the QMP level as well.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[thuth: Tweaked the commit message according to Markus' suggestion]
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qmp-test.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/tests/qmp-test.c b/tests/qmp-test.c
index 6c419f6..7517be4 100644
--- a/tests/qmp-test.c
+++ b/tests/qmp-test.c
@@ -318,6 +318,19 @@ static void test_qmp_preconfig(void)
qtest_quit(qs);
}
+static void test_qmp_missing_any_arg(void)
+{
+ QTestState *qts;
+ QDict *resp;
+
+ qts = qtest_init(common_args);
+ resp = qtest_qmp(qts, "{'execute': 'qom-set', 'arguments':"
+ " { 'path': '/machine', 'property': 'rtc-time' } }");
+ g_assert_nonnull(resp);
+ qmp_assert_error_class(resp, "GenericError");
+ qtest_quit(qts);
+}
+
int main(int argc, char *argv[])
{
g_test_init(&argc, &argv, NULL);
@@ -325,6 +338,7 @@ int main(int argc, char *argv[])
qtest_add_func("qmp/protocol", test_qmp_protocol);
qtest_add_func("qmp/oob", test_qmp_oob);
qtest_add_func("qmp/preconfig", test_qmp_preconfig);
+ qtest_add_func("qmp/missing-any-arg", test_qmp_missing_any_arg);
return g_test_run();
}
--
1.8.3.1
next prev parent reply other threads:[~2018-11-20 10:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-20 10:52 [Qemu-devel] [PULL 0/3] qtest patches Thomas Huth
2018-11-20 10:52 ` Thomas Huth [this message]
2018-11-20 10:52 ` [Qemu-devel] [PULL 2/3] tests/ide: Free pcibus when finishing a test Thomas Huth
2018-11-20 10:52 ` [Qemu-devel] [PULL 3/3] qtest: log QEMU command line Thomas Huth
2018-11-20 11:36 ` [Qemu-devel] [PULL 0/3] qtest patches Peter Maydell
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=1542711143-1946-2-git-send-email-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=armbru@redhat.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=peter.maydell@linaro.org \
--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).