libvirt/tests
Daniel Henrique Barboza 198c1eb6b4 qemu_domain.c: align all pSeries mem modules when PARSE_ABI_UPDATE
qemuDomainAlignMemorySizes() has an operation order problem. We are
calculating 'initialmem' without aligning the memory modules first.
Since we're aligning the dimms afterwards this can create inconsistencies
in the end result. x86 has alignment of 1-2MiB and it's not severely
impacted by it, but pSeries works with 256MiB alignment and the difference
is noticeable.

This is the case of the existing 'memory-hotplug-ppc64-nonuma' test.
The test consists of a 2GiB (aligned value) guest with 2 ~520MiB dimms,
both unaligned. 'initialmem' is calculated by taking total_mem and
subtracting the dimms size (via virDomainDefGetMemoryInitial()), which
wil give us 2GiB - 520MiB - 520MiB, ending up with a little more than
an 1GiB of 'initialmem'. Note that this value is now unaligned, and
will be aligned up via VIR_ROUND_UP(), and we'll end up with 'initialmem'
of 1GiB + 256MiB. Given that the dimms are aligned later on, the end
result for QEMU is that the guest will have a 'mem' size of 1310720k,
plus the two 512 MiB dimms, exceeding in 256MiB the desired 2GiB
memory and currentMemory specified in the XML.

Existing guests can't be fixed without breaking ABI, but we have
code already in place to align pSeries NVDIMM modules for new guests.
Let's extend it to align all pSeries mem modules.

A new test, 'memory-hotplug-ppc64-nonuma-abi-update', a copy of the
existing 'memory-hotplug-ppc64-nonuma', was added to demonstrate the
result for new pSeries guests. For the same unaligned XML mentioned
above, after applying this patch:

- starting QEMU mem size without PARSE_ABI_UPDATE:
    -m size=1310720k,slots=16,maxmem=4194304k \ (no changes)

- starting QEMU mem size with PARSE_ABI_UPDATE:
    -m size=1048576k,slots=16,maxmem=4194304k \ (size fixed)

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-12-04 15:38:47 -03:00
..
bhyveargv2xmldata bhyve: parse: Set video device model when parsing bhyve commandline 2020-10-19 11:50:49 +02:00
bhyvexml2argvdata bhyve: fix virtio-9p src/dst order 2020-10-12 15:24:21 +04:00
bhyvexml2xmloutdata bhyve: implement virtio-9p support 2020-10-09 18:46:04 +04:00
capabilityschemadata
commanddata tests: commandtest: Make 'test4' checking daemonization more reliable 2020-07-27 15:44:38 +02:00
cputestdata cpu_map: Drop 'monitor' from modern x86 CPU models 2020-11-24 20:13:23 +01:00
domainbackupxml2xmlin backup: Allow configuring incremental backup per-disk individually 2020-07-08 08:40:30 +02:00
domainbackupxml2xmlout backup: Allow configuring incremental backup per-disk individually 2020-07-08 08:40:30 +02:00
domaincapsdata cpu_map: Drop 'monitor' from modern x86 CPU models 2020-11-24 20:13:23 +01:00
domainconfdata domainconfdata/getfilesystem.xml: Remove <init> element 2020-10-20 09:05:10 +02:00
domainschemadata
fchostdata/fc_host
genericxml2xmlindata schema: add support for Windows file paths and device names 2020-11-24 18:45:07 +00:00
genericxml2xmloutdata schema: add support for Windows file paths and device names 2020-11-24 18:45:07 +00:00
interfaceschemadata
libxlxml2domconfigdata libxl: use b_info->{acpi,acpi} when available 2020-09-18 08:51:47 +02:00
lxcconf2xmldata
lxcxml2xmldata
lxcxml2xmloutdata
networkxml2confdata
networkxml2firewalldata util/tests: enable locking on iptables/ebtables commandlines in unit tests 2020-11-24 14:21:08 -05:00
networkxml2xmlin
networkxml2xmlout
networkxml2xmlupdatein
networkxml2xmlupdateout
nodedevmdevctldata
nodedevschemadata node_device: detecting mdev_types capability on CSS devices 2020-11-11 16:56:33 +01:00
nssdata
nwfilterxml2firewalldata util/tests: enable locking on iptables/ebtables commandlines in unit tests 2020-11-24 14:21:08 -05:00
nwfilterxml2xmlin nwfilterxml2xmltest: Rename cases with XMLs not conforming to schema 2020-10-20 09:05:10 +02:00
nwfilterxml2xmlout
qemuagentdata
qemublocktestdata qemu: block: Remove 'active-write' bitmap even if there are no bitmaps to merge 2020-07-21 09:52:59 +02:00
qemucapabilitiesdata tests: add capabilities data files for sparc emulator target 2020-11-20 12:09:51 +00:00
qemucaps2xmloutdata tests: add capabilities data files for sparc emulator target 2020-11-20 12:09:51 +00:00
qemudomaincheckpointxml2xmlin
qemudomaincheckpointxml2xmlout
qemudomainsnapshotxml2xmlin
qemudomainsnapshotxml2xmlout
qemufirmwaredata
qemuhotplugtestcpus
qemuhotplugtestdevices qemu: support hotplug of vdpa devices 2020-10-20 15:15:06 -04:00
qemuhotplugtestdomains qemu: support hotplug of vdpa devices 2020-10-20 15:15:06 -04:00
qemumemlockdata
qemumigparamsdata
qemumigrationcookiexmldata qemumigrationcookiexmltest: Add synthetic test case 2020-11-09 12:25:49 +01:00
qemumonitorjsondata
qemusecuritydata qemusecuritytest: Test SELinux too 2020-11-06 09:14:01 +01:00
qemustatusxml2xmldata Use virHashForEachSorted in tested code 2020-11-06 10:31:57 +01:00
qemuvhostuserdata
qemuxml2argvdata qemu_domain.c: align all pSeries mem modules when PARSE_ABI_UPDATE 2020-12-04 15:38:47 -03:00
qemuxml2xmloutdata qemu_domain.c: align all pSeries mem modules when PARSE_ABI_UPDATE 2020-12-04 15:38:47 -03:00
secretxml2xmlin
securityselinuxhelperdata
securityselinuxlabeldata
storagepoolcapsschemadata
storagepoolschemadata
storagepoolxml2argvdata storagepoolxml2argvtest: Reorder gluster arguments 2020-11-04 11:54:03 +01:00
storagepoolxml2xmlin conf: add control over COW for storage pool directories 2020-07-23 16:18:09 +01:00
storagepoolxml2xmlout conf: add control over COW for storage pool directories 2020-07-23 16:18:09 +01:00
storagevolschemadata
storagevolxml2argvdata storage: add support for qcow2 LUKS encryption 2020-09-18 11:22:28 +01:00
storagevolxml2xmlin storage: add support for qcow2 LUKS encryption 2020-09-18 11:22:28 +01:00
storagevolxml2xmlout storage: add support for qcow2 LUKS encryption 2020-09-18 11:22:28 +01:00
sysinfodata
vboxsnapshotxmldata
vircaps2xmldata
vircgroupdata
virconfdata
virfilecachedata
virfiledata
virhostcpudata
virjsondata
virmacmaptestdata
virnetdaemondata tests: fix misc spelling errors reported by codespell 2020-10-05 10:28:43 +01:00
virnetdevopenvswitchdata
virnetdevtestdata/sys/class/net
virnetworkportxml2xmldata
virnwfilterbindingxml2xmldata
virpcitestdata
virresctrldata
virscsidata
virstorageutildata
virusbtestdata/sys_bus_usb/devices
vmwareverdata
vmx2xmldata tests: vmx: Add <name> element for all domain XMLs 2020-10-20 09:05:10 +02:00
xlconfigdata Xen: Add support for writeFiltering in config converter 2020-09-01 14:29:46 -06:00
xmconfigdata Xen: Improve parsing of PCI addresses in config converter 2020-08-21 08:08:28 -06:00
xml2vmxdata Add a check attribute on the mac address element 2020-07-23 16:11:39 +01:00
.valgrind.supp
bhyveargv2xmlmock.c
bhyveargv2xmltest.c bhyve: add VNC password support 2020-09-22 17:19:26 +04:00
bhyvexml2argvmock.c
bhyvexml2argvtest.c bhyve: implement virtio-9p support 2020-10-09 18:46:04 +04:00
bhyvexml2xmltest.c bhyve: implement virtio-9p support 2020-10-09 18:46:04 +04:00
commandhelper.c tests: commandhelper: Accept POLLNVAL on macOS 2020-10-08 17:04:08 +02:00
commandtest.c tests: use g_new0 instead of VIR_ALLOC_N 2020-09-23 16:49:01 +02:00
cputest.c tests: Remove references to "cpu_map.xml" in the code 2020-10-09 15:38:05 +02:00
domaincapsmock.c domaincapsmock: mock virHostCPUGetMicrocodeVersion() 2020-08-25 19:44:43 +02:00
domaincapstest.c tests: use g_new0 instead of VIR_ALLOC_N 2020-09-23 16:49:01 +02:00
domainconftest.c
esxutilstest.c
eventtest.c lib: Prefer WITH_* prefix for #if conditionals 2020-09-02 10:28:10 +02:00
fchosttest.c
fdstreamtest.c tests: use g_new0 instead of VIR_ALLOC_N 2020-09-23 16:49:01 +02:00
genericxml2xmltest.c schema: add support for Windows file paths and device names 2020-11-24 18:45:07 +00:00
interfacexml2xmltest.c
libvirtd-fail
libvirtd-pool
libxlmock.c
libxlxml2domconfigtest.c tests: Adjust libxlxml2domconfigtest to work with Xen < 4.10 2020-09-24 12:27:07 +02:00
lxcconf2xmltest.c
lxcxml2xmltest.c
meson.build qemucapsprobemock: Fix lookup of qemu functions 2020-11-27 16:31:50 +01:00
metadatatest.c
networkxml2conftest.c
networkxml2firewalltest.c util/tests: enable locking on iptables/ebtables commandlines by default 2020-11-24 14:21:29 -05:00
networkxml2xmltest.c
networkxml2xmlupdatetest.c
nodedevmdevctltest.c tests: use g_new0 instead of VIR_ALLOC 2020-09-23 14:54:38 +02:00
nodedevxml2xmltest.c node_device: detecting mdev_types capability on CSS devices 2020-11-11 16:56:33 +01:00
nsslinktest.c
nssmock.c tests: use WITH_NSS instead of NSS 2020-07-10 09:40:58 +02:00
nsstest.c tests: use WITH_NSS instead of NSS 2020-07-10 09:40:58 +02:00
nwfilterebiptablestest.c util/tests: enable locking on iptables/ebtables commandlines by default 2020-11-24 14:21:29 -05:00
nwfilterxml2firewalltest.c util/tests: enable locking on iptables/ebtables commandlines by default 2020-11-24 14:21:29 -05:00
nwfilterxml2xmltest.c nwfilterxml2xmltest: Rename cases with XMLs not conforming to schema 2020-10-20 09:05:10 +02:00
objecteventtest.c
openvzutilstest.c
openvzutilstest.conf
permitted_file_access.txt
pkix_asn1_tab.c
qemuagenttest.c qemu_agent: add qemuAgentGetDisks 2020-12-01 11:23:41 +01:00
qemublocktest.c domain_conf: make virDomainDiskInsert() void 2020-11-11 12:53:11 +01:00
qemucapabilitiestest.c tests: get rid of 'make check' references 2020-08-17 08:42:47 +02:00
qemucaps2xmlmock.c
qemucaps2xmltest.c tests: qemu: remove unnecessary labels 2020-08-03 07:23:46 +02:00
qemucapsfixreplies
qemucapsprobe.c
qemucapsprobemock.c
qemucommandutiltest.c tests: use g_auto for all virBuffers 2020-07-08 16:34:09 -04:00
qemucpumock.c
qemudomaincheckpointxml2xmltest.c conf: checkpoint: Prepare internals for missing domain definition 2020-12-04 16:15:03 +01:00
qemudomainsnapshotxml2xmltest.c tests: qemu: remove unnecessary labels 2020-08-03 07:23:46 +02:00
qemufirmwaretest.c lib: Replace VIR_AUTOSTRINGLIST with GStrv 2020-12-02 15:43:07 +01:00
qemuhotplugmock.c qemu: support hotplug of vdpa devices 2020-10-20 15:15:06 -04:00
qemuhotplugtest.c util: hash: Retire 'virHashTable' in favor of 'GHashTable' 2020-11-06 10:40:51 +01:00
qemumemlocktest.c tests: qemu: remove unnecessary labels 2020-08-03 07:23:46 +02:00
qemumigparamstest.c util: hash: Retire 'virHashTable' in favor of 'GHashTable' 2020-11-06 10:40:51 +01:00
qemumigrationcookiexmltest.c qemumigrationcookiexmltest: Add synthetic test case 2020-11-09 12:25:49 +01:00
qemumonitorjsontest.c qemu: Pass / fill niothreads for qemuMonitorGetIOThreads 2020-12-03 17:06:07 +01:00
qemumonitortestutils.c util: hash: Retire 'virHashTable' in favor of 'GHashTable' 2020-11-06 10:40:51 +01:00
qemumonitortestutils.h util: hash: Retire 'virHashTable' in favor of 'GHashTable' 2020-11-06 10:40:51 +01:00
qemusecuritymock.c Fix capitalization "CLang" -> "Clang" 2020-11-12 15:01:42 +01:00
qemusecuritytest.c lib: Replace VIR_AUTOSTRINGLIST with GStrv 2020-12-02 15:43:07 +01:00
qemusecuritytest.h
qemustatusxml2xmltest.c qemustatusxml2xmltest: Remove 'virdeterministichash' mocking 2020-11-09 13:23:25 +01:00
qemuvhostusertest.c lib: Replace VIR_AUTOSTRINGLIST with GStrv 2020-12-02 15:43:07 +01:00
qemuxml2argvmock.c virnetdevopenvswitch: Get names for dpdkvhostuserclient too 2020-11-12 08:24:43 +01:00
qemuxml2argvtest.c qemu_domain.c: align all pSeries mem modules when PARSE_ABI_UPDATE 2020-12-04 15:38:47 -03:00
qemuxml2xmltest.c qemu_domain.c: align all pSeries mem modules when PARSE_ABI_UPDATE 2020-12-04 15:38:47 -03:00
scsihosttest.c
seclabeltest.c
secretxml2xmltest.c
securityselinuxhelper.c tests: use g_new0 instead of VIR_ALLOC 2020-09-23 14:54:38 +02:00
securityselinuxlabeltest.c tests: use g_new0 instead of VIR_ALLOC_N 2020-09-23 16:49:01 +02:00
securityselinuxtest.c tests: use g_new0 instead of VIR_ALLOC_N 2020-09-23 16:49:01 +02:00
shunloadhelper.c
shunloadtest.c meson: remove '.libs' from all relevant paths 2020-08-03 09:27:00 +02:00
sockettest.c sockettest: testMaskNetwork: use g_auto 2020-11-19 17:25:44 +01:00
ssh.c
storagebackendsheepdogtest.c
storagepoolcapstest.c
storagepoolxml2argvtest.c
storagepoolxml2xmltest.c conf: add control over COW for storage pool directories 2020-07-23 16:18:09 +01:00
storagevolxml2argvtest.c storage: add support for qcow2 LUKS encryption 2020-09-18 11:22:28 +01:00
storagevolxml2xmltest.c storage: add support for qcow2 LUKS encryption 2020-09-18 11:22:28 +01:00
sysinfotest.c
test-lib.sh tests: Don't advertise VIR_TEST_EXPENSIVE to users 2020-09-23 11:30:05 +02:00
testutils.c testutils: call va_end before return 2020-11-16 17:25:41 +01:00
testutils.h meson: remove '.libs' from all relevant paths 2020-08-03 09:27:00 +02:00
testutilshostcpus.h tests: add fake host CPU for sparc architecture 2020-11-20 12:09:51 +00:00
testutilslxc.c
testutilslxc.h
testutilsqemu.c testsutilsqemu: check return value of virQEMUCapsNewCopy 2020-12-01 17:25:31 +01:00
testutilsqemu.h util: hash: Retire 'virHashTable' in favor of 'GHashTable' 2020-11-06 10:40:51 +01:00
testutilsqemuschema.c util: hash: Retire 'virHashTable' in favor of 'GHashTable' 2020-11-06 10:40:51 +01:00
testutilsqemuschema.h util: hash: Retire 'virHashTable' in favor of 'GHashTable' 2020-11-06 10:40:51 +01:00
testutilsxen.c
testutilsxen.h
utiltest.c tests: qemu: reduce scope of some variables 2020-08-03 07:23:45 +02:00
vboxsnapshotxmltest.c check for NULL before calling g_regex_unref 2020-09-08 16:07:47 +02:00
viralloctest.c tests: delete VIR_ALLOC tests cases 2020-10-08 19:19:22 +02:00
virauthconfigtest.c tests: authconfigtest: move declarations 2020-08-25 19:03:12 +02:00
virbitmaptest.c virBitmapNew: Don't check return value 2020-10-05 15:38:47 +02:00
virbuftest.c tests: eliminate unnecessary labels 2020-07-08 16:35:54 -04:00
vircaps2xmltest.c
vircapstest.c
vircgroupmock.c tests: fix misc spelling errors reported by codespell 2020-10-05 10:28:43 +01:00
vircgrouptest.c vircgroup: drop @create from virCgroupNewDomainPartition 2020-11-03 21:26:32 +01:00
virconftest.c tests: Use glib memory function in testConfRoundTrip 2020-09-14 17:28:51 +02:00
vircryptotest.c tests: use g_new0 instead of VIR_ALLOC_N 2020-09-23 16:49:01 +02:00
virdriverconnvalidatetest.c
virdrivermoduletest.c
virendiantest.c
virerrortest.c
virfilecachemock.c
virfilecachetest.c
virfilemock.c lib: Prefer WITH_* prefix for #if conditionals 2020-09-02 10:28:10 +02:00
virfiletest.c lib: Prefer WITH_* prefix for #if conditionals 2020-09-02 10:28:10 +02:00
virfilewrapper.c tests: Fix opendir mocks on macOS 2020-11-27 15:59:26 +01:00
virfilewrapper.h
virfirewalltest.c lib: Replace VIR_AUTOSTRINGLIST with GStrv 2020-12-02 15:43:07 +01:00
virgdbusmock.c tests: introduce virgdbusmock to mock GLib DBus functions 2020-09-17 18:19:56 +02:00
virhostcpumock.c
virhostcputest.c tests: use g_new0 instead of VIR_ALLOC_N 2020-09-23 16:49:01 +02:00
virhostdevmock.c
virhostdevtest.c tests: use g_new0 instead of VIR_ALLOC 2020-09-23 14:54:38 +02:00
virhostidmock.c tests: Add mock library for virGetHostname and virGetHostUUID 2020-11-09 12:25:49 +01:00
viridentitytest.c viridentitytest: Run more frequently 2020-11-09 15:43:53 +01:00
viriscsitest.c tests: iscsitest: split out testISCSIScanTargetsTests 2020-08-25 19:03:12 +02:00
virjsontest.c
virkeycodetest.c
virkmodtest.c tests: use g_auto for all virBuffers 2020-07-08 16:34:09 -04:00
virlockspacetest.c
virlogtest.c
virmacmaptest.c tests: remove virdeterministichashmock.so 2020-11-06 10:31:57 +01:00
virmigtest.c peer2peer migration: allow connecting to local sockets 2020-09-04 10:20:49 +02:00
virmock.h tests: Fix mock chaining on macOS 2020-11-27 16:28:31 +01:00
virmockstathelpers.c tests: fix stat mocking with Fedora rawhide 2020-10-29 19:52:07 +01:00
virnetdaemonmock.c tests: don't mock the time() function on mingw 2020-07-23 14:58:16 +01:00
virnetdaemontest.c tests: use g_new0 instead of VIR_ALLOC 2020-09-23 14:54:38 +02:00
virnetdevbandwidthmock.c
virnetdevbandwidthtest.c tests: use g_auto for all virBuffers 2020-07-08 16:34:09 -04:00
virnetdevmock.c
virnetdevopenvswitchtest.c
virnetdevtest.c
virnetmessagetest.c tests: use g_new0 instead of VIR_ALLOC_N 2020-09-23 16:49:01 +02:00
virnetserverclientmock.c
virnetserverclienttest.c tests: use g_new0 instead of VIR_ALLOC 2020-09-23 14:54:38 +02:00
virnetsockettest.c tests: use g_new0 instead of VIR_ALLOC_N 2020-09-23 16:49:01 +02:00
virnettlscontexttest.c lib: Prefer WITH_* prefix for #if conditionals 2020-09-02 10:28:10 +02:00
virnettlshelpers.c tests: use g_new0 instead of VIR_ALLOC_N 2020-09-23 16:49:01 +02:00
virnettlshelpers.h lib: Prefer WITH_* prefix for #if conditionals 2020-09-02 10:28:10 +02:00
virnettlssessiontest.c lib: Prefer WITH_* prefix for #if conditionals 2020-09-02 10:28:10 +02:00
virnetworkportxml2xmltest.c
virnumamock.c tests: virNumaGetPages: use g_new0 instead of VIR_ALLOC_N 2020-09-23 14:54:38 +02:00
virnwfilterbindingxml2xmltest.c
virpcimock.c tests: Fix mock chaining on macOS 2020-11-27 16:28:31 +01:00
virpcitest.c
virpolkittest.c tests: fix incorrect free of GVariant in our GLib mock functions 2020-10-02 12:43:15 +02:00
virportallocatormock.c lib: Prefer WITH_* prefix for #if conditionals 2020-09-02 10:28:10 +02:00
virportallocatortest.c lib: Prefer WITH_* prefix for #if conditionals 2020-09-02 10:28:10 +02:00
virprocessmock.c
virrandommock.c
virresctrltest.c
virrotatingfiletest.c Split declarations from initializations 2020-08-25 19:03:11 +02:00
virschematest.c change DIR* int g_autoptr(DIR) where appropriate 2020-11-02 22:01:36 -05:00
virscsitest.c
virsh-auth
virsh-auth.xml
virsh-checkpoint tests: virsh-checkpoint/snapshot: Mark as expensive 2020-11-23 14:44:39 +01:00
virsh-cpuset
virsh-define-dev-segfault
virsh-int-overflow
virsh-optparse meson: src/util/virfile: rewrite virFileActivateDirOverrideForProg 2020-08-03 09:26:36 +02:00
virsh-output tests: virsh-output: Mark as expensive 2020-11-23 14:44:39 +01:00
virsh-output-commands virsh: Added attach-disk support for network disk 2020-11-23 14:44:39 +01:00
virsh-output.out virsh: Added attach-disk support for network disk 2020-11-23 14:44:39 +01:00
virsh-read-bufsiz
virsh-read-non-seekable
virsh-schedinfo meson: src/util/virfile: rewrite virFileActivateDirOverrideForProg 2020-08-03 09:26:36 +02:00
virsh-self-test
virsh-snapshot tests: virsh-checkpoint/snapshot: Mark as expensive 2020-11-23 14:44:39 +01:00
virsh-start
virsh-undefine tests: fix license blurb in virsh-undefine 2020-09-01 23:14:16 +02:00
virsh-uriprecedence
virsh-vcpupin
virshtest.c
virstoragetest.c virStorageSourceNew: Abort on failure 2020-09-23 22:37:56 +02:00
virstorageutiltest.c
virstringtest.c tests: use g_new0 instead of VIR_ALLOC_N 2020-09-23 16:49:01 +02:00
virsystemdtest.c tests: fix incorrect free of GVariant in our GLib mock functions 2020-10-02 12:43:15 +02:00
virt-aa-helper-test meson: tests: add test scripts 2020-08-03 09:27:06 +02:00
virt-admin-self-test
virtestmock.c meson: tests: add file access test setup 2020-08-03 09:27:06 +02:00
virtimetest.c
virtypedparamtest.c
viruritest.c tests: use VIR_WARNINGS_NO_DECLARATION_AFTER_STATEMENT 2020-08-25 19:03:13 +02:00
virusbmock.c
virusbtest.c
vmwarevertest.c
vmx2xmltest.c vmx: start parsing SATA disks 2020-10-14 11:23:30 +02:00
vshtabletest.c lib: Prefer WITH_* prefix for #if conditionals 2020-09-02 10:28:10 +02:00
xlconfigtest.c tests: use g_new0 instead of VIR_ALLOC_N 2020-09-23 16:49:01 +02:00
xmconfigtest.c tests: use g_new0 instead of VIR_ALLOC_N 2020-09-23 16:49:01 +02:00
xml2vmxtest.c Add a type attribute on the mac address element 2020-07-13 18:47:44 +02:00