]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
tests: Teach qemuxml2argvtest about spapr-vio addresses
authorMichael Ellerman <michael@ellerman.id.au>
Fri, 13 Jan 2012 03:39:24 +0000 (14:39 +1100)
committerEric Blake <eblake@redhat.com>
Fri, 13 Jan 2012 23:08:22 +0000 (16:08 -0700)
commit69dde2e6538f99edca3c8738e1d72e5179829632
treea98c20c9d385a2bba439366a30767f50dc076414
parent8611d9c3d8c76df2c4631c262734fb87bf341dc6
tests: Teach qemuxml2argvtest about spapr-vio addresses

We can't call qemuCapsExtractVersionInfo() from test code, because it
expects to be able to call the emulator, and for testing we have fake
emulators that can't be executed. For that reason qemuxml2argvtest.c
doesn't call qemuDomainAssignPCIAddresses(), instead it open codes its
own version.

That means we can't call qemuDomainAssignAddresses() from the test code,
instead we need to manually call qemuDomainAssignSpaprVioAddresses().

Also add logic to cope with qemuDomainAssignSpaprVioAddresses() failing,
so that we can write a test that checks for a known failure in there.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
src/qemu/qemu_command.c
src/qemu/qemu_command.h
tests/qemuxml2argvtest.c