Re: [PATCH 1/2] kunit: Fix formatting of KUNIT tests to meet the standard

2021-04-13 Thread Greg KH
On Wed, Apr 14, 2021 at 12:33:02AM -0400, Nico Pache wrote:
> There are few instances of KUNIT tests that are not properly defined.
> This commit focuses on correcting these issues to match the standard
> defined in the Documentation.
> 
> Issues Fixed:
>  - Tests should default to KUNIT_ALL_TESTS
>  - Tests configs tristate should have `if !KUNIT_ALL_TESTS`
>  - Tests should end in KUNIT_TEST, some fixes have been applied to
> correct issues were KUNIT_TESTS is used or KUNIT is not mentioned.

You are changing lots of different things all in one patch, please break
this up into "one config option change per patch" to make it easier to
review and get merged through the proper subsystem.

thanks,

greg k-h


Re: [PATCH 1/2] kunit: Fix formatting of KUNIT tests to meet the standard

2021-04-13 Thread Greg KH
On Wed, Apr 14, 2021 at 12:33:02AM -0400, Nico Pache wrote:
> There are few instances of KUNIT tests that are not properly defined.
> This commit focuses on correcting these issues to match the standard
> defined in the Documentation.
> 
> Issues Fixed:
>  - Tests should default to KUNIT_ALL_TESTS
>  - Tests configs tristate should have `if !KUNIT_ALL_TESTS`
>  - Tests should end in KUNIT_TEST, some fixes have been applied to
> correct issues were KUNIT_TESTS is used or KUNIT is not mentioned.
> 
> No functional changes other than CONFIG name changes
> Signed-off-by: Nico Pache 

Please put a blank line before your signed-off-by, as is required by the
tools :(

thanks,

greg k-h


[PATCH 1/2] kunit: Fix formatting of KUNIT tests to meet the standard

2021-04-13 Thread Nico Pache
There are few instances of KUNIT tests that are not properly defined.
This commit focuses on correcting these issues to match the standard
defined in the Documentation.

Issues Fixed:
 - Tests should default to KUNIT_ALL_TESTS
 - Tests configs tristate should have `if !KUNIT_ALL_TESTS`
 - Tests should end in KUNIT_TEST, some fixes have been applied to
correct issues were KUNIT_TESTS is used or KUNIT is not mentioned.

No functional changes other than CONFIG name changes
Signed-off-by: Nico Pache 
---
 drivers/base/test/Kconfig  |  2 +-
 drivers/base/test/Makefile |  2 +-
 fs/ext4/.kunitconfig   |  2 +-
 fs/ext4/Kconfig|  2 +-
 fs/ext4/Makefile   |  2 +-
 lib/Kconfig.debug  | 21 +
 lib/Makefile   |  6 +++---
 net/mptcp/Kconfig  |  2 +-
 net/mptcp/Makefile |  2 +-
 net/mptcp/crypto.c |  2 +-
 net/mptcp/token.c  |  2 +-
 sound/soc/Kconfig  |  2 +-
 sound/soc/Makefile |  4 ++--
 13 files changed, 28 insertions(+), 23 deletions(-)

diff --git a/drivers/base/test/Kconfig b/drivers/base/test/Kconfig
index ba225eb1b761..2f3fa31a948e 100644
--- a/drivers/base/test/Kconfig
+++ b/drivers/base/test/Kconfig
@@ -8,7 +8,7 @@ config TEST_ASYNC_DRIVER_PROBE
  The module name will be test_async_driver_probe.ko
 
  If unsure say N.
-config KUNIT_DRIVER_PE_TEST
+config DRIVER_PE_KUNIT_TEST
bool "KUnit Tests for property entry API" if !KUNIT_ALL_TESTS
depends on KUNIT=y
default KUNIT_ALL_TESTS
diff --git a/drivers/base/test/Makefile b/drivers/base/test/Makefile
index 2f15fae8625f..64b2f3d744d5 100644
--- a/drivers/base/test/Makefile
+++ b/drivers/base/test/Makefile
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_TEST_ASYNC_DRIVER_PROBE)  += test_async_driver_probe.o
 
