mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
qemuagenttest: Use real x86_64 capabilities for parsing domain definitions
Some test cases require a real definition and thus parse a XML with the definition to obtain it. Convert the code to use real capabilities and switch to x86_64. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
86edcfac4d
commit
f45aff1635
@ -5,7 +5,7 @@
|
|||||||
<currentMemory unit='KiB'>219136</currentMemory>
|
<currentMemory unit='KiB'>219136</currentMemory>
|
||||||
<vcpu placement='static'>1</vcpu>
|
<vcpu placement='static'>1</vcpu>
|
||||||
<os>
|
<os>
|
||||||
<type arch='i686' machine='pc'>hvm</type>
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
<boot dev='hd'/>
|
<boot dev='hd'/>
|
||||||
</os>
|
</os>
|
||||||
<clock offset='utc'/>
|
<clock offset='utc'/>
|
||||||
@ -13,7 +13,7 @@
|
|||||||
<on_reboot>restart</on_reboot>
|
<on_reboot>restart</on_reboot>
|
||||||
<on_crash>destroy</on_crash>
|
<on_crash>destroy</on_crash>
|
||||||
<devices>
|
<devices>
|
||||||
<emulator>/usr/bin/qemu-system-i386</emulator>
|
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||||
<disk type='file' device='disk'>
|
<disk type='file' device='disk'>
|
||||||
<source file='/tmp/idedisk.img'/>
|
<source file='/tmp/idedisk.img'/>
|
||||||
<target dev='hdc' bus='ide'/>
|
<target dev='hdc' bus='ide'/>
|
||||||
|
@ -1359,11 +1359,19 @@ testQemuAgentTimezone(const void *data)
|
|||||||
static int
|
static int
|
||||||
mymain(void)
|
mymain(void)
|
||||||
{
|
{
|
||||||
|
g_autoptr(GHashTable) capslatest = testQemuGetLatestCaps();
|
||||||
|
g_autoptr(GHashTable) capscache = virHashNew(virObjectUnref);
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (qemuTestDriverInit(&driver) < 0)
|
if (qemuTestDriverInit(&driver) < 0)
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
|
/* Some test cases need a real definition thus parse a XML. We need
|
||||||
|
* qemu capabilities for that. */
|
||||||
|
if (testQemuInsertRealCaps(driver.qemuCapsCache, "x86_64", "latest", "",
|
||||||
|
capslatest, capscache, NULL, NULL) < 0)
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
virEventRegisterDefaultImpl();
|
virEventRegisterDefaultImpl();
|
||||||
|
|
||||||
#define DO_TEST(name) \
|
#define DO_TEST(name) \
|
||||||
|
Loading…
Reference in New Issue
Block a user