[libvirt] [PATCH 1/2] tests: Fake host capabilities properly

Eric Blake eblake at redhat.com
Tue Feb 15 16:13:59 UTC 2011


On 02/15/2011 07:53 AM, Jiri Denemark wrote:
> Since we fake host CPU we should also fake host arch instead of taking
> the real architecture tests are running on.
> ---
>  tests/testutilsqemu.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c
> index bfac307..fbbb6c1 100644
> --- a/tests/testutilsqemu.c
> +++ b/tests/testutilsqemu.c
> @@ -95,7 +95,7 @@ virCapsPtr testQemuCapsInit(void) {
>      };
>  
>      uname (&utsname);
> -    if ((caps = virCapabilitiesNew(utsname.machine,
> +    if ((caps = virCapabilitiesNew(host_cpu.arch,

Since this was the last use of utsname in the test file (a good thing!),
the uname() call, the struct utsname declaration, and the #include
<sys/utsname.h> in this file are all now dead code.

ACK with that additional cleanup.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list