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

add qdevice_format module #4056

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nickzhq
Copy link
Contributor

@nickzhq nickzhq commented Jan 24, 2025

ID: 3253, 3262, 3269

@nickzhq nickzhq marked this pull request as draft January 24, 2025 12:22
@nickzhq nickzhq force-pushed the format_in_qdevice branch 12 times, most recently from 586c108 to 0b60106 Compare January 26, 2025 11:53
@nickzhq
Copy link
Contributor Author

nickzhq commented Jan 27, 2025

python ConfigTest.py --category=gating_test_qemu --hostname=RHEL-9.3.0 --customsparams="del soundcards"
RESULTS : PASS 56 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 2
JOB TIME : 12420.39 s

Hello @mcasquer @ybduan @aliang123 ,
Please review this patch and do the regression test if necessary. As you seeing, I've done the gating test on RHEL-9.3.0.
@lkotek @YongxueHong @yanan-fu please review this patch, too.
If you guys find issues, do NOT hesitate to slack me even if I'm on Chinese new year holidays.

cc to other maintainers: @luckyh @zhencliu

Thanks to you guys in advance!

@nickzhq nickzhq marked this pull request as ready for review January 27, 2025 01:51
@nickzhq nickzhq force-pushed the format_in_qdevice branch 2 times, most recently from 773fe93 to 178d57b Compare January 27, 2025 07:26
@mcasquer
Copy link
Contributor

Test cases passed

 (1/3) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.hotplug_memory.after.guest_reboot.hotplug.backend_file.policy_default.two.q35: STARTED
 (1/3) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.hotplug_memory.after.guest_reboot.hotplug.backend_file.policy_default.two.q35: PASS (210.98 s)
 (2/3) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.nvdimm.nvdimm_hotplug.q35: STARTED
 (2/3) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.nvdimm.nvdimm_hotplug.q35: PASS (149.32 s)
 (3/3) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.hotplug_virtio_mem.q35: STARTED
 (3/3) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.hotplug_virtio_mem.q35: PASS (182.03 s)
RESULTS    : PASS 3 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

@nickzhq nickzhq force-pushed the format_in_qdevice branch 6 times, most recently from be9e9e6 to 8bb45ad Compare January 28, 2025 01:23
@lkotek
Copy link
Contributor

lkotek commented Jan 28, 2025

Hi @mcasquer and @nickzhq, I just tested the patch with RHEL 10:

