[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250624134145.GB150753@nvidia.com>
Date: Tue, 24 Jun 2025 10:41:45 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Xu Yilun <yilun.xu@...ux.intel.com>
Cc: kevin.tian@...el.com, will@...nel.org, aneesh.kumar@...nel.org,
iommu@...ts.linux.dev, linux-kernel@...r.kernel.org,
joro@...tes.org, robin.murphy@....com, shuah@...nel.org,
nicolinc@...dia.com, aik@....com, dan.j.williams@...el.com,
baolu.lu@...ux.intel.com, yilun.xu@...el.com
Subject: Re: [PATCH v2 4/4] iommufd/selftest: Add coverage for vdevice
tombstone
On Mon, Jun 23, 2025 at 05:49:46PM +0800, Xu Yilun wrote:
> diff --git a/tools/testing/selftests/iommu/iommufd.c b/tools/testing/selftests/iommu/iommufd.c
> index 1a8e85afe9aa..092e1344447e 100644
> --- a/tools/testing/selftests/iommu/iommufd.c
> +++ b/tools/testing/selftests/iommu/iommufd.c
> @@ -3014,6 +3014,19 @@ TEST_F(iommufd_viommu, vdevice_cache)
> }
> }
>
> +TEST_F(iommufd_viommu, vdevice_tombstone)
> +{
> + uint32_t viommu_id = self->viommu_id;
> + uint32_t dev_id = self->device_id;
> + uint32_t vdev_id = 0;
> +
> + if (dev_id) {
Why the if? The test should work or skip, not silently skip.
self->device_id is setup by the fixture, it can't be absent.
Jason
Powered by blists - more mailing lists