Re: [PATCH v7 8/8] vfio: selftests: Add tests to validate SR-IOV UAPI

From: Vipin Sharma

Date: Mon Apr 13 2026 - 14:16:57 EST


On Tue, Apr 07, 2026 at 01:51:00PM -0700, Raghavendra Rao Ananta wrote:
> On Mon, Apr 6, 2026 at 3:24 PM David Matlack <dmatlack@xxxxxxxxxx> wrote:
> >
> > On 2026-04-02 05:30 PM, Raghavendra Rao Ananta wrote:
> >
> > > +/* clang-format off */
> > > +FIXTURE(vfio_pci_sriov_uapi_test) {};
> > > +/* clang-format on */
> > > +
> > > +FIXTURE_SETUP(vfio_pci_sriov_uapi_test)
> > > +{
> > > +}
> > > +
> > > +FIXTURE_TEARDOWN(vfio_pci_sriov_uapi_test)
> > > +{
> > > +}
> >
> > Please do iommu_init() iommu_cleanup() here to reduce code duplication
> > and as an added bonus you can drop the clang-format comments above.
> >
> I think even Vipin suggested this. Last time I tried this, IIRC got a
> build error that 'variant' was inaccessible. But I guess I just had to
> re-org my code to make it work.
> I'll do this in v8.

Build error is because FIXTURE_VARIANT is coming after
FIXTURE_SETUP, if you move it before it should work.