mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sander Vanheule <sander@svanheule.net>
To: Yury Norov <yury.norov@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: linux-kernel@vger.kernel.org,
	"Maíra Canal" <mairacanal@riseup.net>,
	"David Gow" <davidgow@google.com>,
	"Sander Vanheule" <sander@svanheule.net>
Subject: [PATCH v1 3/5] lib/test_cpumask: follow KUnit style guidelines
Date: Tue,  9 Aug 2022 20:08:53 +0200	[thread overview]
Message-ID: <c3b4b27a1135558e1eb30261ce7e2df3cb43ec6e.1660068429.git.sander@svanheule.net> (raw)
In-Reply-To: <cover.1660068429.git.sander@svanheule.net>

The cpumask test suite doesn't follow the KUnit style guidelines, as
laid out in Documentation/dev-tools/kunit/style.rst.  The file is
renamed to lib/cpumask_kunit.c to clearly distinguish it from other,
non-KUnit, tests.

Link: https://lore.kernel.org/lkml/346cb279-8e75-24b0-7d12-9803f2b41c73@riseup.net/
Suggested-by: Maíra Canal <mairacanal@riseup.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
---
 lib/Kconfig.debug                       | 7 +++++--
 lib/Makefile                            | 2 +-
 lib/{test_cpumask.c => cpumask_kunit.c} | 0
 3 files changed, 6 insertions(+), 3 deletions(-)
 rename lib/{test_cpumask.c => cpumask_kunit.c} (100%)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 072e4b289c13..bcbe60d6c80c 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2029,13 +2029,16 @@ config LKDTM
 	Documentation on how to use the module can be found in
 	Documentation/fault-injection/provoke-crashes.rst
 
-config TEST_CPUMASK
-	tristate "cpumask tests" if !KUNIT_ALL_TESTS
+config CPUMASK_KUNIT_TEST
+	tristate "KUnit test for cpumask" if !KUNIT_ALL_TESTS
 	depends on KUNIT
 	default KUNIT_ALL_TESTS
 	help
 	  Enable to turn on cpumask tests, running at boot or module load time.
 
+	  For more information on KUnit and unit tests in general, please refer
+	  to the KUnit documentation in Documentation/dev-tools/kunit/.
+
 	  If unsure, say N.
 
 config TEST_LIST_SORT
diff --git a/lib/Makefile b/lib/Makefile
index c95212141928..22eafcd39b51 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -59,6 +59,7 @@ obj-$(CONFIG_TEST_BPF) += test_bpf.o
 obj-$(CONFIG_TEST_FIRMWARE) += test_firmware.o
 obj-$(CONFIG_TEST_BITOPS) += test_bitops.o
 CFLAGS_test_bitops.o += -Werror
+obj-$(CONFIG_CPUMASK_KUNIT_TEST) += cpumask_kunit.o
 obj-$(CONFIG_TEST_SYSCTL) += test_sysctl.o
 obj-$(CONFIG_TEST_SIPHASH) += test_siphash.o
 obj-$(CONFIG_HASH_KUNIT_TEST) += test_hash.o
@@ -99,7 +100,6 @@ obj-$(CONFIG_TEST_HMM) += test_hmm.o
 obj-$(CONFIG_TEST_FREE_PAGES) += test_free_pages.o
 obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o
 obj-$(CONFIG_TEST_REF_TRACKER) += test_ref_tracker.o
-obj-$(CONFIG_TEST_CPUMASK) += test_cpumask.o
 CFLAGS_test_fprobe.o += $(CC_FLAGS_FTRACE)
 obj-$(CONFIG_FPROBE_SANITY_TEST) += test_fprobe.o
 #
diff --git a/lib/test_cpumask.c b/lib/cpumask_kunit.c
similarity index 100%
rename from lib/test_cpumask.c
rename to lib/cpumask_kunit.c
-- 
2.37.1


  parent reply	other threads:[~2022-08-09 18:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 18:08 [PATCH v1 0/5] cpumask: KUnit test suite fixes and improvements Sander Vanheule
2022-08-09 18:08 ` [PATCH v1 1/5] lib/test_cpumask: drop cpu_possible_mask full test Sander Vanheule
2022-08-09 22:26   ` Maíra Canal
2022-08-10  8:18     ` Sander Vanheule
2022-08-10  4:06   ` David Gow
2022-08-10  8:45     ` Sander Vanheule
2022-08-10 10:51       ` David Gow
2022-08-09 18:08 ` [PATCH v1 2/5] lib/test_cpumask: fix cpu_possible_mask last test Sander Vanheule
2022-08-09 22:27   ` Maíra Canal
2022-08-10  4:06   ` David Gow
2022-08-09 18:08 ` Sander Vanheule [this message]
2022-08-09 22:29   ` [PATCH v1 3/5] lib/test_cpumask: follow KUnit style guidelines Maíra Canal
2022-08-10  4:06   ` David Gow
2022-08-09 18:08 ` [PATCH v1 4/5] lib/cpumask_kunit: log mask contents Sander Vanheule
2022-08-10  4:07   ` David Gow
2022-08-09 18:08 ` [PATCH v1 5/5] lib/cpumask_kunit: add tests file to MAINTAINERS Sander Vanheule
2022-08-10  4:06   ` 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=c3b4b27a1135558e1eb30261ce7e2df3cb43ec6e.1660068429.git.sander@svanheule.net \
    --to=sander@svanheule.net \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=davidgow@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=mairacanal@riseup.net \
    --cc=yury.norov@gmail.com \
    /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

all inboxes | Powered by JetHome®