Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pycache__/
5 changes: 5 additions & 0 deletions KVM/qemu/boot_check.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,16 @@
variants:
- 1G:
no 208_cpu, 256_cpu, 288_cpu
is_max_mem = no
mem = 1024
- 4G:
is_max_mem = no
mem = 4096
- 16G:
is_max_mem = no
mem = 16384
- max_mem:
is_max_mem = yes
variants:
- vm:
- tdvm:
Expand Down
13 changes: 10 additions & 3 deletions KVM/qemu/tests/boot_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
#
# History: July. 2024 - Xudong Hao - creation

import subprocess

from avocado.utils import cpu
from virttest import env_process
from virttest import error_context
from virttest import utils_misc


@error_context.context_aware
Expand Down Expand Up @@ -41,7 +44,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()