lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <f427ed5cbc08da83086c504fbb3ad1bab50340cd.1618388989.git.npache@redhat.com>
Date:   Wed, 14 Apr 2021 04:58:07 -0400
From:   Nico Pache <npache@...hat.com>
To:     linux-kernel@...r.kernel.org
Cc:     brendanhiggins@...gle.com, gregkh@...uxfoundation.org,
        linux-ext4@...r.kernel.org, netdev@...r.kernel.org,
        rafael@...nel.org, npache@...hat.com,
        linux-m68k@...ts.linux-m68k.org, geert@...ux-m68k.org,
        tytso@....edu, mathew.j.martineau@...ux.intel.com,
        davem@...emloft.net, broonie@...nel.org, davidgow@...gle.com,
        skhan@...uxfoundation.org, mptcp@...ts.linux.dev
Subject: [PATCH v2 4/6] kunit: lib: adhear to KUNIT formatting standard

Change config names inorder to adhear to the KUNIT *KUNIT_TEST config
name format.

Add 'if !KUNIT_ALL_TESTS' to the KUNIT config tristates inorder to
adhear to the KUNIT standard.

add 'default KUNIT_ALL_TESTS' to the KUNIT config options inorder
to adhear to the KUNIT standard.

Fixes: 6d511020e13d (lib/test_bits.c: add tests of GENMASK)
Fixes: d2585f5164c2 (lib: kunit: add bitfield test conversion to KUnit)
Fixes: 33d599f05299 (lib/test_linear_ranges: add a test for the 'linear_ranges')
Signed-off-by: Nico Pache <npache@...hat.com>
---
 lib/Kconfig.debug | 21 +++++++++++++--------
 lib/Makefile      |  6 +++---
 2 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 417c3d3e521b..e7a5f4cc6de1 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
+	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 cmdline API" if !KUNIT_ALL_TESTS
 	depends on KUNIT
+	default KUNIT_ALL_TESTS
 	help
 	  This builds the cmdline API unit test.
 	  Tests the logic of API provided by cmdline.c.
@@ -2360,9 +2364,10 @@ config CMDLINE_KUNIT_TEST
 
 	  If unsure, say N.
 
-config BITS_TEST
-	tristate "KUnit test for bits.h"
+config BITS_KUNIT_TEST
+	tristate "KUnit test for bits.h" if !KUNIT_ALL_TESTS
 	depends on KUNIT
+	default KUNIT_ALL_TESTS
 	help
 	  This builds the bits unit test.
 	  Tests the logic of macros defined in bits.h.
diff --git a/lib/Makefile b/lib/Makefile
index b5307d3eec1a..ffa749c3b6e4 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -347,10 +347,10 @@ obj-$(CONFIG_OBJAGG) += objagg.o
 obj-$(CONFIG_PLDMFW) += pldmfw/
 
 # KUnit tests
-obj-$(CONFIG_BITFIELD_KUNIT) += bitfield_kunit.o
+obj-$(CONFIG_BITFIELD_KUNIT_TEST) += bitfield_kunit.o
 obj-$(CONFIG_LIST_KUNIT_TEST) += list-test.o
-obj-$(CONFIG_LINEAR_RANGES_TEST) += test_linear_ranges.o
-obj-$(CONFIG_BITS_TEST) += test_bits.o
+obj-$(CONFIG_LINEAR_RANGES_KUNIT_TEST) += test_linear_ranges.o
+obj-$(CONFIG_BITS_KUNIT_TEST) += test_bits.o
 obj-$(CONFIG_CMDLINE_KUNIT_TEST) += cmdline_kunit.o
 
 obj-$(CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED) += devmem_is_allowed.o
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