* [PATCH] iommufd/selftest: Iterate idev_ids in mock_domain's alloc_hwpt test
@ 2023-09-19 1:16 Nicolin Chen
2023-09-26 5:48 ` Tian, Kevin
2023-09-26 16:13 ` Jason Gunthorpe
0 siblings, 2 replies; 3+ messages in thread
From: Nicolin Chen @ 2023-09-19 1:16 UTC (permalink / raw)
To: jgg, kevin.tian; +Cc: yi.l.liu, shuah, iommu, linux-kernel, linux-kselftest
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.
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
---
Jason/Kevin, I formated the patch with "-U4" so it shows the "for" line.
I didn't send it as a bug fix since it doesn't feel so critical that it
should bother stable trees -- yet if there's a need, I'd resend. Thanks!
tools/testing/selftests/iommu/iommufd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/iommu/iommufd.c b/tools/testing/selftests/iommu/iommufd.c
index 33d08600be13..9f705c1ea30f 100644
--- a/tools/testing/selftests/iommu/iommufd.c
+++ b/tools/testing/selftests/iommu/iommufd.c
@@ -1406,9 +1406,9 @@ TEST_F(iommufd_mock_domain, alloc_hwpt)
for (i = 0; i != variant->mock_domains; i++) {
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);
}
--
2.42.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] iommufd/selftest: Iterate idev_ids in mock_domain's alloc_hwpt test
2023-09-19 1:16 [PATCH] iommufd/selftest: Iterate idev_ids in mock_domain's alloc_hwpt test Nicolin Chen
@ 2023-09-26 5:48 ` Tian, Kevin
2023-09-26 16:13 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Tian, Kevin @ 2023-09-26 5:48 UTC (permalink / raw)
To: Nicolin Chen, jgg@nvidia.com
Cc: Liu, Yi L, shuah@kernel.org, iommu@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
> From: Nicolin Chen <nicolinc@nvidia.com>
> Sent: Tuesday, September 19, 2023 9:17 AM
>
> 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.
>
> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iommufd/selftest: Iterate idev_ids in mock_domain's alloc_hwpt test
2023-09-19 1:16 [PATCH] iommufd/selftest: Iterate idev_ids in mock_domain's alloc_hwpt test Nicolin Chen
2023-09-26 5:48 ` Tian, Kevin
@ 2023-09-26 16:13 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2023-09-26 16:13 UTC (permalink / raw)
To: Nicolin Chen
Cc: kevin.tian, yi.l.liu, shuah, iommu, linux-kernel, linux-kselftest
On Mon, Sep 18, 2023 at 06:16:37PM -0700, Nicolin Chen wrote:
> 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.
>
> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
> ---
> Jason/Kevin, I formated the patch with "-U4" so it shows the "for" line.
> I didn't send it as a bug fix since it doesn't feel so critical that it
> should bother stable trees -- yet if there's a need, I'd resend. Thanks!
>
> tools/testing/selftests/iommu/iommufd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to iommufd for-next
Thanks,
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-26 16:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-19 1:16 [PATCH] iommufd/selftest: Iterate idev_ids in mock_domain's alloc_hwpt test Nicolin Chen
2023-09-26 5:48 ` Tian, Kevin
2023-09-26 16:13 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox