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

virtio_mode: updates PCI patterns according to the numerical ID #3777

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

mcasquer
Copy link
Contributor

@mcasquer mcasquer commented Jul 14, 2023

virtio_mode: updates PCI patterns according to the numerical ID

Updates the case logic, checking the numerical ID of the PCI devices
instead of the full name, that could be updated without notice.
In order to support 0.9 and 1.0 virtio devices, the pattern now
contains both IDs.

Signed-off-by: mcasquer [email protected]
ID: 2222179

@mcasquer mcasquer marked this pull request as ready for review July 14, 2023 09:59
@mcasquer
Copy link
Contributor Author

 (01/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_netkvm.with_modern.q35: STARTED
 (01/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_netkvm.with_modern.q35: PASS (52.62 s)
 (02/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_netkvm.with_transitional.q35: STARTED
 (02/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_netkvm.with_transitional.q35: PASS (53.91 s)
 (03/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_netkvm.with_legacy.q35: STARTED
 (03/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_netkvm.with_legacy.q35: PASS (53.43 s)
 (04/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_viorng.with_rng_builtin.with_modern.q35: STARTED
 (04/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_viorng.with_rng_builtin.with_modern.q35: PASS (54.49 s)
 (05/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_viorng.with_rng_builtin.with_transitional.q35: STARTED
 (05/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_viorng.with_rng_builtin.with_transitional.q35: PASS (53.90 s)
 (06/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_viorng.with_rng_builtin.with_legacy.q35: STARTED
 (06/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_viorng.with_rng_builtin.with_legacy.q35: PASS (54.55 s)
 (07/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_viorng.with_rng_random.with_modern.q35: STARTED
 (07/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_viorng.with_rng_random.with_modern.q35: PASS (54.77 s)
 (08/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_viorng.with_rng_random.with_transitional.q35: STARTED
 (08/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_viorng.with_rng_random.with_transitional.q35: PASS (54.24 s)
 (09/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_viorng.with_rng_random.with_legacy.q35: STARTED
 (09/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_viorng.with_rng_random.with_legacy.q35: PASS (55.26 s)
 (10/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_vioscsi.with_modern.q35: STARTED
 (10/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_vioscsi.with_modern.q35: PASS (54.38 s)
 (11/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_vioscsi.with_transitional.q35: STARTED
 (11/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_vioscsi.with_transitional.q35: PASS (54.43 s)
 (12/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_vioscsi.with_legacy.q35: STARTED
 (12/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_vioscsi.with_legacy.q35: PASS (54.72 s)
 (13/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_balloon.with_modern.q35: STARTED
 (13/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_balloon.with_modern.q35: PASS (55.69 s)
 (14/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_balloon.with_transitional.q35: STARTED
 (14/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_balloon.with_transitional.q35: PASS (55.63 s)
 (15/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_balloon.with_legacy.q35: STARTED
 (15/15) Host_RHEL.m9.u3.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_balloon.with_legacy.q35: PASS (54.24 s)
RESULTS    : PASS 15 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

@mcasquer
Copy link
Contributor Author

mcasquer commented Jul 14, 2023

@yanglei-rh @qingwangrh @PaulYuuu @yanan-fu @XueqiangWei Please could you review this PR? Thanks!

@mcasquer
Copy link
Contributor Author

mcasquer commented Jul 14, 2023

This solution could be applied to #3768 (or the #3768 solution to this PR).

IMHO, and following the developer's advice, we need to focus only in the numerical ID, as the name ID (previous pattern) can change without notice. Keeping in mind the current supported PCI IDs, it's possible to look for 0.9 or 1.0 virtio devices IDs in the same execution, avoiding possible failures in the future if any of the names change.

What do you think? @yanglei-rh @qingwangrh @PaulYuuu @yanan-fu @XueqiangWei

@yanglei-rh
Copy link
Contributor

Test Pass:
(1/3) Host_RHEL.m9.u3.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_netkvm.with_modern.q35: PASS (77.89 s)
(2/3) Host_RHEL.m9.u3.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_netkvm.with_transitional.q35: PASS (73.39 s)
(3/3) Host_RHEL.m9.u3.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.3.0.x86_64.io-github-autotest-qemu.virtio_mode.with_netkvm.with_legacy.q35: PASS (73.95 s)
(2/4) Host_RHEL.m9.u3.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win2022.x86_64.io-github-autotest-qemu.virtio_mode.with_netkvm.with_modern.q35: PASS (259.68 s)
(3/4) Host_RHEL.m9.u3.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win2022.x86_64.io-github-autotest-qemu.virtio_mode.with_netkvm.with_transitional.q35: PASS (174.29 s)
(4/4) Host_RHEL.m9.u3.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win2022.x86_64.io-github-autotest-qemu.virtio_mode.with_netkvm.with_legacy.q35: PASS (173.02 s)

@yanglei-rh
Copy link
Contributor

LGTM

@yanan-fu
Copy link
Contributor

Agree with using the numerical ID, it is more standard and uniform.
To be more not readable, how about comment it in the cfg as an reference:
https://man7.org/linux/man-pages/man5/pci.ids.5.html
https://github.com/pciutils/pciids/blob/master/pci.ids

@mcasquer
Copy link
Contributor Author

Agree with using the numerical ID, it is more standard and uniform. To be more not readable, how about comment it in the cfg as an reference: https://man7.org/linux/man-pages/man5/pci.ids.5.html https://github.com/pciutils/pciids/blob/master/pci.ids

@yanan-fu included now, thanks!

qemu/tests/virtio_mode.py Outdated Show resolved Hide resolved
qemu/tests/virtio_mode.py Outdated Show resolved Hide resolved
Updates the case logic, checking the numerical ID of the PCI devices
instead of the full name, that could be updated without notice.
In order to support 0.9 and 1.0 virtio devices, the pattern now
contains both IDs.

Signed-off-by: mcasquer <[email protected]>
@qingwangrh
Copy link
Contributor

LGTM

Copy link
Contributor

@yanan-fu yanan-fu left a comment

Choose a reason for hiding this comment

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

Ack

@mcasquer
Copy link
Contributor Author

Could this PR be merged? Thanks!

@yanan-fu yanan-fu merged commit ad87833 into autotest:master Jul 24, 2023
6 checks passed
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