Skip to content

Commit

Permalink
iommufd/selftest: Iterate idev_ids in mock_domain's alloc_hwpt test
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Nicolin Chen <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
  • Loading branch information
nicolinc authored and jgunthorpe committed Sep 26, 2023
1 parent 474d9f3 commit bb812e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/iommu/iommufd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bb812e0

Please sign in to comment.