[PATCH v2 3/3] iommu/io-pgtable-arm-selftests: Use KUnit
Jason Gunthorpe
jgg at ziepe.ca
Wed Sep 17 12:44:54 PDT 2025
On Wed, Sep 17, 2025 at 07:11:40PM +0000, Mostafa Saleh wrote:
> Integrate the selftests as part of kunit, this makes the test
> available through debugfs.
>
> Suggested-by: Jason Gunthorpe <jgg at ziepe.ca>
> Signed-off-by: Mostafa Saleh <smostafa at google.com>
> ---
> drivers/iommu/Kconfig | 2 +-
> drivers/iommu/io-pgtable-arm-selftests.c | 93 +++++++++++++-----------
> 2 files changed, 51 insertions(+), 44 deletions(-)
>
> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> index 553522ef3ca9..f7e6d1db6ce6 100644
> --- a/drivers/iommu/Kconfig
> +++ b/drivers/iommu/Kconfig
> @@ -42,7 +42,7 @@ config IOMMU_IO_PGTABLE_LPAE
>
> config IOMMU_IO_PGTABLE_LPAE_SELFTEST
This should probably be renamed to xxx_KUNIT_TEST
> tristate "LPAE selftests"
> - depends on IOMMU_IO_PGTABLE_LPAE
> + depends on IOMMU_IO_PGTABLE_LPAE && KUNIT
I wonder if it should be:
select IOMMU_IO_PGTABLE_LPAE
depends on KUNIT
default KUNIT_ALL_TESTS
?
At least the default should be there
> help
> Enable self-tests for LPAE page table allocator. This performs
> a series of page-table consistency checks during boot.
"kunit tests" here as well
> -subsys_initcall(arm_lpae_do_selftests);
Oh so it does drop the initcall, the coverletter is a bit confusing then.
Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>
Jason
More information about the linux-arm-kernel
mailing list