diff mbox series

[RFC,29/33] vfio: selftests: Make iommufd the default iommu_mode

Message ID 20250523233018.1702151-30-dmatlack@google.com
State New
Headers show
Series [RFC,01/33] selftests: Create tools/testing/selftests/vfio | expand

Commit Message

David Matlack May 23, 2025, 11:30 p.m. UTC
Now that VFIO selftests support iommufd, make it the default mode.
IOMMUFD is the successor to VFIO_TYPE1{,v2}_IOMMU and all new features
are being added there, so it's a slightly better fit as the default
mode.

Signed-off-by: David Matlack <dmatlack@google.com>
---
 tools/testing/selftests/vfio/lib/vfio_pci_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jason Gunthorpe May 26, 2025, 5:20 p.m. UTC | #1
On Fri, May 23, 2025 at 11:30:14PM +0000, David Matlack wrote:
> Now that VFIO selftests support iommufd, make it the default mode.
> IOMMUFD is the successor to VFIO_TYPE1{,v2}_IOMMU and all new features
> are being added there, so it's a slightly better fit as the default
> mode.

As before, the tests should run through all combinations on their own,
use a fixture.

It would be much better to fix the kselftests so you could regex
select the tests to run and use that as the commandline way to choose
what test combination to use.

Jason
David Matlack June 3, 2025, 5:24 p.m. UTC | #2
On Mon, May 26, 2025 at 10:20 AM Jason Gunthorpe <jgg@nvidia.com> wrote:
>
> On Fri, May 23, 2025 at 11:30:14PM +0000, David Matlack wrote:
> > Now that VFIO selftests support iommufd, make it the default mode.
> > IOMMUFD is the successor to VFIO_TYPE1{,v2}_IOMMU and all new features
> > are being added there, so it's a slightly better fit as the default
> > mode.
>
> As before, the tests should run through all combinations on their own,
> use a fixture.

Ack, I'll rework the series so that tests automatically run
through all IOMMU modes.

> It would be much better to fix the kselftests so you could regex
> select the tests to run and use that as the commandline way to choose
> what test combination to use.
diff mbox series

Patch

diff --git a/tools/testing/selftests/vfio/lib/vfio_pci_device.c b/tools/testing/selftests/vfio/lib/vfio_pci_device.c
index d996e012a646..d3c3958136cc 100644
--- a/tools/testing/selftests/vfio/lib/vfio_pci_device.c
+++ b/tools/testing/selftests/vfio/lib/vfio_pci_device.c
@@ -432,7 +432,7 @@  static const struct vfio_iommu_mode iommu_modes[] = {
 	},
 };
 
-const char *default_iommu_mode = "vfio_type1_iommu";
+const char *default_iommu_mode = "iommufd";
 
 void iommu_mode_help(const char *flag)
 {