qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 16/32] tests/qmp-test: Demonstrate QMP errors ju


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 16/32] tests/qmp-test: Demonstrate QMP errors jumping the queue
Date: Mon, 2 Jul 2018 21:07:05 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 07/02/2018 11:22 AM, Markus Armbruster wrote:
When OOB is enabled, out-of-band commands are executed right away,
everything else is queued.  This lets out-of-band commands "jump the
queue".

However, certain errors are always reported right away, and therefore
can jump the queue even when the erroneous input does not request
out-of-band execution.  These errors are pretty unlikely to occur in
production, but it's wrong all the same.  Mark FIXME.

Ouch.


Signed-off-by: Markus Armbruster <address@hidden>
---
  monitor.c        | 1 +
  tests/qmp-test.c | 7 +++++++
  2 files changed, 8 insertions(+)


+++ b/tests/qmp-test.c
@@ -239,6 +239,13 @@ static void test_qmp_oob(void)
      unblock_blocked_cmd();
      recv_cmd_id(qts, "ib-blocks-1");
      recv_cmd_id(qts, "ib-quick-1");
+
+    /* FIXME certain in-band errors overtake slow in-band command */
+    send_cmd_that_blocks(qts, "blocks-2");
+    qtest_async_qmp(qts, "{ 'id': 'err-2' }");

Since this has neither 'execute' nor 'exec-oob', we can't state whether it is in-band or out-of-band; back-compatibility says it should be treated as in-band.

+    recv_cmd_id(qts, NULL);
+    unblock_blocked_cmd();
+    recv_cmd_id(qts, "blocks-2");

Thus, it should have been queued until after blocks-2 completed.

Useful test.
Reviewed-by: Eric Blake <address@hidden>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]