lib/qemu.c: Turn debug messages which are really errors into error()

Commit 669eda1e24 ("lib/launch-direct.c: Simplify test for KVM, remove
qemu caching") made it so that failure of generic_qmp_test() will
cause launch to fail.  However we still used debug messages to print
the error, so unless you have debugging enabled you wouldn't see any
error message if this function fails.

Updates: commit 669eda1e24
This commit is contained in:
Richard W.M. Jones
2026-01-19 10:18:59 +00:00
parent d16be4592b
commit 0fe8c0492c

View File

@@ -109,7 +109,7 @@ generic_qmp_test (guestfs_h *g, const char *qmp_command, char **outp)
len = getline (&line, &allocsize, fp); /* line 1 */
if (len == -1 || strstr (line, "\"QMP\"") == NULL) {
parse_failure:
debug (g, "did not understand QMP monitor output from %s", g->hv);
error (g, "did not understand QMP monitor output from %s", g->hv);
return -1;
}
len = getline (&line, &allocsize, fp); /* line 2 */
@@ -126,7 +126,7 @@ generic_qmp_test (guestfs_h *g, const char *qmp_command, char **outp)
r = guestfs_int_cmd_pipe_wait (cmd);
/* QMP tests are optional, don't fail if the tests fail. */
if (r == -1 || !WIFEXITED (r) || WEXITSTATUS (r) != 0) {
debug (g, "%s wait failed or unexpected exit status", g->hv);
error (g, "%s wait failed or unexpected exit status", g->hv);
return -1;
}