summaryrefslogtreecommitdiff
path: root/drivers/base/regmap/Kconfig
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2023-03-26 15:11:13 +0100
committerMark Brown <broonie@kernel.org>2023-03-30 12:25:47 +0100
commit2238959b6ad27040275439edd6893e309bc729a3 (patch)
tree87881a6d48a92d7707d89da6cb6110558f2b5a3e /drivers/base/regmap/Kconfig
parentf6352424e37e7bf72291ceab87dc620172be0999 (diff)
regmap: Add some basic kunit tests
On the theory that it's better to make a start let's add some KUnit tests for regmap. Currently this is a bit of a mess but it passes and hopefully will at some point help catch problems. We provide very basic cover for most of the core functionality that operates at the register level, repeating each test for each cache type in order to exercise the caches. There is no coverage of anything to do with the bulk operations at the bus level or formatting for byte stream buses yet. Each test creates it's own regmap since the cache structures are built incrementally, meaning we gain coverage from the different access patterns, and some of the tests cover different init scenarios. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230324-regmap-kunit-v2-2-b208801dc2c8@kernel.org
Diffstat (limited to 'drivers/base/regmap/Kconfig')
-rw-r--r--drivers/base/regmap/Kconfig7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/base/regmap/Kconfig b/drivers/base/regmap/Kconfig
index 3d3445bff511..33a8366e22a5 100644
--- a/drivers/base/regmap/Kconfig
+++ b/drivers/base/regmap/Kconfig
@@ -9,6 +9,13 @@ config REGMAP
select MDIO_BUS if REGMAP_MDIO
bool
+config REGMAP_KUNIT
+ tristate "KUnit tests for regmap"
+ depends on KUNIT
+ default KUNIT_ALL_TESTS
+ select REGMAP
+ select REGMAP_RAM
+
config REGMAP_AC97
tristate