2017-12-09 16:28:00

by Vincent Legoll

[permalink] [raw]
Subject: [PATCH] make RUNTIME_TESTS a menuconfig to ease disabling it all

No need to get into the submenu to disable all related
config entries.

This makes it easier to disable all RUNTIME_TESTS config options
without entering the submenu. It will also enable one to see that
en/dis-abled state from the outside menu.

This is only intended to change menuconfig UI, not change
the config dependencies.

Signed-off-by: Vincent Legoll <[email protected]>
---
lib/Kconfig.debug | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 947d3e2ed5c2..9436714254b7 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1660,7 +1660,10 @@ config DMA_API_DEBUG

If unsure, say N.

-menu "Runtime Testing"
+menuconfig RUNTIME_TESTING_MENU
+ bool "Runtime Testing"
+
+if RUNTIME_TESTING_MENU

config LKDTM
tristate "Linux Kernel Dump Test Tool Module"
@@ -1948,7 +1951,7 @@ config TEST_DEBUG_VIRTUAL

If unsure, say N.

-endmenu # runtime tests
+endif # RUNTIME_TESTING_MENU

config MEMTEST
bool "Memtest"
--
2.14.1


2018-01-05 11:41:06

by Daniel Thompson

[permalink] [raw]
Subject: Re: [PATCH] make RUNTIME_TESTS a menuconfig to ease disabling it all



On 09/12/17 16:27, Vincent Legoll wrote:
> No need to get into the submenu to disable all related
> config entries.
>
> This makes it easier to disable all RUNTIME_TESTS config options
> without entering the submenu. It will also enable one to see that
> en/dis-abled state from the outside menu.
>
> This is only intended to change menuconfig UI, not change
> the config dependencies.

Wouldn't you need a "default y" applied to the menuconfig to achieve this?

With this patch applied defconfigs that enable LKDTM by default will no
longer do so (default_defconfig from arch/s390 is an example although
there are others).


Daniel.


>
> Signed-off-by: Vincent Legoll <[email protected]>
> ---
> lib/Kconfig.debug | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 947d3e2ed5c2..9436714254b7 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -1660,7 +1660,10 @@ config DMA_API_DEBUG
>
> If unsure, say N.
>
> -menu "Runtime Testing"
> +menuconfig RUNTIME_TESTING_MENU
> + bool "Runtime Testing"
> +
> +if RUNTIME_TESTING_MENU
>
> config LKDTM
> tristate "Linux Kernel Dump Test Tool Module"
> @@ -1948,7 +1951,7 @@ config TEST_DEBUG_VIRTUAL
>
> If unsure, say N.
>
> -endmenu # runtime tests
> +endif # RUNTIME_TESTING_MENU
>
> config MEMTEST
> bool "Memtest"
>

2018-01-05 12:29:07

by Vincent Legoll

[permalink] [raw]
Subject: Re: [PATCH] make RUNTIME_TESTS a menuconfig to ease disabling it all

Hello,

On Fri, Jan 5, 2018 at 12:40 PM, Daniel Thompson
<[email protected]> wrote:
> Wouldn't you need a "default y" applied to the menuconfig to achieve this?
>
> With this patch applied defconfigs that enable LKDTM by default will no
> longer do so (default_defconfig from arch/s390 is an example although there
> are others).

Yes, you're right, I'll resend a v2 with the default y added

Thanks

--
Vincent Legoll

2018-01-06 17:18:34

by Vincent Legoll

[permalink] [raw]
Subject: [PATCH] make RUNTIME_TESTS a menuconfig to ease disabling it all

No need to get into the submenu to disable all related
config entries.

This makes it easier to disable all RUNTIME_TESTS config options
without entering the submenu. It will also enable one to see that
en/dis-abled state from the outside menu.

This is only intended to change menuconfig UI, not change
the config dependencies.

v2: added "default y" to avoid breaking existing configs

Signed-off-by: Vincent Legoll <[email protected]>
---
lib/Kconfig.debug | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 9d5b78aad4c5..ef6db62a5deb 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1627,7 +1627,10 @@ config DMA_API_DEBUG

If unsure, say N.

-menu "Runtime Testing"
+menuconfig RUNTIME_TESTING_MENU
+ bool "Runtime Testing"
+
+if RUNTIME_TESTING_MENU

config LKDTM
tristate "Linux Kernel Dump Test Tool Module"
@@ -1915,7 +1918,7 @@ config TEST_DEBUG_VIRTUAL

If unsure, say N.

-endmenu # runtime tests
+endif # RUNTIME_TESTING_MENU

config MEMTEST
bool "Memtest"
--
2.14.1

2018-01-06 17:24:47

by Vincent Legoll

[permalink] [raw]
Subject: [PATCH, v2] make RUNTIME_TESTS a menuconfig to ease disabling it all


Argh, sorry for the forgotten "git add", hopefuly this one will be good

2018-01-06 17:24:56

by Vincent Legoll

[permalink] [raw]
Subject: [PATCH] make RUNTIME_TESTS a menuconfig to ease disabling it all

No need to get into the submenu to disable all related
config entries.

This makes it easier to disable all RUNTIME_TESTS config options
without entering the submenu. It will also enable one to see that
en/dis-abled state from the outside menu.

This is only intended to change menuconfig UI, not change
the config dependencies.

v2: added "default y" to avoid breaking existing configs

Signed-off-by: Vincent Legoll <[email protected]>
---
lib/Kconfig.debug | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 9d5b78aad4c5..732f7b09ad6f 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1627,7 +1627,11 @@ config DMA_API_DEBUG

If unsure, say N.

-menu "Runtime Testing"
+menuconfig RUNTIME_TESTING_MENU
+ bool "Runtime Testing"
+ default y
+
+if RUNTIME_TESTING_MENU

config LKDTM
tristate "Linux Kernel Dump Test Tool Module"
@@ -1915,7 +1919,7 @@ config TEST_DEBUG_VIRTUAL

If unsure, say N.

-endmenu # runtime tests
+endif # RUNTIME_TESTING_MENU

config MEMTEST
bool "Memtest"
--
2.14.1

2018-01-08 04:46:38

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] make RUNTIME_TESTS a menuconfig to ease disabling it all

On 01/06/18 09:24, Vincent Legoll wrote:
> No need to get into the submenu to disable all related
> config entries.
>
> This makes it easier to disable all RUNTIME_TESTS config options
> without entering the submenu. It will also enable one to see that
> en/dis-abled state from the outside menu.
>
> This is only intended to change menuconfig UI, not change
> the config dependencies.
>
> v2: added "default y" to avoid breaking existing configs
>
> Signed-off-by: Vincent Legoll <[email protected]>

Acked-and-tested-by: Randy Dunlap <[email protected]>

Thanks.

> ---
> lib/Kconfig.debug | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 9d5b78aad4c5..732f7b09ad6f 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -1627,7 +1627,11 @@ config DMA_API_DEBUG
>
> If unsure, say N.
>
> -menu "Runtime Testing"
> +menuconfig RUNTIME_TESTING_MENU
> + bool "Runtime Testing"
> + default y
> +
> +if RUNTIME_TESTING_MENU
>
> config LKDTM
> tristate "Linux Kernel Dump Test Tool Module"
> @@ -1915,7 +1919,7 @@ config TEST_DEBUG_VIRTUAL
>
> If unsure, say N.
>
> -endmenu # runtime tests
> +endif # RUNTIME_TESTING_MENU
>
> config MEMTEST
> bool "Memtest"
>


--
~Randy