[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 10/32] tests/test-qga: Demonstrate the guest-agent
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL v2 10/32] tests/test-qga: Demonstrate the guest-agent ignores "control" |
Date: |
Tue, 3 Jul 2018 23:35:34 +0200 |
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
---
tests/test-qga.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/tests/test-qga.c b/tests/test-qga.c
index 564a4594b5..2e9e0f73bb 100644
--- a/tests/test-qga.c
+++ b/tests/test-qga.c
@@ -243,6 +243,22 @@ static void test_qga_invalid_id(gconstpointer fix)
qobject_unref(ret);
}
+static void test_qga_invalid_oob(gconstpointer fix)
+{
+ /* FIXME "control" is ignored; it should be rejected */
+ const TestFixture *fixture = fix;
+ QDict *ret;
+
+ ret = qmp_fd(fixture->fd, "{'execute': 'guest-ping',"
+ " 'control': {'run-oob': true}}");
+ g_assert_nonnull(ret);
+ qmp_assert_no_error(ret);
+
+ qdict_get_qdict(ret, "return");
+
+ qobject_unref(ret);
+}
+
static void test_qga_invalid_args(gconstpointer fix)
{
const TestFixture *fixture = fix;
@@ -951,6 +967,7 @@ int main(int argc, char **argv)
g_test_add_data_func("/qga/file-write-read", &fix,
test_qga_file_write_read);
g_test_add_data_func("/qga/get-time", &fix, test_qga_get_time);
g_test_add_data_func("/qga/invalid-id", &fix, test_qga_invalid_id);
+ g_test_add_data_func("/qga/invalid-oob", &fix, test_qga_invalid_oob);
g_test_add_data_func("/qga/invalid-cmd", &fix, test_qga_invalid_cmd);
g_test_add_data_func("/qga/invalid-args", &fix, test_qga_invalid_args);
g_test_add_data_func("/qga/fsfreeze-status", &fix,
--
2.17.1
- [Qemu-devel] [PULL v2 00/32] Monitor patches for 2018-07-03, Markus Armbruster, 2018/07/03
- [Qemu-devel] [PULL v2 04/32] qmp: Document COMMAND_DROPPED design flaw, Markus Armbruster, 2018/07/03
- [Qemu-devel] [PULL v2 14/32] qmp: Always free QMPRequest with qmp_request_free(), Markus Armbruster, 2018/07/03
- [Qemu-devel] [PULL v2 02/32] monitor: Spell "I/O thread" consistently in comments, Markus Armbruster, 2018/07/03
- [Qemu-devel] [PULL v2 10/32] tests/test-qga: Demonstrate the guest-agent ignores "control",
Markus Armbruster <=
- [Qemu-devel] [PULL v2 03/32] docs/interop/qmp: Improve OOB documentation, Markus Armbruster, 2018/07/03
- [Qemu-devel] [PULL v2 13/32] qmp: Revert change to handle_qmp_command tracepoint, Markus Armbruster, 2018/07/03
- [Qemu-devel] [PULL v2 32/32] qapi: Polish command flags documentation in qapi-code-gen.txt, Markus Armbruster, 2018/07/03
- [Qemu-devel] [PULL v2 16/32] tests/qmp-test: Demonstrate QMP errors jumping the queue, Markus Armbruster, 2018/07/03
- [Qemu-devel] [PULL v2 27/32] qmp: Add some comments around null responses, Markus Armbruster, 2018/07/03
- [Qemu-devel] [PULL v2 20/32] monitor: Peel off @mon_global wrapper, Markus Armbruster, 2018/07/03
- [Qemu-devel] [PULL v2 15/32] qmp: Simplify code around monitor_qmp_dispatch_one(), Markus Armbruster, 2018/07/03