mirror of https://gitee.com/openkylin/libvirt.git
tests: Fix libxlxml2domconfigtest with latest xen
shadow_memkb is populated from a libxl API call, and the value can change. For example: https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=2c992810854a15b41be920519ce83a4a328d5168 Mock libxl_get_required_shadow_memory to give consistent output Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
de842f37a1
commit
72d4709ab9
|
@ -109,6 +109,17 @@ VIR_MOCK_STUB_RET_ARGS(bind,
|
|||
const struct sockaddr *, addr,
|
||||
socklen_t, addrlen)
|
||||
|
||||
VIR_MOCK_IMPL_RET_ARGS(libxl_get_required_shadow_memory,
|
||||
unsigned long,
|
||||
unsigned long, maxmem_kb,
|
||||
unsigned int, smp_cpus)
|
||||
{
|
||||
/* silence gcc warning about unused function */
|
||||
if (0)
|
||||
real_libxl_get_required_shadow_memory(maxmem_kb, smp_cpus);
|
||||
return 1234;
|
||||
}
|
||||
|
||||
VIR_MOCK_IMPL_RET_ARGS(__xstat, int,
|
||||
int, ver,
|
||||
const char *, path,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"max_memkb": 1048576,
|
||||
"target_memkb": 1048576,
|
||||
"video_memkb": 8192,
|
||||
"shadow_memkb": 12288,
|
||||
"shadow_memkb": 1234,
|
||||
"device_model_version": "qemu_xen",
|
||||
"device_model": "/bin/true",
|
||||
"sched_params": {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
],
|
||||
"max_memkb": 524288,
|
||||
"target_memkb": 524288,
|
||||
"shadow_memkb": 8192,
|
||||
"shadow_memkb": 1234,
|
||||
"sched_params": {
|
||||
|
||||
},
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
],
|
||||
"max_memkb": 524288,
|
||||
"target_memkb": 524288,
|
||||
"shadow_memkb": 8192,
|
||||
"shadow_memkb": 1234,
|
||||
"sched_params": {
|
||||
|
||||
},
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"max_memkb": 1048576,
|
||||
"target_memkb": 1048576,
|
||||
"video_memkb": 8192,
|
||||
"shadow_memkb": 12288,
|
||||
"shadow_memkb": 1234,
|
||||
"device_model_version": "qemu_xen",
|
||||
"device_model": "/bin/true",
|
||||
"sched_params": {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
],
|
||||
"max_memkb": 592896,
|
||||
"target_memkb": 403456,
|
||||
"shadow_memkb": 5656,
|
||||
"shadow_memkb": 1234,
|
||||
"sched_params": {
|
||||
},
|
||||
"apic": "True",
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
],
|
||||
"max_memkb": 592896,
|
||||
"target_memkb": 403456,
|
||||
"shadow_memkb": 5656,
|
||||
"shadow_memkb": 1234,
|
||||
"cpuid": [
|
||||
{
|
||||
"leaf": 1,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
],
|
||||
"max_memkb": 592896,
|
||||
"target_memkb": 403456,
|
||||
"shadow_memkb": 5656,
|
||||
"shadow_memkb": 1234,
|
||||
"cpuid": [
|
||||
{
|
||||
"leaf": 1,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"max_memkb": 1048576,
|
||||
"target_memkb": 1048576,
|
||||
"video_memkb": 8192,
|
||||
"shadow_memkb": 12288,
|
||||
"shadow_memkb": 1234,
|
||||
"event_channels": 2047,
|
||||
"device_model_version": "qemu_xen",
|
||||
"device_model": "/bin/true",
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"max_memkb": 1048576,
|
||||
"target_memkb": 1048576,
|
||||
"video_memkb": 8192,
|
||||
"shadow_memkb": 12288,
|
||||
"shadow_memkb": 1234,
|
||||
"max_grant_frames": 64,
|
||||
"device_model_version": "qemu_xen",
|
||||
"device_model": "/bin/true",
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"max_memkb": 1048576,
|
||||
"target_memkb": 1048576,
|
||||
"video_memkb": 8192,
|
||||
"shadow_memkb": 12288,
|
||||
"shadow_memkb": 1234,
|
||||
"device_model_version": "qemu_xen",
|
||||
"device_model": "/bin/true",
|
||||
"sched_params": {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
],
|
||||
"max_memkb": 524288,
|
||||
"target_memkb": 524288,
|
||||
"shadow_memkb": 8192,
|
||||
"shadow_memkb": 1234,
|
||||
"sched_params": {
|
||||
|
||||
},
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"max_memkb": 1048576,
|
||||
"target_memkb": 1048576,
|
||||
"video_memkb": 8192,
|
||||
"shadow_memkb": 12288,
|
||||
"shadow_memkb": 1234,
|
||||
"rtc_timeoffset": 3600,
|
||||
"localtime": "True",
|
||||
"device_model_version": "qemu_xen",
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
"max_memkb": 1048576,
|
||||
"target_memkb": 1048576,
|
||||
"video_memkb": 8192,
|
||||
"shadow_memkb": 14336,
|
||||
"shadow_memkb": 1234,
|
||||
"device_model_version": "qemu_xen",
|
||||
"device_model": "/bin/true",
|
||||
"sched_params": {
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
"max_memkb": 1048576,
|
||||
"target_memkb": 1048576,
|
||||
"video_memkb": 8192,
|
||||
"shadow_memkb": 14336,
|
||||
"shadow_memkb": 1234,
|
||||
"device_model_version": "qemu_xen",
|
||||
"device_model": "/bin/true",
|
||||
"sched_params": {
|
||||
|
|
Loading…
Reference in New Issue