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 <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
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