mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-10 07:20:02 +00:00
f81ee7b549
Downstream CI recently encountered failures of libxlxml2domconfigtest when building libvirt packages against Xen 4.17 rc3 packages. The test fails on vnuma_hvm config, where suddently the actual json produced by libxl_domain_config_to_json() contains a 'pnode' entry in the 'vnuma_nodes' list, which is absent in the expected json. It appears the test has thus far passed by luck. E.g. I was able to make the test pass in the failing environment by changing the meson buildtype from debugoptimized to debug. When a VM config contains vnuma settings, libxlMakeVnumaList() checks if the number of requested vnuma nodes exceeds the number of physical nodes. The number of physical nodes is retrieved with libxl_get_physinfo(), which can return wildly different results in the context of unit tests. This change mocks libxl_get_physinfo() to return consistent results. All fields of the libxl_physinfo struct are set to 0 except nr_nodes, which is set to 6 to ensure the vnuma_hvm configuration is properly tested. Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
184 lines
4.0 KiB
JSON
184 lines
4.0 KiB
JSON
{
|
|
"c_info": {
|
|
"type": "hvm",
|
|
"name": "test-hvm",
|
|
"uuid": "2147d599-9cc6-c0dc-92ab-4064b5446e9b"
|
|
},
|
|
"b_info": {
|
|
"max_vcpus": 6,
|
|
"avail_vcpus": [
|
|
0,
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5
|
|
],
|
|
"vnuma_nodes": [
|
|
{
|
|
"memkb": 2097152,
|
|
"distances": [
|
|
10,
|
|
21,
|
|
31,
|
|
41,
|
|
51,
|
|
61
|
|
],
|
|
"vcpus": [
|
|
0
|
|
]
|
|
},
|
|
{
|
|
"memkb": 2097152,
|
|
"distances": [
|
|
21,
|
|
10,
|
|
21,
|
|
31,
|
|
41,
|
|
51
|
|
],
|
|
"pnode": 1,
|
|
"vcpus": [
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"memkb": 2097152,
|
|
"distances": [
|
|
31,
|
|
21,
|
|
10,
|
|
21,
|
|
31,
|
|
41
|
|
],
|
|
"pnode": 2,
|
|
"vcpus": [
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"memkb": 2097152,
|
|
"distances": [
|
|
41,
|
|
31,
|
|
21,
|
|
10,
|
|
21,
|
|
31
|
|
],
|
|
"pnode": 3,
|
|
"vcpus": [
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"memkb": 2097152,
|
|
"distances": [
|
|
51,
|
|
41,
|
|
31,
|
|
21,
|
|
10,
|
|
21
|
|
],
|
|
"pnode": 4,
|
|
"vcpus": [
|
|
4
|
|
]
|
|
},
|
|
{
|
|
"memkb": 2097152,
|
|
"distances": [
|
|
61,
|
|
51,
|
|
41,
|
|
31,
|
|
21,
|
|
10
|
|
],
|
|
"pnode": 5,
|
|
"vcpus": [
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"max_memkb": 1048576,
|
|
"target_memkb": 1048576,
|
|
"video_memkb": 8192,
|
|
"shadow_memkb": 1234,
|
|
"device_model_version": "qemu_xen",
|
|
"device_model": "/bin/true",
|
|
"sched_params": {
|
|
|
|
},
|
|
"nested_hvm": "True",
|
|
"apic": "True",
|
|
"acpi": "True",
|
|
"type.hvm": {
|
|
"pae": "True",
|
|
"vga": {
|
|
"kind": "cirrus"
|
|
},
|
|
"vnc": {
|
|
"enable": "True",
|
|
"listen": "0.0.0.0",
|
|
"findunused": "False"
|
|
},
|
|
"sdl": {
|
|
"enable": "False"
|
|
},
|
|
"spice": {
|
|
|
|
},
|
|
"boot": "c",
|
|
"rdm": {
|
|
|
|
}
|
|
},
|
|
"arch_arm": {
|
|
|
|
}
|
|
},
|
|
"disks": [
|
|
{
|
|
"pdev_path": "/var/lib/xen/images/test-hvm.img",
|
|
"vdev": "hda",
|
|
"backend": "qdisk",
|
|
"format": "raw",
|
|
"removable": 1,
|
|
"readwrite": 1
|
|
}
|
|
],
|
|
"nics": [
|
|
{
|
|
"devid": 0,
|
|
"mac": "00:16:3e:66:12:b4",
|
|
"bridge": "br0",
|
|
"script": "/etc/xen/scripts/vif-bridge",
|
|
"nictype": "vif_ioemu"
|
|
}
|
|
],
|
|
"vfbs": [
|
|
{
|
|
"devid": -1,
|
|
"vnc": {
|
|
"enable": "True",
|
|
"listen": "0.0.0.0",
|
|
"findunused": "False"
|
|
},
|
|
"sdl": {
|
|
"enable": "False"
|
|
}
|
|
}
|
|
],
|
|
"vkbs": [
|
|
{
|
|
"devid": -1
|
|
}
|
|
],
|
|
"on_reboot": "restart"
|
|
}
|