[libvirt] [PATCH 2/5] Add helper library for testing the qemu monitor code

Eric Blake eblake at redhat.com
Mon Aug 20 14:11:14 UTC 2012


On 08/20/2012 07:49 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> To be able to test the QEMU monitor code, we need to have a fake
> QEMU monitor server. This introduces a simple (dumb) framework
> that can do this. The test case registers a series of items to
> be sent back as replies to commands that will be executed. A
> thread runs the event loop looking for incoming replies and
> sending back this pre-registered data. This allows testing all
> QEMU monitor code that deals with parsing responses and errors
> from QEMU, without needing QEMU around

Very sorely needed.  Thanks for hacking this up, and hopefully it is
easily extensible.

> +++ b/cfg.mk
> @@ -741,7 +741,7 @@ exclude_file_name_regexp--sc_copyright_address = \
>  exclude_file_name_regexp--sc_flags_usage = ^(docs/|src/util/virnetdevtap\.c$$)
>  
>  exclude_file_name_regexp--sc_libvirt_unmarked_diagnostics = \
> -  ^src/rpc/gendispatch\.pl$$
> +  ^(src/rpc/gendispatch\.pl$$|tests/)

A rather heavy hammer for just one added test, but makes sense (tests
aren't installed, so translating them is pointless).

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120820/1d81547c/attachment-0001.sig>


More information about the libvir-list mailing list