diff options
author | Nicolin Chen <nicolinc@nvidia.com> | 2023-09-18 18:16:37 -0700 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2023-09-26 13:07:02 -0300 |
commit | bb812e0069ce5de9af2a7910951c8c95632cebe3 (patch) | |
tree | ff57ba2a8fac4ee0f1bfdeddc8f80baa24afae03 /tools | |
parent | 474d9f32766a104fc8703c9a76815769139edd60 (diff) | |
download | linux-stable-bb812e0069ce5de9af2a7910951c8c95632cebe3.tar.gz linux-stable-bb812e0069ce5de9af2a7910951c8c95632cebe3.tar.bz2 linux-stable-bb812e0069ce5de9af2a7910951c8c95632cebe3.zip |
iommufd/selftest: Iterate idev_ids in mock_domain's alloc_hwpt test
The point in iterating variant->mock_domains is to test the idev_ids[0]
and idev_ids[1]. So use it instead of keeping testing idev_ids[0] only.
Link: https://lore.kernel.org/r/20230919011637.16483-1-nicolinc@nvidia.com
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/iommu/iommufd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/iommu/iommufd.c b/tools/testing/selftests/iommu/iommufd.c index b7249ffc6750..f094a08a17ed 100644 --- a/tools/testing/selftests/iommu/iommufd.c +++ b/tools/testing/selftests/iommu/iommufd.c @@ -1407,7 +1407,7 @@ TEST_F(iommufd_mock_domain, alloc_hwpt) uint32_t stddev_id; uint32_t hwpt_id; - test_cmd_hwpt_alloc(self->idev_ids[0], self->ioas_id, &hwpt_id); + test_cmd_hwpt_alloc(self->idev_ids[i], self->ioas_id, &hwpt_id); test_cmd_mock_domain(hwpt_id, &stddev_id, NULL, NULL); test_ioctl_destroy(stddev_id); test_ioctl_destroy(hwpt_id); |