tests/test-qmp-cmds: Factor out qmp_dispatch() test helpers
commit3306459a78b210290583d47639ad37e6e0556bac
authorMarkus Armbruster <armbru@redhat.com>
Tue, 17 Mar 2020 11:54:30 +0000 (17 12:54 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 17 Mar 2020 18:58:34 +0000 (17 19:58 +0100)
treec4b015ef39803476385313ae76889225d0194e65
parent86014c64f9a1509ab2a99d864b606882584e1f58
tests/test-qmp-cmds: Factor out qmp_dispatch() test helpers

Checking the value of qmp_dispatch() is repetitive.  Factor out
helpers do_qmp_dispatch() and do_qmp_dispatch_error().  Without this,
the next commit would make things even more repetitive.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200317115459.31821-6-armbru@redhat.com>
tests/test-qmp-cmds.c