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

vIOMMU: Add a vm lifecycle test #5413

Merged
merged 1 commit into from
Mar 12, 2024
Merged

Conversation

Yingshun
Copy link
Contributor

@Yingshun Yingshun commented Jan 26, 2024

This PR adds:
VIRT-294807 - [vIOMMU] Lifecycle test for vm with iommu device

Test results: some cases are failed due to known issues.

 (01/14) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.save_restore.e1000e.virtio: ERROR: Command '/bin/virsh restore /var/tmp/avocado-vt-vm1_Qdi.save ' failed.\nstdout: b'\n'\nstderr: b'error: Failed to restore domain from /var/tmp/avocado-vt-vm1_Qdi.save\nerror: operation failed: domain is not running\n'\nadditional_info: None (61.83 s)
 (02/14) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.save_restore.e1000e.intel: PASS (252.06 s)
 (03/14) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.save_restore.virtio_muti_devices.vhost_on.virtio: ERROR: Command '/bin/virsh restore /var/tmp/avocado-vt-vm1_X9N.save ' failed.\nstdout: b'\n'\nstderr: b'error: Failed to restore domain from /var/tmp/avocado-vt-vm1_X9N.save\nerror: operation failed: domain is not running\n'\nadditional_info: None (64.40 s)
 (04/14) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.save_restore.virtio_muti_devices.vhost_on.intel: PASS (252.99 s)
 (05/14) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.suspend_resume.e1000e.virtio: PASS (88.16 s)
 (06/14) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.suspend_resume.e1000e.intel: PASS (239.45 s)
 (07/14) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.suspend_resume.virtio_muti_devices.vhost_on.virtio: PASS (88.17 s)
 (08/14) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.suspend_resume.virtio_muti_devices.vhost_on.intel: PASS (240.67 s)
 (09/14) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.suspend_resume.hostdev_iface.virtio: PASS (80.61 s)
 (10/14) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.reboot_many_times.e1000e.virtio: PASS (324.01 s)
 (11/14) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.reboot_many_times.e1000e.intel: PASS (474.32 s)
 (12/14) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.reboot_many_times.virtio_muti_devices.vhost_on.virtio: PASS (325.47 s)
 (13/14) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.reboot_many_times.virtio_muti_devices.vhost_on.intel: PASS (474.24 s)
 (14/14) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.reboot_many_times.hostdev_iface.virtio: PASS (341.28 s)
Not opening readers, lock_server_running not locked
RESULTS    : PASS 12 | ERROR 2 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /var/lib/avocado/job-results/job-2024-01-29T03.56-52fd67a/results.html
JOB TIME   : 3310.32 s
(.libvirt-ci-venv-ci-ru

iommu_dict = {'model': 'smmuv3'}
variants:
- e1000e:
no smmuv3
Copy link
Contributor

Choose a reason for hiding this comment

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

only x86 for e1000e?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, updated.

This PR adds:
    VIRT-294807 - [vIOMMU] Lifecycle test for vm with iommu device

Signed-off-by: Yingshun Cui <[email protected]>
@dzhengfy
Copy link
Contributor

I will update test result on arm.

@dzhengfy
Copy link
Contributor

dzhengfy commented Feb 19, 2024

The first time run with libvirt-10.0.0 on ARM:


 (1/8) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.save_restore.virtio_muti_devices.vhost_on.virtio: PASS (82.49 s)
 (2/8) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.save_restore.virtio_muti_devices.vhost_on.smmuv3: CANCEL: NO available pf found. (4.12 s)
 (3/8) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.suspend_resume.virtio_muti_devices.vhost_on.virtio: PASS (67.30 s)
 (4/8) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.suspend_resume.virtio_muti_devices.vhost_on.smmuv3: PASS (67.38 s)
 (5/8) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.suspend_resume.hostdev_iface.virtio: PASS (67.53 s)
 (6/8) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.reboot_many_times.virtio_muti_devices.vhost_on.virtio: CANCEL: NO available pf found. (4.19 s)
 (7/8) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.reboot_many_times.virtio_muti_devices.vhost_on.smmuv3: PASS (281.18 s)
 (8/8) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.reboot_many_times.hostdev_iface.virtio: PASS (314.08 s)

Then rerun the failed cases one by one:

 (1/1) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.save_restore.virtio_muti_devices.vhost_on.smmuv3: PASS (82.67 s)

 (1/1) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.reboot_many_times.virtio_muti_devices.vhost_on.virtio: PASS (279.37 s)


So I guess this is due to the PF is not back to the host in short time. Could you double check and add codes to make it stabler?

Copy link
Contributor

@dzhengfy dzhengfy left a comment

Choose a reason for hiding this comment

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

See my above comment

@Yingshun
Copy link
Contributor Author

Yingshun commented Feb 20, 2024

@dzhengfy I can't reproduce the problem you mentioned and all the above cases passed in the machine you provided. I'm not sure if it's an environment issue or a random issue, no clue for now. And there is no actions related to PF status change in this test, so can we keep it mind and check if it happens again in the further?

# avocado run --vt-type libvirt --test-runner=runner --vt-machine-type arm64-mmio iommu_device_lifecycle
No python imaging library installed. Screendump and Windows guest BSOD detection are disabled. In order to enable it, please install python-imaging or the equivalent for your distro.
No python imaging library installed. PPM image conversion to JPEG disabled. In order to enable it, please install python-imaging or the equivalent for your distro.
JOB ID     : 87bf822afa2f69a9fffcdf7e6c05db93e99768be
JOB LOG    : /var/lib/avocado/job-results/job-2024-02-19T22.40-87bf822/job.log
 (1/8) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.save_restore.virtio_muti_devices.vhost_on.virtio: PASS (68.51 s)
 (2/8) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.save_restore.virtio_muti_devices.vhost_on.smmuv3: PASS (69.27 s)
 (3/8) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.suspend_resume.virtio_muti_devices.vhost_on.virtio: PASS (66.97 s)
 (4/8) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.suspend_resume.virtio_muti_devices.vhost_on.smmuv3: PASS (67.30 s)
 (5/8) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.suspend_resume.hostdev_iface.virtio: PASS (103.56 s)
 (6/8) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.reboot_many_times.virtio_muti_devices.vhost_on.virtio: PASS (281.78 s)
 (7/8) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.reboot_many_times.virtio_muti_devices.vhost_on.smmuv3: PASS (281.41 s)
 (8/8) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_lifecycle.reboot_many_times.hostdev_iface.virtio: PASS (278.38 s)

@Yingshun Yingshun requested a review from dzhengfy February 20, 2024 06:50
Copy link
Contributor

@dzhengfy dzhengfy left a comment

Choose a reason for hiding this comment

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

LGTM

@dzhengfy dzhengfy merged commit 8d128ee into autotest:master Mar 12, 2024
5 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.

3 participants