All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Eric Blake" <eblake@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [Qemu-devel] [PULL 8/9] tests: add qmp/qom-set-without-value test
Date: Fri, 31 Aug 2018 10:38:57 +0200	[thread overview]
Message-ID: <1535704738-8986-9-git-send-email-thuth@redhat.com> (raw)
In-Reply-To: <1535704738-8986-1-git-send-email-thuth@redhat.com>

From: Marc-André Lureau <marcandre.lureau@redhat.com>

test_qom_set_without_value() 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).  I wrote that test
earlier, to cover QMP level as well, the test could go into qmp-test.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
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 b347228..2b923f0 100644
--- a/tests/qmp-test.c
+++ b/tests/qmp-test.c
@@ -321,6 +321,19 @@ static void test_qmp_preconfig(void)
     qtest_quit(qs);
 }
 
+static void test_qom_set_without_value(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);
@@ -328,6 +341,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/qom-set-without-value", test_qom_set_without_value);
 
     return g_test_run();
 }
-- 
1.8.3.1

  parent reply	other threads:[~2018-08-31  8:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31  8:38 [Qemu-devel] [PULL 0/9] Removal of deprecated options and improvements for qtests Thomas Huth
2018-08-31  8:38 ` [Qemu-devel] [PULL 1/9] Remove the deprecated -balloon option Thomas Huth
2018-08-31  8:38 ` [Qemu-devel] [PULL 2/9] Remove the deprecated -nodefconfig option Thomas Huth
2018-08-31  8:38 ` [Qemu-devel] [PULL 3/9] Remove the deprecated options -startdate, -localtime and -rtc-td-hack Thomas Huth
2018-08-31  8:38 ` [Qemu-devel] [PULL 4/9] net: Remove the deprecated -tftp, -bootp, -redir and -smb options Thomas Huth
2018-08-31  8:38 ` [Qemu-devel] [PULL 5/9] tests/libqos: Utilize newer glib spawn check Thomas Huth
2018-08-31  8:38 ` [Qemu-devel] [PULL 6/9] tests: add qmp_assert_error_class() Thomas Huth
2018-08-31  8:38 ` [Qemu-devel] [PULL 7/9] tests: add qmp/object-add-without-props test Thomas Huth
2018-08-31  8:38 ` Thomas Huth [this message]
2018-08-31 12:04   ` [Qemu-devel] [PULL 8/9] tests: add qmp/qom-set-without-value test Markus Armbruster
2018-08-31 13:18     ` Thomas Huth
2018-08-31 13:24       ` Marc-André Lureau
2018-08-31 13:40         ` Thomas Huth
2018-08-31 14:35           ` Markus Armbruster
2018-09-03  4:45             ` Thomas Huth
2018-10-09 16:41             ` Markus Armbruster
2018-10-29  6:49               ` Marc-André Lureau
2018-10-29  8:38                 ` Markus Armbruster
2018-08-31  8:38 ` [Qemu-devel] [PULL 9/9] tests: add a qmp success-response test Thomas Huth

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=1535704738-8986-9-git-send-email-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=eblake@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.