Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH] regmap: Provide user selectable option to enable regmap
@ 2023-07-11 23:21 Mark Brown
  2023-07-13  4:17 ` David Gow
  2023-07-13 20:12 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Mark Brown @ 2023-07-11 23:21 UTC (permalink / raw)
  To: Brendan Higgins, David Gow
  Cc: linux-kernel, linux-kselftest, kunit-dev, Mark Brown

Since apparently enabling all the KUnit tests shouldn't enable any new
subsystems it is hard to enable the regmap KUnit tests in normal KUnit
testing scenarios that don't enable any drivers.  Add a Kconfig option
to help with this and include it in the KUnit all tests config.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/base/regmap/Kconfig                  | 12 +++++++++++-
 tools/testing/kunit/configs/all_tests.config |  2 ++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/base/regmap/Kconfig b/drivers/base/regmap/Kconfig
index 0db2021f7477..b1affac70d5d 100644
--- a/drivers/base/regmap/Kconfig
+++ b/drivers/base/regmap/Kconfig
@@ -4,7 +4,7 @@
 # subsystems should select the appropriate symbols.
 
 config REGMAP
-	bool "Register Map support" if KUNIT_ALL_TESTS
+	bool
 	default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ || REGMAP_SOUNDWIRE || REGMAP_SOUNDWIRE_MBQ || REGMAP_SCCB || REGMAP_I3C || REGMAP_SPI_AVMM || REGMAP_MDIO || REGMAP_FSI)
 	select IRQ_DOMAIN if REGMAP_IRQ
 	select MDIO_BUS if REGMAP_MDIO
@@ -23,6 +23,16 @@ config REGMAP_KUNIT
 	default KUNIT_ALL_TESTS
 	select REGMAP_RAM
 
+config REGMAP_BUILD
+	bool "Enable regmap build"
+	depends on KUNIT
+	select REGMAP
+	help
+	  This option exists purely to allow the regmap KUnit tests to
+	  be enabled without having to enable some driver that uses
+	  regmap due to unfortunate issues with how KUnit tests are
+	  normally enabled.
+
 config REGMAP_AC97
 	tristate
 
diff --git a/tools/testing/kunit/configs/all_tests.config b/tools/testing/kunit/configs/all_tests.config
index 0393940c706a..873f3e06ccad 100644
--- a/tools/testing/kunit/configs/all_tests.config
+++ b/tools/testing/kunit/configs/all_tests.config
@@ -33,5 +33,7 @@ CONFIG_DAMON_PADDR=y
 CONFIG_DEBUG_FS=y
 CONFIG_DAMON_DBGFS=y
 
+CONFIG_REGMAP_BUILD=y
+
 CONFIG_SECURITY=y
 CONFIG_SECURITY_APPARMOR=y

---
base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5
change-id: 20230701-regmap-kunit-enable-a08718e77dd4

Best regards,
-- 
Mark Brown <broonie@kernel.org>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] regmap: Provide user selectable option to enable regmap
  2023-07-11 23:21 [PATCH] regmap: Provide user selectable option to enable regmap Mark Brown
@ 2023-07-13  4:17 ` David Gow
  2023-07-13 20:12 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: David Gow @ 2023-07-13  4:17 UTC (permalink / raw)
  To: Mark Brown; +Cc: Brendan Higgins, linux-kernel, linux-kselftest, kunit-dev

[-- Attachment #1: Type: text/plain, Size: 2685 bytes --]

On Wed, 12 Jul 2023 at 07:22, Mark Brown <broonie@kernel.org> wrote:
>
> Since apparently enabling all the KUnit tests shouldn't enable any new
> subsystems it is hard to enable the regmap KUnit tests in normal KUnit
> testing scenarios that don't enable any drivers.  Add a Kconfig option
> to help with this and include it in the KUnit all tests config.
>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---

Thanks: I wasn't totally convinced of the extra CONFIG_REGMAP_BUILD
option at first, but having thought about it some more (and seen the
ASoC topology one, which has always annoyed me for being a pain to
enable), I've come around.

Reviewed-by: David Gow <davidgow@google.com>

Cheers,
-- David

>  drivers/base/regmap/Kconfig                  | 12 +++++++++++-
>  tools/testing/kunit/configs/all_tests.config |  2 ++
>  2 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/base/regmap/Kconfig b/drivers/base/regmap/Kconfig
> index 0db2021f7477..b1affac70d5d 100644
> --- a/drivers/base/regmap/Kconfig
> +++ b/drivers/base/regmap/Kconfig
> @@ -4,7 +4,7 @@
>  # subsystems should select the appropriate symbols.
>
>  config REGMAP
> -       bool "Register Map support" if KUNIT_ALL_TESTS
> +       bool
>         default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ || REGMAP_SOUNDWIRE || REGMAP_SOUNDWIRE_MBQ || REGMAP_SCCB || REGMAP_I3C || REGMAP_SPI_AVMM || REGMAP_MDIO || REGMAP_FSI)
>         select IRQ_DOMAIN if REGMAP_IRQ
>         select MDIO_BUS if REGMAP_MDIO
> @@ -23,6 +23,16 @@ config REGMAP_KUNIT
>         default KUNIT_ALL_TESTS
>         select REGMAP_RAM
>
> +config REGMAP_BUILD
> +       bool "Enable regmap build"
> +       depends on KUNIT
> +       select REGMAP
> +       help
> +         This option exists purely to allow the regmap KUnit tests to
> +         be enabled without having to enable some driver that uses
> +         regmap due to unfortunate issues with how KUnit tests are
> +         normally enabled.
> +
>  config REGMAP_AC97
>         tristate
>
> diff --git a/tools/testing/kunit/configs/all_tests.config b/tools/testing/kunit/configs/all_tests.config
> index 0393940c706a..873f3e06ccad 100644
> --- a/tools/testing/kunit/configs/all_tests.config
> +++ b/tools/testing/kunit/configs/all_tests.config
> @@ -33,5 +33,7 @@ CONFIG_DAMON_PADDR=y
>  CONFIG_DEBUG_FS=y
>  CONFIG_DAMON_DBGFS=y
>
> +CONFIG_REGMAP_BUILD=y
> +
>  CONFIG_SECURITY=y
>  CONFIG_SECURITY_APPARMOR=y
>
> ---
> base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5
> change-id: 20230701-regmap-kunit-enable-a08718e77dd4
>
> Best regards,
> --
> Mark Brown <broonie@kernel.org>
>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4003 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] regmap: Provide user selectable option to enable regmap
  2023-07-11 23:21 [PATCH] regmap: Provide user selectable option to enable regmap Mark Brown
  2023-07-13  4:17 ` David Gow
@ 2023-07-13 20:12 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2023-07-13 20:12 UTC (permalink / raw)
  To: Brendan Higgins, David Gow, Mark Brown
  Cc: linux-kernel, linux-kselftest, kunit-dev

On Wed, 12 Jul 2023 00:21:52 +0100, Mark Brown wrote:
> Since apparently enabling all the KUnit tests shouldn't enable any new
> subsystems it is hard to enable the regmap KUnit tests in normal KUnit
> testing scenarios that don't enable any drivers.  Add a Kconfig option
> to help with this and include it in the KUnit all tests config.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-next

Thanks!

[1/1] regmap: Provide user selectable option to enable regmap
      commit: 47ee108a113c72ec8ceee2c7af52c19ed72e6ad7

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-13 20:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-11 23:21 [PATCH] regmap: Provide user selectable option to enable regmap Mark Brown
2023-07-13  4:17 ` David Gow
2023-07-13 20:12 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox