Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail test case when huge page is not enough, and add huge page cleanup. #5918

Merged
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
7 changes: 5 additions & 2 deletions libvirt/tests/src/memory/memory_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ def _setup_mbxml():
test, pg_size=default_page_size, hp_size=pagesize, hp_list=[mount_pagesize])
vm_mem_size = vmxml.memory
hp_cfg = test_setup.HugePageConfig(params)
hp_cfg.set_kernel_hugepages(pagesize, vm_mem_size // pagesize)
hp_cfg.set_kernel_hugepages(mount_pagesize, mem_device_size // mount_pagesize)
hp_cfg.set_kernel_hugepages(pagesize, vm_mem_size // pagesize, False)
hp_cfg.set_kernel_hugepages(mount_pagesize, mem_device_size // mount_pagesize, False)
set_vmxml(vmxml, params)
_setup_mbxml()
vmxml.sync()
Expand Down Expand Up @@ -454,6 +454,9 @@ def cleanup_test_memorybacking(case):
utils_disk.umount('hugetlbfs', mount_path, 'hugetlbfs')
if os.path.exists(mount_path):
os.rmdir(mount_path)
hp_cfg = test_setup.HugePageConfig(params)
hp_cfg.set_kernel_hugepages(int(params.get('mount_pagesize')), 0)
hp_cfg.cleanup()

def run_test_edit_mem(case):
"""
Expand Down
Loading