-
Notifications
You must be signed in to change notification settings - Fork 183
Add new case VIRT-299024 for memory balloon freepagereporting #6318
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
Add new case VIRT-299024 for memory balloon freepagereporting #6318
Conversation
|
@nanli1 please help review, thx |
nanli1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Others look good to me
libvirt/tests/src/memory/memory_balloon/memory_balloon_freepagereporting.py
Outdated
Show resolved
Hide resolved
| rss_mem_thread.start() | ||
| free_mem = utils_memory.freememtotal(session) | ||
| session.cmd_status("swapoff -a") | ||
| session.cmd_status(mem_consume_cmd % (free_mem - 204800)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the 204800 not be hard value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this consume snippet be replaced by
libvirt_memory.consume_vm_freememory(session, consume_value)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this consume snippet be replaced by
libvirt_memory.consume_vm_freememory(session, consume_value)
For I need to make sure the consume cmd executed in the guest could be finished in a fixed time, so I could record the guest memory is increased (consuming memory) and decreased (consuming cmd finished, and memory is released).
libvirt_memory.consume_vm_freememory, this func could not control the total time, the only way is to set a very big loop then it will exceed timeout 60 seconds and throw an exception.
So I use this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the 204800 not be hard value?
Done
8fcf9df to
5a1dbd2
Compare
| session.cmd_status("swapoff -a") | ||
| session.cmd_status(mem_consume_cmd % (free_mem - unconsumed_mem)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better to check the status of these commands? What happens if they fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here the cmd is to consume guest memory which would possess more memory for qemu process. So even the cmd get stuck or timeout error the memory is consumed, that's expected, so we don't have to check the result.
libvirt/tests/src/memory/memory_balloon/memory_balloon_freepagereporting.py
Show resolved
Hide resolved
Signed-off-by: liang-cong-red-hat <[email protected]>
5a1dbd2 to
afca49f
Compare
Test result:
(1/6) type_specific.io-github-autotest-libvirt.memory.balloon.freepagereporting.undefined.virtio: STARTED
(1/6) type_specific.io-github-autotest-libvirt.memory.balloon.freepagereporting.undefined.virtio: PASS (63.49 s)
(2/6) type_specific.io-github-autotest-libvirt.memory.balloon.freepagereporting.undefined.virtio-non-transitional: STARTED
(2/6) type_specific.io-github-autotest-libvirt.memory.balloon.freepagereporting.undefined.virtio-non-transitional: PASS (63.52 s)
(3/6) type_specific.io-github-autotest-libvirt.memory.balloon.freepagereporting.off.virtio: STARTED
(3/6) type_specific.io-github-autotest-libvirt.memory.balloon.freepagereporting.off.virtio: PASS (63.96 s)
(4/6) type_specific.io-github-autotest-libvirt.memory.balloon.freepagereporting.off.virtio-non-transitional: STARTED
(4/6) type_specific.io-github-autotest-libvirt.memory.balloon.freepagereporting.off.virtio-non-transitional: PASS (64.64 s)
(5/6) type_specific.io-github-autotest-libvirt.memory.balloon.freepagereporting.on.virtio: STARTED
(5/6) type_specific.io-github-autotest-libvirt.memory.balloon.freepagereporting.on.virtio: PASS (63.72 s)
(6/6) type_specific.io-github-autotest-libvirt.memory.balloon.freepagereporting.on.virtio-non-transitional: STARTED
(6/6) type_specific.io-github-autotest-libvirt.memory.balloon.freepagereporting.on.virtio-non-transitional: PASS (63.63 s)