diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2018-09-24 12:28:36 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2018-09-24 12:28:37 +0100 |
| commit | 09d8277eb0cc40e7b29c5d4795bb9aaa7d8bbdcc (patch) | |
| tree | 050199ca9486e0885c24b033dc5d01f80a75bb9e /tests/qmp-cmd-test.c | |
| parent | 2fde22f8ae1a69253dff5c7a73c39d3a72fa94a1 (diff) | |
| parent | ae6bf766048ecaeef90b85c4fb2b4db2aa0c094c (diff) | |
| download | focaccia-qemu-09d8277eb0cc40e7b29c5d4795bb9aaa7d8bbdcc.tar.gz focaccia-qemu-09d8277eb0cc40e7b29c5d4795bb9aaa7d8bbdcc.zip | |
Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2018-08-31' into staging
Removal of deprecated options and improvements for the qtests # gpg: Signature made Fri 31 Aug 2018 09:10:23 BST # gpg: using RSA key 2ED9D774FE702DB5 # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" # gpg: aka "Thomas Huth <thuth@redhat.com>" # gpg: aka "Thomas Huth <huth@tuxfamily.org>" # gpg: aka "Thomas Huth <th.huth@posteo.de>" # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/huth-gitlab/tags/pull-request-2018-08-31: tests: add a qmp success-response test tests: add qmp/qom-set-without-value test tests: add qmp/object-add-without-props test tests: add qmp_assert_error_class() tests/libqos: Utilize newer glib spawn check net: Remove the deprecated -tftp, -bootp, -redir and -smb options Remove the deprecated options -startdate, -localtime and -rtc-td-hack Remove the deprecated -nodefconfig option Remove the deprecated -balloon option Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/qmp-cmd-test.c')
| -rw-r--r-- | tests/qmp-cmd-test.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/qmp-cmd-test.c b/tests/qmp-cmd-test.c index c5b70df974..d12cac539c 100644 --- a/tests/qmp-cmd-test.c +++ b/tests/qmp-cmd-test.c @@ -197,6 +197,19 @@ static void add_query_tests(QmpSchema *schema) } } +static void test_object_add_without_props(void) +{ + QTestState *qts; + QDict *resp; + + qts = qtest_init(common_args); + resp = qtest_qmp(qts, "{'execute': 'object-add', 'arguments':" + " {'qom-type': 'memory-backend-ram', 'id': 'ram1' } }"); + g_assert_nonnull(resp); + qmp_assert_error_class(resp, "GenericError"); + qtest_quit(qts); +} + int main(int argc, char *argv[]) { QmpSchema schema; @@ -206,6 +219,11 @@ int main(int argc, char *argv[]) qmp_schema_init(&schema); add_query_tests(&schema); + + qtest_add_func("qmp/object-add-without-props", + test_object_add_without_props); + /* TODO: add coverage of generic object-add failure modes */ + ret = g_test_run(); qmp_schema_cleanup(&schema); |