Skip to content

Commit bb812e0

Browse files
nicolincjgunthorpe
authored andcommitted
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>
1 parent 474d9f3 commit bb812e0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/testing/selftests/iommu/iommufd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,7 @@ TEST_F(iommufd_mock_domain, alloc_hwpt)
14071407
uint32_t stddev_id;
14081408
uint32_t hwpt_id;
14091409

1410-
test_cmd_hwpt_alloc(self->idev_ids[0], self->ioas_id, &hwpt_id);
1410+
test_cmd_hwpt_alloc(self->idev_ids[i], self->ioas_id, &hwpt_id);
14111411
test_cmd_mock_domain(hwpt_id, &stddev_id, NULL, NULL);
14121412
test_ioctl_destroy(stddev_id);
14131413
test_ioctl_destroy(hwpt_id);

0 commit comments

Comments
 (0)