-
Notifications
You must be signed in to change notification settings - Fork 172
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: forbid virtio_mem unplug for QEMU < 8.1.0 #4109
Conversation
3e73f52
to
484a154
Compare
QEMU 8.2.0
QEMU 8.0.0
|
@zhenyzha @menli820 @YongxueHong @PaulYuuu please, could you review this PR? Thanks ! |
LGTM. (1/3) Host_RHEL.m9.u5.qcow2.virtio_blk.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.unattended_install.cdrom.extra_cdrom_ks.default_install.aio_threads.q35: STARTED |
IMO, it is redundant to add a new variant. For QEMU >= 8.1.0, the case I would like to suggest handle it in the script, filter different test steps based on qemu version.
|
LGTM.Acked-by: Zhenyu Zhang [email protected]
|
484a154
to
0d050cb
Compare
@yanan-fu thanks for the suggestion, code updated ! |
Could you please update the doc string to show the test steps correctly ? Thanks! |
0d050cb
to
634ec23
Compare
Done ! |
|
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.
Acked-by: Yanan Fu [email protected]
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.
LGTM.
qemu/tests/hotplug_virtio_mem.py
Outdated
qemu_version = env_process._get_qemu_version(qemu_path) | ||
match = re.search(r"[0-9]+\.[0-9]+\.[0-9]+(\-[0-9]+)?", qemu_version) | ||
host_qemu = match.group(0) |
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.
I recommend calling a public function to get the qemu version: virttest.utils_qemu.get_qemu_version
instead of the private function _get_qemu_version
.
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.
@YongxueHong Thanks for the suggestion, code updated !
0b7a85c
to
578e582
Compare
|
qemu/tests/hotplug_virtio_mem.py
Outdated
qemu_path = utils_misc.get_qemu_binary(params) | ||
qemu_version = utils_qemu.get_qemu_version(qemu_path) | ||
match = re.search(r"[0-9]+\.[0-9]+\.[0-9]+(\-[0-9]+)?", str(qemu_version)) | ||
host_qemu = match.group(0) |
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.
qemu_path = utils_misc.get_qemu_binary(params) | |
qemu_version = utils_qemu.get_qemu_version(qemu_path) | |
match = re.search(r"[0-9]+\.[0-9]+\.[0-9]+(\-[0-9]+)?", str(qemu_version)) | |
host_qemu = match.group(0) | |
qemu_path = utils_misc.get_qemu_binary(params) | |
qemu_version = utils_qemu.get_qemu_version(qemu_path)[0] |
HIi @mcasquer
I think that we could get the host_qemu
(qemu_version) by qemu_version[0]
directly.
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.
@YongxueHong thanks, code updated!
578e582
to
d49e26e
Compare
The unplug support for virtio_mem was introduced in RHEL 9.4 with QEMU 8.1, corrects the test to only do this action when the proper QEMU is used. Also applies the black code formatter. Signed-off-by: mcasquer <[email protected]>
d49e26e
to
1a01476
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.
LGTM.
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
hotplug_virtio_mem: forbid virtio_mem unplug for QEMU < 8.1.0
The unplug support for virtio_mem was introduced in RHEL 9.4
with QEMU 8.1, corrects the test to only do this action when
the proper QEMU is used. Also applies the black code formatter.
Signed-off-by: mcasquer [email protected]
ID: 2626