-obj-$(CONFIG_KUNIT_DRIVER_PE_TEST) += property-entry-test.o
+obj-$(CONFIG_DRIVER_PE_KUNIT_TEST) += property-entry-test.o
 CFLAGS_REMOVE_property-entry-test.o += -fplugin-arg-structleak_plugin-byref 
-fplugin-arg-structleak_plugin-byref-all
diff --git a/fs/ext4/.kunitconfig b/fs/ext4/.kunitconfig
index bf51da7cd9fc..81d4da667740 100644
--- a/fs/ext4/.kunitconfig
+++ b/fs/ext4/.kunitconfig
@@ -1,3 +1,3 @@
 CONFIG_KUNIT=y
 CONFIG_EXT4_FS=y
-CONFIG_EXT4_KUNIT_TESTS=y
+CONFIG_EXT4_KUNIT_TEST=y
diff --git a/fs/ext4/Kconfig b/fs/ext4/Kconfig
index 86699c8cab28..1569d3872136 100644
--- a/fs/ext4/Kconfig
+++ b/fs/ext4/Kconfig
@@ -101,7 +101,7 @@ config EXT4_DEBUG
  If you select Y here, then you will be able to turn on debugging
  using dynamic debug control for mb_debug() / ext_debug() msgs.
 
-config EXT4_KUNIT_TESTS
+config EXT4_KUNIT_TEST
tristate "KUnit tests for ext4" if !KUNIT_ALL_TESTS
depends on EXT4_FS && KUNIT
default KUNIT_ALL_TESTS
diff --git a/fs/ext4/Makefile b/fs/ext4/Makefile
index 49e7af6cc93f..4e28e380d51b 100644
--- a/fs/ext4/Makefile
+++ b/fs/ext4/Makefile
@@ -15,5 +15,5 @@ ext4-y:= balloc.o bitmap.o block_validity.o dir.o 
ext4_jbd2.o extents.o \
 ext4-$(CONFIG_EXT4_FS_POSIX_ACL)   += acl.o
 ext4-$(CONFIG_EXT4_FS_SECURITY)+= xattr_security.o
 ext4-inode-test-objs   += inode-test.o
-obj-$(CONFIG_EXT4_KUNIT_TESTS) += ext4-inode-test.o
+obj-$(CONFIG_EXT4_KUNIT_TEST)  += ext4-inode-test.o
 ext4-$(CONFIG_FS_VERITY)   += verity.o
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 417c3d3e521b..7ade91511da6 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2279,9 +2279,10 @@ config TEST_SYSCTL
 
  If unsure, say N.
 
-config BITFIELD_KUNIT
-   tristate "KUnit test bitfield functions at runtime"
+config BITFIELD_KUNIT_TEST_TEST
+   tristate "KUnit test bitfield functions at runtime" if !KUNIT_ALL_TESTS
depends on KUNIT
+   default KUNIT_ALL_TESTS
help
  Enable this option to test the bitfield functions at boot.
 
@@ -2296,8 +2297,9 @@ config BITFIELD_KUNIT
  If unsure, say N.
 
 config RESOURCE_KUNIT_TEST
-   tristate "KUnit test for resource API"
+   tristate "KUnit test for resource API" if !KUNIT_ALL_TESTS
depends on KUNIT
+   default KUNIT_ALL_TESTS
help
  This builds the resource API unit test.
  Tests the logic of API provided by resource.c and ioport.h.
@@ -2337,9 +2339,10 @@ config LIST_KUNIT_TEST
 
  If unsure, say N.
 
-config LINEAR_RANGES_TEST
-   tristate "KUnit test for linear_ranges"
+config LINEAR_RANGES_KUNIT_TEST
+   tristate "KUnit test for linear_ranges" if !KUNIT_ALL_TESTS
depends on KUNIT
+   default KUNIT_ALL_TESTS
select LINEAR_RANGES
help
  This builds the linear_ranges unit test, which runs on boot.
@@ -2350,8 +2353,9 @@ config LINEAR_RANGES_TEST
  If unsure, say N.
 
 config CMDLINE_KUNIT_TEST
-   tristate "KUnit test for cmdline API"
+   tristate "KUnit test for