test-qga: Clean up how we test QGA synchronization
authorMarkus Armbruster <armbru@redhat.com>
Thu, 23 Aug 2018 16:39:34 +0000 (18:39 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 24 Aug 2018 18:26:37 +0000 (20:26 +0200)
commite2f64a688b70e2e6882b534f9a6a68ef589c261d
treeeb024f8eb3480d2ed6e405562196be933aa4f129
parentaed877c53b5b8760b3fdb3605a212188c60f2eb3
test-qga: Clean up how we test QGA synchronization

To permit recovering from arbitrary JSON parse errors, the JSON parser
resets itself on lexical errors.  We recommend sending a 0xff byte for
that purpose, and test-qga covers this usage since commit 5229564b832.
That commit had to add an ugly hack to qmp_fd_vsend() to make capable
of sending this byte (it's designed to send only valid JSON).

The previous commit added a way to send arbitrary text.  Put that to
use for this purpose, and drop the hack from qmp_fd_vsend().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180823164025.12553-8-armbru@redhat.com>
tests/libqtest.c
tests/libqtest.h
tests/test-qga.c