-
Notifications
You must be signed in to change notification settings - Fork 174
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
hotplug_virtio_mem: implements virtio-mem hotunplug #3955
Conversation
a397ba2
to
3dc7491
Compare
|
qemu/tests/hotplug_virtio_mem.py
Outdated
@@ -53,4 +54,13 @@ def run(test, params, env): | |||
threshold, vm, test) | |||
virtio_mem_utils.check_numa_plugged_mem(node_id, requested_size, | |||
threshold, vm, test) | |||
try: | |||
hotplug_test.unplug_memory(vm, target_mem) | |||
except QMPCmdError: |
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.
@mcasquer How about
except QMPCmdError as e:
test.fail(XX) --> Pass this parameter "e" to this fail message as what you want.
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.
@menli820 thanks for the suggestion, but if you check in our internal test case, the step is expected to fail, that's the reason of the info message 😀
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.
Perhaps I can use the exception instance to look on it for the error message... what do you think?
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.
Perhaps I can use the exception instance to look on it for the error message... what do you think?
@mcasquer Thanks reminder, after checking our internal test case, it is reasonable with the test.log.info
How about adding a if judgment behind 'except QMPCmdError:' to confirm whether the exception message is expected?
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.
Code updated!
661f5e2
to
6a73bb4
Compare
|
LGTM (1/1) Host_RHEL.m9.u4.ovmf.qcow2.virtio_blk.up.virtio_net.Guest.RHEL.9.4.0.x86_64.io-github-autotest-qemu.hotplug_virtio_mem.q35: STARTED |
(1/1) Host_RHEL.m9.u4.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.4.0.aarch64.page_64k.io-github-autotest-qemu.hotplug_virtio_mem.arm64-pci: PASS (149.81 s) LGTM.Acked-by: Zhenyu Zhang [email protected] |
a1569a4
to
3ebb900
Compare
|
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.
Ack
Implements virtio-mem hotunplug as the final step of the test case. At first, it tries to unplug the virtio-mem device with some memory plugged in; as expected the exception is catched. Finally resizes the device to zero and the hotunplug is successfully done. Signed-off-by: mcasquer <[email protected]>
3ebb900
to
26ffaab
Compare
Thanks all, let's merge this patch as the avocado-vt dependence was merged. |
Depends on avocado-framework/avocado-vt#3844
hotplug_virtio_mem: implements virtio-mem hotunplug
Implements virtio-mem hotunplug as the final step of
the test case. At first, it tries to unplug the virtio-mem
device with some memory plugged in; as expected the
exception is catched. Finally resizes the device to zero
and the hotunplug is successfully done.
Signed-off-by: mcasquer [email protected]
ID: 1939