From: Nico Pache <npache@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: brendanhiggins@google.com, gregkh@linuxfoundation.org,
linux-ext4@vger.kernel.org, netdev@vger.kernel.org,
rafael@kernel.org, npache@redhat.com,
linux-m68k@lists.linux-m68k.org, geert@linux-m68k.org,
tytso@mit.edu, mathew.j.martineau@linux.intel.com,
davem@davemloft.net, broonie@kernel.org, davidgow@google.com,
skhan@linuxfoundation.org, mptcp@lists.linux.dev
Subject: [PATCH v2 4/6] kunit: lib: adhear to KUNIT formatting standard
Date: Wed, 14 Apr 2021 04:58:07 -0400 [thread overview]
Message-ID: <f427ed5cbc08da83086c504fbb3ad1bab50340cd.1618388989.git.npache@redhat.com> (raw)
In-Reply-To: <cover.1618388989.git.npache@redhat.com>
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@redhat.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
next prev parent reply other threads:[~2021-04-14 9:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-14 8:58 [PATCH v2 0/6] kunit: Fix formatting of KUNIT tests to meet the standard Nico Pache
2021-04-14 8:58 ` [PATCH v2 1/6] kunit: ASoC: topology: adhear to KUNIT formatting standard Nico Pache
2021-04-14 14:20 ` Mark Brown
2021-04-14 8:58 ` [PATCH v2 2/6] kunit: software node: " Nico Pache
2021-04-14 8:58 ` [PATCH v2 3/6] kunit: ext4: " Nico Pache
2021-04-18 19:41 ` Theodore Ts'o
2021-04-14 8:58 ` Nico Pache [this message]
2021-04-14 8:58 ` [PATCH v2 5/6] kunit: mptcp: " Nico Pache
2021-04-14 9:25 ` Matthieu Baerts
2021-04-15 6:01 ` David Gow
2021-04-15 7:10 ` Matthieu Baerts
2021-04-17 4:24 ` David Gow
2021-04-17 8:02 ` Matthieu Baerts
2021-04-19 7:40 ` Geert Uytterhoeven
2021-04-14 8:58 ` [PATCH v2 6/6] m68k: update configs to match the proper KUNIT syntax Nico Pache
2021-04-14 16:06 ` (subset) [PATCH v2 0/6] kunit: Fix formatting of KUNIT tests to meet the standard Mark Brown
2021-04-18 19:39 ` Theodore Ts'o
2021-04-22 20:39 ` Nico Pache
2021-04-23 6:26 ` David Gow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f427ed5cbc08da83086c504fbb3ad1bab50340cd.1618388989.git.npache@redhat.com \
--to=npache@redhat.com \
--cc=brendanhiggins@google.com \
--cc=broonie@kernel.org \
--cc=davem@davemloft.net \
--cc=davidgow@google.com \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=mathew.j.martineau@linux.intel.com \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).