JOB LOG    : /root/avocado/job-results/job-2025-01-28T07.38-1f7f8ad/job.log
 (1/1) Host_RHEL.m10.u0.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.0.x86_64.io-github-autotest-qemu.hotplug_memory.after.guest_reboot.hotplug.backend_file.policy_default.two.q35: STARTED
 (1/1) Host_RHEL.m10.u0.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.0.x86_64.io-github-autotest-qemu.hotplug_memory.after.guest_reboot.hotplug.backend_file.policy_default.two.q35: PASS (158.65 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

All good, thanks for the fix!

EDIT: And the same goes for the RHEL 9.6:

JOB ID     : 39861f4830089e9d902898e6eb3a8a3c6b26ec0d
JOB LOG    : /root/avocado/job-results/job-2025-01-28T08.18-39861f4/job.log
 (1/1) Host_RHEL.m9.u6.v0.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.hotplug_memory.after.guest_reboot.hotplug.backend_file.policy_default.two.q35: STARTED
 (1/1) Host_RHEL.m9.u6.v0.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.hotplug_memory.after.guest_reboot.hotplug.backend_file.policy_default.two.q35: PASS (138.53 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /root/avocado/job-results/job-2025-01-28T08.18-39861f4/results.html

@nickzhq nickzhq force-pushed the format_in_qdevice branch 2 times, most recently from 5039099 to 0c1b8c7 Compare January 30, 2025 02:52
@mcasquer
Copy link
Contributor

Hello @nickzhq, hotplug_mem_negative.invalid_device_addr test case failed with current patch

 (1/1) Host_RHEL.m10.u0.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win10.x86_64.io-github-autotest-qemu.hotplug_mem_negative.invalid_device_addr.q35: STARTED
 (1/1) Host_RHEL.m10.u0.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win10.x86_64.io-github-autotest-qemu.hotplug_mem_negative.invalid_device_addr.q35: FAIL: No valid keywords were found in the qemu prompt message (117.08 s)
RESULTS    : PASS 0 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

More details internally

@nickzhq nickzhq force-pushed the format_in_qdevice branch 3 times, most recently from 68f34b9 to 81c6e29 Compare January 31, 2025 06:53
@mcasquer
Copy link
Contributor

mcasquer commented Feb 5, 2025

Using the latest code of the patch, tests cases passed

RHEL 9.6 VM

 (1/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.hotplug_virtio_mem.q35: STARTED
 (1/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.hotplug_virtio_mem.q35: PASS (240.76 s)
 (2/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.hotplug_memory.after.guest_reboot.hotplug.backend_file.policy_default.two.q35: STARTED
 (2/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.hotplug_memory.after.guest_reboot.hotplug.backend_file.policy_default.two.q35: PASS (203.58 s)
 (3/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.nvdimm.nvdimm_hotplug.q35: STARTED
 (3/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.nvdimm.nvdimm_hotplug.q35: CANCEL: Install dependency packages failed (388.06 s)
 (4/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.hotplug_mem_negative.invalid_device_addr.q35: STARTED
 (4/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.hotplug_mem_negative.invalid_device_addr.q35: PASS (56.85 s)
RESULTS    : PASS 3 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 1

Windows 11 VM

 (1/2) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win11.x86_64.io-github-autotest-qemu.unattended_install.cdrom.extra_cdrom_ks.default_install.aio_threads.q35: STARTED
 (1/2) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win11.x86_64.io-github-autotest-qemu.unattended_install.cdrom.extra_cdrom_ks.default_install.aio_threads.q35: PASS (4517.47 s)
 (2/2) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win11.x86_64.io-github-autotest-qemu.hotplug_mem_negative.invalid_device_addr.q35: STARTED
 (2/2) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win11.x86_64.io-github-autotest-qemu.hotplug_mem_negative.invalid_device_addr.q35: PASS (195.15 s)
RESULTS    : PASS 2 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

@nanliu-r
Copy link
Contributor

@yanglei-rh Hi,could you help check if this patch fix the 'mq' parameter's issue?

@yanglei-rh
Copy link
Contributor

@yanglei-rh Hi,could you help check if this patch fix the 'mq' parameter's issue?

@nanliu-r Thanks for your reninder, I also can reproduced QMP command 'device_add' failed (arguments: OrderedDict([('id', 'idsgrDZU'), ('driver', 'virtio-net-pci'), ('netdev', 'idH6BZEn'), ('mac', '9a:2d:dd:d2:cf:84'), ('mq', 'on'), ('vectors', 10), ('bus', 'pcie_extra_root_port_0'), ('addr', '0x0')]), error message: {'class': 'GenericError', 'desc': "Invalid parameter type for 'mq', expected: boolean"}) affter apply this patch.

@nickzhq
Copy link
Contributor Author

nickzhq commented Feb 13, 2025

@yanglei-rh Hi,could you help check if this patch fix the 'mq' parameter's issue?

@nanliu-r Thanks for your reninder, I also can reproduced QMP command 'device_add' failed (arguments: OrderedDict([('id', 'idsgrDZU'), ('driver', 'virtio-net-pci'), ('netdev', 'idH6BZEn'), ('mac', '9a:2d:dd:d2:cf:84'), ('mq', 'on'), ('vectors', 10), ('bus', 'pcie_extra_root_port_0'), ('addr', '0x0')]), error message: {'class': 'GenericError', 'desc': "Invalid parameter type for 'mq', expected: boolean"}) affter apply this patch.

Hello @yanglei-rh , after I've checked this patch, the 'mq' is set to related Boolean type in my host( QEMU emulator version 9.1.0 (qemu-kvm-9.1.0-11.el10) ).
I wonder which qemu version you used to test this patch?

In addition, what's name of the test case you tested?

Thanks!

replace the details in qdevices.py by qdevice_format.

Signed-off-by: Houqi (Nick) Zuo <[email protected]>
@nickzhq
Copy link
Contributor Author

nickzhq commented Feb 13, 2025

Hello @yanglei-rh ,
Please test again.
This patch is ready to support 'mq' arg in old qemu version.

"""
if driver not in self._special_args_in_json["device"]:
self._special_args_in_json["device"][driver] = dict()
cmd = "/usr/libexec/qemu-kvm --device %s,\\?" % driver
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dynamic get

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants