diff --git a/libvirt/tests/src/libvirt_mem.py b/libvirt/tests/src/libvirt_mem.py index 64abd0ece1..a1268545a0 100644 --- a/libvirt/tests/src/libvirt_mem.py +++ b/libvirt/tests/src/libvirt_mem.py @@ -239,8 +239,12 @@ def check_dom_xml(at_mem=False, dt_mem=False): xml_max_mem_rt = int(dom_xml.max_mem_rt) xml_max_mem = int(dom_xml.max_mem) xml_cur_mem = int(dom_xml.current_mem) - assert int(max_mem_rt) == xml_max_mem_rt - + if 'ppc64' in arch: + # for arch ppc64 and hugepages, the run time max memory grows and never shrinks. + # libvirt rounded max memory boundaries to align with memory block size (usually 64 MiB or 128 MiB) + assert int(max_mem_rt) <= xml_max_mem_rt + else: + assert int(max_mem_rt) == xml_max_mem_rt # Check attached/detached memory logging.info("at_mem=%s,dt_mem=%s", at_mem, dt_mem) logging.info("detach_device is %s", detach_device)