diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c18dd8d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__/ diff --git a/KVM/qemu/boot_check.cfg b/KVM/qemu/boot_check.cfg index 2a3597e..b13be7e 100644 --- a/KVM/qemu/boot_check.cfg +++ b/KVM/qemu/boot_check.cfg @@ -37,6 +37,8 @@ mem = 4096 - 16G: mem = 16384 + - max_mem: + is_max_mem = yes variants: - vm: - tdvm: diff --git a/KVM/qemu/tests/boot_check.py b/KVM/qemu/tests/boot_check.py index 15a64ed..d62192f 100644 --- a/KVM/qemu/tests/boot_check.py +++ b/KVM/qemu/tests/boot_check.py @@ -10,6 +10,7 @@ from avocado.utils import cpu from virttest import env_process from virttest import error_context +from virttest import utils_misc @error_context.context_aware @@ -41,7 +42,11 @@ def run(test, params, env): vcpus = params.get_numeric("smp") if vm.get_cpu_count() != vcpus: test.fail("CPU number in guest is not same as configured vcpus number") - memory = params.get_numeric("mem") - if vm.get_totalmem_sys()//1024 != memory: - test.fail("Memory in guest is not same as configured") + is_max_mem = params.get_boolean("is_max_mem") + if is_max_mem: + memory = utils_misc.get_usable_memory_size() + else: + memory = params.get_numeric("mem") + if vm.get_totalmem_sys()//1024 != memory: + test.fail("Memory in guest is not same as configured") session.close()