qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 05/32] qmp: Get rid of x-oob-test command


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 05/32] qmp: Get rid of x-oob-test command
Date: Tue, 3 Jul 2018 10:37:59 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 07/03/2018 03:53 AM, Markus Armbruster wrote:
tests/qmp-test tests an out-of-band command overtaking a slow in-band
command.  To do that, it needs:



Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>

R-b stands, although:

---

+static void setup_blocking_cmd(void)
+{
+    int rc;
+
+    if (!mkdtemp(tmpdir)) {
+        g_error("mkdtemp: %s", strerror(errno));
+    }
+    fifo_name = g_strdup_printf("%s/fifo", tmpdir);
+    rc = mkfifo(fifo_name, 0666);
+    g_assert(!rc);

It's weird seeing two error handling styles in close proximity; we could have done:

if (!mkdtemp(tmpdir)) {
    g_error(...)
}
fifo_name = ...
if (mkfifo(fifo_name, 0666)) {
    g_error(...)
}


+
+static void send_oob_cmd_that_fails(QTestState *s, const char *id)

Nice change of name compared to v1.

--
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]