Re: [PATCH v8 0/8] vfio: selftest: Add SR-IOV UAPI test
From: Alex Williamson
Date: Wed May 20 2026 - 17:14:25 EST
On Tue, 5 May 2026 21:28:30 +0000
Raghavendra Rao Ananta <rananta@xxxxxxxxxx> wrote:
> Hello,
>
> This series adds a vfio selftest, vfio_pci_sriov_uapi_test.c, to get some
> coverage on SR-IOV UAPI handling. Specifically, it includes the
> following cases that iterates over all the iommu modes:
> - Setting correct/incorrect/NULL tokens during device init.
> - Close the PF device immediately after setting the token.
> - Change/override the PF's token after device init.
>
> The test takes care of creating/setting up the VF device, and hence, it
> can be executed like any other test, simply by passing the PF's BDF to
> run.sh. For example,
>
> $ ./scripts/setup.sh 0000:16:00.1
> $ ./scripts/run.sh ./vfio_pci_sriov_uapi_test
>
> Created 1 VF (0000:1a:00.0) under the PF: 0000:16:00.1
> TAP version 13
> 1..45
> # Starting 45 tests from 15 test cases.
> # RUN vfio_pci_sriov_uapi_test.vfio_type1_iommu_same_uuid.init_token_match ...
> # OK vfio_pci_sriov_uapi_test.vfio_type1_iommu_same_uuid.init_token_match
> ok 1 vfio_pci_sriov_uapi_test.vfio_type1_iommu_same_uuid.init_token_match
> # RUN vfio_pci_sriov_uapi_test.vfio_type1_iommu_same_uuid.pf_early_close ...
> # OK vfio_pci_sriov_uapi_test.vfio_type1_iommu_same_uuid.pf_early_close
> ok 2 vfio_pci_sriov_uapi_test.vfio_type1_iommu_same_uuid.pf_early_close
> [...]
> # RUN vfio_pci_sriov_uapi_test.iommufd_null_uuid.override_token ...
> # OK vfio_pci_sriov_uapi_test.iommufd_null_uuid.override_token
> ok 45 vfio_pci_sriov_uapi_test.iommufd_null_uuid.override_token
> # PASSED: 45 / 45 tests passed.
> # Totals: pass:45 fail:0 xfail:0 xpass:0 skip:0 error:0
Applied to vfio next branch for v7.2. Thanks,
Alex