mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
tests: assume JSON in qemuMonitorTestIO
The QMP monitor only uses a newline to separate lines, while HMP and the guest agent also use a carriage return. In preparation to dropping support for testing HMP interaction, only skip the carriage return if we're dealing with the guest agent, removing the need to check the 'json' field. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
27f866ba8a
commit
1c4246102a
@ -296,7 +296,7 @@ qemuMonitorTestIO(virNetSocketPtr sock,
|
||||
*/
|
||||
t1 = test->incoming;
|
||||
while ((t2 = strstr(t1, "\n")) ||
|
||||
(!test->json && (t2 = strstr(t1, "\r")))) {
|
||||
(test->agent && (t2 = strstr(t1, "\r")))) {
|
||||
*t2 = '\0';
|
||||
|
||||
if (qemuMonitorTestProcessCommand(test, t1) < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user