From nobody Wed Nov 27 12:58:13 2024 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 764ED20ADD5 for ; Fri, 11 Oct 2024 07:31:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728631875; cv=none; b=twX54LND8nCgi2ecV90KY8wB/mQOROMWwg47w2qgILZq3wNNoNznYkIVV0rVBqLkfRjZbG42kYu8SeUGl4nM4D6vySE5gOJlath2oKcriC9huTxbn9WUPpuk3PfRagrddbSs/npFHGLRPl8vYCWA+h6L664cldQT7D7CDyfUWcw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728631875; c=relaxed/simple; bh=YW58ht6CyiuZkFliYx0qFm95AAGfQIn/SYFw2I/6ruc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=JPJ7Cm84qaDCemEjQlLjf8pl9UxEhtTOASS/zT7TVN1lrljX9VUQHRssIsdFkQYFm3Q9omXDm6XapO/aFcWWj1dN8HIl/mhh/G4EwGK3bsy3AHzqAYGM227Y6BjofrGZ2zVn/xqfxc2s6GjlMrcyrOP2Ts4H78F9lQlovCQPodA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--davidgow.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=4c/2QQMX; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--davidgow.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="4c/2QQMX" Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6e2acec0109so30564477b3.3 for ; Fri, 11 Oct 2024 00:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1728631869; x=1729236669; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=oEo/RIpbwWM3TDrwxpV43z65/ZOiBhGZMKP7K+QyLzo=; b=4c/2QQMXtLvBuk0UBIAnCy5Gz7bd5BjB7MelCG8k7P04+4VZFqV0DgeGTchsfjLYEg c2hmI6yA8QaoEEKGApBN5UbTTYAzwFZTT0YN9tzzzm558ppyT3jCUbLK9PSRwOZKcHJ5 /TRLfzEFqgLQGDI/DN6fdVDSSfn867IcPMEokwAP6Ykem7jb1yW6ucN7t4z47P6QB8nL Y86phDXLB4skaHK0gBKMokzPBGlICnECHc/7elADmyZJBiDr5WqiuCC/jLFh/zYDno8z 7ViRI2I8qPKHR8SCjrLFuOfckJeTyurVzVx1cHpzgJZ0E08xNejeO+slj4cF399INebY 91Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728631869; x=1729236669; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oEo/RIpbwWM3TDrwxpV43z65/ZOiBhGZMKP7K+QyLzo=; b=TEVPLeRWpKhkwIJDRad8Jzbu3+HShkE1Rye86jtIWdJ0zOZ+Yror9j+YTB8LBjui8o AV4DQGrHwoQmv20EgbrKdW6byrsCKfoemqwY/zc4S6gx0NXfrigDkff/kZbeCr4Vnmtt 2VxpQTvtO53M8vyd/sOMWOR89i+NiVi2CLaDfoSjGoqeoVvAEk6SyyJqFWQQ4Ufuf0y4 e5icAIuAcLv+lDRkbIw9QVKER/4xOF9uJoqokgk955AVjwr1VlQuX3dO3A+m0JC63dzW VoE+APiT15KfW8njF0ySa/xOWmUYd9LadSVWOad/3zhi+IfAyf0coXxikehRAlUzjrJ4 g5nQ== X-Forwarded-Encrypted: i=1; AJvYcCWoYL2XcveGouG302POENKwbDpndqPVyWBfvvdbvx7sRXnqSrsTLrw1MWcgsx0NbhoQak6C/BDGlz6+Ie4=@vger.kernel.org X-Gm-Message-State: AOJu0Ywoi/7jusW/54CU1hzKBJesPXEUJsxOWDwLq2Gz90FniSy0C3Nq O29d1XEDkMsTximyKkHequB4o8dHV7oVoLPfH+rmeZk3u9/woyluyRo1l99kFAU/s/yzgFXrQrl Qx5bDwKhwqw== X-Google-Smtp-Source: AGHT+IGdqFCzf4VfBt+kJ7UuT23EboG4g5C752yNmlJ+lOYyUe/sQDWFfgg9Cath79/UvjftuMEFz9qfNUfSHQ== X-Received: from slicestar.c.googlers.com ([fda3:e722:ac3:cc00:b1:7045:ac11:6237]) (user=davidgow job=sendgmr) by 2002:a05:690c:dc2:b0:6e3:39e5:f0e8 with SMTP id 00721157ae682-6e347c4e59fmr218467b3.6.1728631869517; Fri, 11 Oct 2024 00:31:09 -0700 (PDT) Date: Fri, 11 Oct 2024 15:25:07 +0800 In-Reply-To: <20241011072509.3068328-2-davidgow@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20241011072509.3068328-2-davidgow@google.com> X-Mailer: git-send-email 2.47.0.rc1.288.g06298d1525-goog Message-ID: <20241011072509.3068328-5-davidgow@google.com> Subject: [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory From: David Gow To: Andrew Morton , Shuah Khan , Brendan Higgins , Rae Moar , Kees Cook Cc: linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, Stephen Rothwell , Yury Norov , Rasmus Villemoes , "Jason A . Donenfeld" , Andy Shevchenko , "Naveen N . Rao" , Anil S Keshavamurthy , "David S . Miller" , Masami Hiramatsu , Mark Brown , linux-hardening@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Palmer Dabbelt , Christophe Leroy , Charlie Jenkins , Simon Horman , Jakub Kicinski , Arnd Bergmann , Daniel Latypov , Guenter Roeck , David Howells , "=?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?=" , Marco Elver , Mark Rutland , "Gustavo A. R. Silva" , Vlastimil Babka , Geert Uytterhoeven , Nathan Chancellor , Fangrui Song , "Steven Rostedt (Google)" , David Gow Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Kees Cook Following from the recent KUnit file naming discussion[1], move all KUnit tests in lib/ into lib/tests/. Link: https://lore.kernel.org/lkml/20240720165441.it.320-kees@kernel.org/ [= 1] Signed-off-by: Kees Cook Acked-by: "Steven Rostedt (Google)" Acked-by: Jakub Kicinski Acked-by: "Masami Hiramatsu (Google)" Reviewed-by: David Gow [Rebased onto mm-nonmm-unstable, moved usercopy_kunit] Signed-off-by: David Gow Acked-by: Vlastimil Babka #slab --- MAINTAINERS | 19 +++++++------ lib/Makefile | 36 +----------------------- lib/tests/Makefile | 38 ++++++++++++++++++++++++++ lib/{ =3D> tests}/bitfield_kunit.c | 0 lib/{ =3D> tests}/checksum_kunit.c | 0 lib/{ =3D> tests}/cmdline_kunit.c | 0 lib/{ =3D> tests}/cpumask_kunit.c | 0 lib/{ =3D> tests}/fortify_kunit.c | 0 lib/{ =3D> tests}/hashtable_test.c | 0 lib/{ =3D> tests}/is_signed_type_kunit.c | 0 lib/{ =3D> tests}/kunit_iov_iter.c | 0 lib/{ =3D> tests}/list-test.c | 0 lib/{ =3D> tests}/memcpy_kunit.c | 0 lib/{ =3D> tests}/overflow_kunit.c | 0 lib/{ =3D> tests}/siphash_kunit.c | 0 lib/{ =3D> tests}/slub_kunit.c | 0 lib/{ =3D> tests}/stackinit_kunit.c | 0 lib/{ =3D> tests}/string_helpers_kunit.c | 0 lib/{ =3D> tests}/string_kunit.c | 0 lib/{ =3D> tests}/test_bits.c | 0 lib/{ =3D> tests}/test_fprobe.c | 0 lib/{ =3D> tests}/test_hash.c | 0 lib/{ =3D> tests}/test_kprobes.c | 0 lib/{ =3D> tests}/test_linear_ranges.c | 0 lib/{ =3D> tests}/test_list_sort.c | 0 lib/{ =3D> tests}/test_sort.c | 0 lib/{ =3D> tests}/usercopy_kunit.c | 0 27 files changed, 49 insertions(+), 44 deletions(-) create mode 100644 lib/tests/Makefile rename lib/{ =3D> tests}/bitfield_kunit.c (100%) rename lib/{ =3D> tests}/checksum_kunit.c (100%) rename lib/{ =3D> tests}/cmdline_kunit.c (100%) rename lib/{ =3D> tests}/cpumask_kunit.c (100%) rename lib/{ =3D> tests}/fortify_kunit.c (100%) rename lib/{ =3D> tests}/hashtable_test.c (100%) rename lib/{ =3D> tests}/is_signed_type_kunit.c (100%) rename lib/{ =3D> tests}/kunit_iov_iter.c (100%) rename lib/{ =3D> tests}/list-test.c (100%) rename lib/{ =3D> tests}/memcpy_kunit.c (100%) rename lib/{ =3D> tests}/overflow_kunit.c (100%) rename lib/{ =3D> tests}/siphash_kunit.c (100%) rename lib/{ =3D> tests}/slub_kunit.c (100%) rename lib/{ =3D> tests}/stackinit_kunit.c (100%) rename lib/{ =3D> tests}/string_helpers_kunit.c (100%) rename lib/{ =3D> tests}/string_kunit.c (100%) rename lib/{ =3D> tests}/test_bits.c (100%) rename lib/{ =3D> tests}/test_fprobe.c (100%) rename lib/{ =3D> tests}/test_hash.c (100%) rename lib/{ =3D> tests}/test_kprobes.c (100%) rename lib/{ =3D> tests}/test_linear_ranges.c (100%) rename lib/{ =3D> tests}/test_list_sort.c (100%) rename lib/{ =3D> tests}/test_sort.c (100%) rename lib/{ =3D> tests}/usercopy_kunit.c (100%) diff --git a/MAINTAINERS b/MAINTAINERS index f1e1cd652699..bbba5c760533 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3929,10 +3929,10 @@ F: include/vdso/bits.h F: lib/bitmap-str.c F: lib/bitmap.c F: lib/cpumask.c -F: lib/cpumask_kunit.c F: lib/find_bit.c F: lib/find_bit_benchmark.c F: lib/test_bitmap.c +F: lib/tests/cpumask_kunit.c F: tools/include/linux/bitfield.h F: tools/include/linux/bitmap.h F: tools/include/linux/bits.h @@ -8911,9 +8911,10 @@ L: linux-hardening@vger.kernel.org S: Supported T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-ne= xt/hardening F: include/linux/fortify-string.h -F: lib/fortify_kunit.c -F: lib/memcpy_kunit.c F: lib/test_fortify/* +F: lib/tests/fortify_kunit.c +F: lib/tests/memcpy_kunit.c +F: scripts/test_fortify.sh K: \bunsafe_memcpy\b K: \b__NO_FORTIFY\b =20 @@ -9578,9 +9579,9 @@ F: include/linux/string.h F: include/linux/string_choices.h F: include/linux/string_helpers.h F: lib/string.c -F: lib/string_kunit.c F: lib/string_helpers.c -F: lib/string_helpers_kunit.c +F: lib/tests/string_helpers_kunit.c +F: lib/tests/string_kunit.c F: scripts/coccinelle/api/string_choices.cocci =20 GENERIC UIO DRIVER FOR PCI DEVICES @@ -12741,7 +12742,7 @@ F: Documentation/trace/kprobes.rst F: include/asm-generic/kprobes.h F: include/linux/kprobes.h F: kernel/kprobes.c -F: lib/test_kprobes.c +F: lib/tests/test_kprobes.c F: samples/kprobes =20 KS0108 LCD CONTROLLER DRIVER @@ -13091,7 +13092,7 @@ M: Mark Brown R: Matti Vaittinen F: include/linux/linear_range.h F: lib/linear_ranges.c -F: lib/test_linear_ranges.c +F: lib/tests/test_linear_ranges.c =20 LINUX FOR POWER MACINTOSH L: linuxppc-dev@lists.ozlabs.org @@ -13219,7 +13220,7 @@ M: David Gow L: linux-kselftest@vger.kernel.org L: kunit-dev@googlegroups.com S: Maintained -F: lib/list-test.c +F: lib/tests/list-test.c =20 LITEX PLATFORM M: Karol Gugala @@ -21199,7 +21200,7 @@ M: Jason A. Donenfeld S: Maintained F: include/linux/siphash.h F: lib/siphash.c -F: lib/siphash_kunit.c +F: lib/tests/siphash_kunit.c =20 SIS 190 ETHERNET DRIVER M: Francois Romieu diff --git a/lib/Makefile b/lib/Makefile index 53f82de7cbe2..7f2ddbf03fe9 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -51,9 +51,7 @@ obj-y +=3D bcd.o sort.o parser.o debug_locks.o random32.o= \ percpu-refcount.o rhashtable.o base64.o \ once.o refcount.o rcuref.o usercopy.o errseq.o bucket_locks.o \ generic-radix-tree.o bitmap-str.o -obj-$(CONFIG_STRING_KUNIT_TEST) +=3D string_kunit.o obj-y +=3D string_helpers.o -obj-$(CONFIG_STRING_HELPERS_KUNIT_TEST) +=3D string_helpers_kunit.o obj-y +=3D hexdump.o obj-$(CONFIG_TEST_HEXDUMP) +=3D test_hexdump.o obj-y +=3D kstrtox.o @@ -64,22 +62,17 @@ obj-$(CONFIG_TEST_DHRY) +=3D test_dhry.o obj-$(CONFIG_TEST_FIRMWARE) +=3D test_firmware.o obj-$(CONFIG_TEST_BITOPS) +=3D test_bitops.o CFLAGS_test_bitops.o +=3D -Werror -obj-$(CONFIG_CPUMASK_KUNIT_TEST) +=3D cpumask_kunit.o obj-$(CONFIG_TEST_SYSCTL) +=3D test_sysctl.o -obj-$(CONFIG_TEST_IOV_ITER) +=3D kunit_iov_iter.o -obj-$(CONFIG_HASH_KUNIT_TEST) +=3D test_hash.o obj-$(CONFIG_TEST_IDA) +=3D test_ida.o obj-$(CONFIG_TEST_UBSAN) +=3D test_ubsan.o CFLAGS_test_ubsan.o +=3D $(call cc-disable-warning, vla) CFLAGS_test_ubsan.o +=3D $(call cc-disable-warning, unused-but-set-variabl= e) UBSAN_SANITIZE_test_ubsan.o :=3D y obj-$(CONFIG_TEST_KSTRTOX) +=3D test-kstrtox.o -obj-$(CONFIG_TEST_LIST_SORT) +=3D test_list_sort.o obj-$(CONFIG_TEST_MIN_HEAP) +=3D test_min_heap.o obj-$(CONFIG_TEST_LKM) +=3D test_module.o obj-$(CONFIG_TEST_VMALLOC) +=3D test_vmalloc.o obj-$(CONFIG_TEST_RHASHTABLE) +=3D test_rhashtable.o -obj-$(CONFIG_TEST_SORT) +=3D test_sort.o obj-$(CONFIG_TEST_STATIC_KEYS) +=3D test_static_keys.o obj-$(CONFIG_TEST_STATIC_KEYS) +=3D test_static_key_base.o obj-$(CONFIG_TEST_DYNAMIC_DEBUG) +=3D test_dynamic_debug.o @@ -105,10 +98,7 @@ obj-$(CONFIG_TEST_MEMINIT) +=3D test_meminit.o obj-$(CONFIG_TEST_LOCKUP) +=3D test_lockup.o obj-$(CONFIG_TEST_HMM) +=3D test_hmm.o obj-$(CONFIG_TEST_FREE_PAGES) +=3D test_free_pages.o -obj-$(CONFIG_KPROBES_SANITY_TEST) +=3D test_kprobes.o obj-$(CONFIG_TEST_REF_TRACKER) +=3D test_ref_tracker.o -CFLAGS_test_fprobe.o +=3D $(CC_FLAGS_FTRACE) -obj-$(CONFIG_FPROBE_SANITY_TEST) +=3D test_fprobe.o obj-$(CONFIG_TEST_OBJPOOL) +=3D test_objpool.o =20 obj-$(CONFIG_TEST_FPU) +=3D test_fpu.o @@ -130,7 +120,7 @@ endif obj-$(CONFIG_DEBUG_INFO_REDUCED) +=3D debug_info.o CFLAGS_debug_info.o +=3D $(call cc-option, -femit-struct-debug-detailed=3D= any) =20 -obj-y +=3D math/ crypto/ +obj-y +=3D math/ crypto/ tests/ =20 obj-$(CONFIG_GENERIC_IOMAP) +=3D iomap.o obj-$(CONFIG_HAS_IOMEM) +=3D iomap_copy.o devres.o @@ -367,30 +357,6 @@ obj-$(CONFIG_OBJAGG) +=3D objagg.o # pldmfw library obj-$(CONFIG_PLDMFW) +=3D pldmfw/ =20 -# KUnit tests -CFLAGS_bitfield_kunit.o :=3D $(DISABLE_STRUCTLEAK_PLUGIN) -obj-$(CONFIG_BITFIELD_KUNIT) +=3D bitfield_kunit.o -obj-$(CONFIG_CHECKSUM_KUNIT) +=3D checksum_kunit.o -obj-$(CONFIG_LIST_KUNIT_TEST) +=3D list-test.o -obj-$(CONFIG_HASHTABLE_KUNIT_TEST) +=3D hashtable_test.o -obj-$(CONFIG_LINEAR_RANGES_TEST) +=3D test_linear_ranges.o -obj-$(CONFIG_BITS_TEST) +=3D test_bits.o -obj-$(CONFIG_CMDLINE_KUNIT_TEST) +=3D cmdline_kunit.o -obj-$(CONFIG_SLUB_KUNIT_TEST) +=3D slub_kunit.o -obj-$(CONFIG_MEMCPY_KUNIT_TEST) +=3D memcpy_kunit.o -obj-$(CONFIG_IS_SIGNED_TYPE_KUNIT_TEST) +=3D is_signed_type_kunit.o -CFLAGS_overflow_kunit.o =3D $(call cc-disable-warning, tautological-consta= nt-out-of-range-compare) -obj-$(CONFIG_OVERFLOW_KUNIT_TEST) +=3D overflow_kunit.o -CFLAGS_stackinit_kunit.o +=3D $(call cc-disable-warning, switch-unreachabl= e) -obj-$(CONFIG_STACKINIT_KUNIT_TEST) +=3D stackinit_kunit.o -CFLAGS_fortify_kunit.o +=3D $(call cc-disable-warning, unsequenced) -CFLAGS_fortify_kunit.o +=3D $(call cc-disable-warning, stringop-overread) -CFLAGS_fortify_kunit.o +=3D $(call cc-disable-warning, stringop-truncation) -CFLAGS_fortify_kunit.o +=3D $(DISABLE_STRUCTLEAK_PLUGIN) -obj-$(CONFIG_FORTIFY_KUNIT_TEST) +=3D fortify_kunit.o -obj-$(CONFIG_SIPHASH_KUNIT_TEST) +=3D siphash_kunit.o -obj-$(CONFIG_USERCOPY_KUNIT_TEST) +=3D usercopy_kunit.o - obj-$(CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED) +=3D devmem_is_allowed.o =20 obj-$(CONFIG_FIRMWARE_TABLE) +=3D fw_table.o diff --git a/lib/tests/Makefile b/lib/tests/Makefile new file mode 100644 index 000000000000..41689f0b7c97 --- /dev/null +++ b/lib/tests/Makefile @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for tests of kernel library functions. + +# KUnit tests +CFLAGS_bitfield_kunit.o :=3D $(DISABLE_STRUCTLEAK_PLUGIN) +obj-$(CONFIG_BITFIELD_KUNIT) +=3D bitfield_kunit.o +obj-$(CONFIG_BITS_TEST) +=3D test_bits.o +obj-$(CONFIG_CHECKSUM_KUNIT) +=3D checksum_kunit.o +obj-$(CONFIG_CMDLINE_KUNIT_TEST) +=3D cmdline_kunit.o +obj-$(CONFIG_CPUMASK_KUNIT_TEST) +=3D cpumask_kunit.o +CFLAGS_fortify_kunit.o +=3D $(call cc-disable-warning, unsequenced) +CFLAGS_fortify_kunit.o +=3D $(call cc-disable-warning, stringop-overread) +CFLAGS_fortify_kunit.o +=3D $(call cc-disable-warning, stringop-truncation) +CFLAGS_fortify_kunit.o +=3D $(DISABLE_STRUCTLEAK_PLUGIN) +obj-$(CONFIG_FORTIFY_KUNIT_TEST) +=3D fortify_kunit.o +CFLAGS_test_fprobe.o +=3D $(CC_FLAGS_FTRACE) +obj-$(CONFIG_FPROBE_SANITY_TEST) +=3D test_fprobe.o +obj-$(CONFIG_HASHTABLE_KUNIT_TEST) +=3D hashtable_test.o +obj-$(CONFIG_HASH_KUNIT_TEST) +=3D test_hash.o +obj-$(CONFIG_TEST_IOV_ITER) +=3D kunit_iov_iter.o +obj-$(CONFIG_IS_SIGNED_TYPE_KUNIT_TEST) +=3D is_signed_type_kunit.o +obj-$(CONFIG_KPROBES_SANITY_TEST) +=3D test_kprobes.o +obj-$(CONFIG_LIST_KUNIT_TEST) +=3D list-test.o +obj-$(CONFIG_TEST_LIST_SORT) +=3D test_list_sort.o +obj-$(CONFIG_LINEAR_RANGES_TEST) +=3D test_linear_ranges.o +obj-$(CONFIG_MEMCPY_KUNIT_TEST) +=3D memcpy_kunit.o +CFLAGS_overflow_kunit.o =3D $(call cc-disable-warning, tautological-consta= nt-out-of-range-compare) +obj-$(CONFIG_OVERFLOW_KUNIT_TEST) +=3D overflow_kunit.o +obj-$(CONFIG_SIPHASH_KUNIT_TEST) +=3D siphash_kunit.o +obj-$(CONFIG_SLUB_KUNIT_TEST) +=3D slub_kunit.o +obj-$(CONFIG_TEST_SORT) +=3D test_sort.o +CFLAGS_stackinit_kunit.o +=3D $(call cc-disable-warning, switch-unreachabl= e) +obj-$(CONFIG_STACKINIT_KUNIT_TEST) +=3D stackinit_kunit.o +obj-$(CONFIG_STRING_KUNIT_TEST) +=3D string_kunit.o +obj-$(CONFIG_STRING_HELPERS_KUNIT_TEST) +=3D string_helpers_kunit.o +obj-$(CONFIG_USERCOPY_KUNIT_TEST) +=3D usercopy_kunit.o + diff --git a/lib/bitfield_kunit.c b/lib/tests/bitfield_kunit.c similarity index 100% rename from lib/bitfield_kunit.c rename to lib/tests/bitfield_kunit.c diff --git a/lib/checksum_kunit.c b/lib/tests/checksum_kunit.c similarity index 100% rename from lib/checksum_kunit.c rename to lib/tests/checksum_kunit.c diff --git a/lib/cmdline_kunit.c b/lib/tests/cmdline_kunit.c similarity index 100% rename from lib/cmdline_kunit.c rename to lib/tests/cmdline_kunit.c diff --git a/lib/cpumask_kunit.c b/lib/tests/cpumask_kunit.c similarity index 100% rename from lib/cpumask_kunit.c rename to lib/tests/cpumask_kunit.c diff --git a/lib/fortify_kunit.c b/lib/tests/fortify_kunit.c similarity index 100% rename from lib/fortify_kunit.c rename to lib/tests/fortify_kunit.c diff --git a/lib/hashtable_test.c b/lib/tests/hashtable_test.c similarity index 100% rename from lib/hashtable_test.c rename to lib/tests/hashtable_test.c diff --git a/lib/is_signed_type_kunit.c b/lib/tests/is_signed_type_kunit.c similarity index 100% rename from lib/is_signed_type_kunit.c rename to lib/tests/is_signed_type_kunit.c diff --git a/lib/kunit_iov_iter.c b/lib/tests/kunit_iov_iter.c similarity index 100% rename from lib/kunit_iov_iter.c rename to lib/tests/kunit_iov_iter.c diff --git a/lib/list-test.c b/lib/tests/list-test.c similarity index 100% rename from lib/list-test.c rename to lib/tests/list-test.c diff --git a/lib/memcpy_kunit.c b/lib/tests/memcpy_kunit.c similarity index 100% rename from lib/memcpy_kunit.c rename to lib/tests/memcpy_kunit.c diff --git a/lib/overflow_kunit.c b/lib/tests/overflow_kunit.c similarity index 100% rename from lib/overflow_kunit.c rename to lib/tests/overflow_kunit.c diff --git a/lib/siphash_kunit.c b/lib/tests/siphash_kunit.c similarity index 100% rename from lib/siphash_kunit.c rename to lib/tests/siphash_kunit.c diff --git a/lib/slub_kunit.c b/lib/tests/slub_kunit.c similarity index 100% rename from lib/slub_kunit.c rename to lib/tests/slub_kunit.c diff --git a/lib/stackinit_kunit.c b/lib/tests/stackinit_kunit.c similarity index 100% rename from lib/stackinit_kunit.c rename to lib/tests/stackinit_kunit.c diff --git a/lib/string_helpers_kunit.c b/lib/tests/string_helpers_kunit.c similarity index 100% rename from lib/string_helpers_kunit.c rename to lib/tests/string_helpers_kunit.c diff --git a/lib/string_kunit.c b/lib/tests/string_kunit.c similarity index 100% rename from lib/string_kunit.c rename to lib/tests/string_kunit.c diff --git a/lib/test_bits.c b/lib/tests/test_bits.c similarity index 100% rename from lib/test_bits.c rename to lib/tests/test_bits.c diff --git a/lib/test_fprobe.c b/lib/tests/test_fprobe.c similarity index 100% rename from lib/test_fprobe.c rename to lib/tests/test_fprobe.c diff --git a/lib/test_hash.c b/lib/tests/test_hash.c similarity index 100% rename from lib/test_hash.c rename to lib/tests/test_hash.c diff --git a/lib/test_kprobes.c b/lib/tests/test_kprobes.c similarity index 100% rename from lib/test_kprobes.c rename to lib/tests/test_kprobes.c diff --git a/lib/test_linear_ranges.c b/lib/tests/test_linear_ranges.c similarity index 100% rename from lib/test_linear_ranges.c rename to lib/tests/test_linear_ranges.c diff --git a/lib/test_list_sort.c b/lib/tests/test_list_sort.c similarity index 100% rename from lib/test_list_sort.c rename to lib/tests/test_list_sort.c diff --git a/lib/test_sort.c b/lib/tests/test_sort.c similarity index 100% rename from lib/test_sort.c rename to lib/tests/test_sort.c diff --git a/lib/usercopy_kunit.c b/lib/tests/usercopy_kunit.c similarity index 100% rename from lib/usercopy_kunit.c rename to lib/tests/usercopy_kunit.c --=20 2.47.0.rc1.288.g06298d1525-goog