[libvirt] [PATCH 1/6] tests: Print XML file name in verbose CPU test

Eric Blake eblake at redhat.com
Sat Jan 7 13:07:52 UTC 2012


On 01/06/2012 08:04 AM, Jiri Denemark wrote:
> It's not totally obvious that a failure in
>     CPU guest data(x86): host/guest (models, pref="qemu64")
> test means one needs to fix
>     x86-host+guest,models,qemu64-result.xml
> where the expected XML is stored. Better to provide a nice hint in
> verbose mode for failed tests.
> ---
>  tests/cputest.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/tests/cputest.c b/tests/cputest.c
> index 36b3eb4..5b7b951 100644
> --- a/tests/cputest.c
> +++ b/tests/cputest.c
> @@ -180,6 +180,8 @@ cpuTestCompareXML(const char *arch,
>          goto cleanup;
>  
>      if (STRNEQ(expected, actual)) {
> +        if (virTestGetVerbose())
> +            fprintf(stderr, "\nCompared to %s-%s.xml", arch, name);

I'm guessing this helped you debug later patches in the series :)

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/20120107/2fc8d3dd/attachment-0001.sig>


More information about the libvir-list mailing list