Skip to content

Commit

Permalink
Merge pull request #5367 from hs0210/memory_fix_property
Browse files Browse the repository at this point in the history
memory: Fix property to correctly check hugepage size
  • Loading branch information
dzhengfy authored Jan 25, 2024
2 parents e3942d5 + 658e822 commit e2ac964
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ def check_hugepage(params, mem_name):
hugepage = str(json.loads(result)['return'])

result = virsh.qemu_monitor_command(
vm_name, check_thread % (mem_name, 'hugetlbsize'), debug=True).stdout_text
vm_name, check_thread % (mem_name, 'size'), debug=True).stdout_text
hugepage_size = str(json.loads(result)['return'])

if hugepage != 'True':
test.fail("Expect to get hugepage 'True', but got '%s'" % hugepage)
if hugepage_size != memory_value:
if int(hugepage_size) != int(memory_value) * 1024:
test.fail("Expect to get hugepage size '%s', but got '%s'" % (
hugepage_size, memory_value))
test.log.debug("Get correct hugepage '%s' and hugepage_size '%s'",
Expand Down

0 comments on commit e2ac964

Please sign in to comment.