git: 1a80570a3940 - main - tests/sys: Move libkern's tests in a separate directory
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 26 Nov 2026 10:50:39 UTC
The branch main has been updated by olce:
URL: https://cgit.FreeBSD.org/src/commit/?id=1a80570a3940679ee907bd01c5388ab0385c06a7
commit 1a80570a3940679ee907bd01c5388ab0385c06a7
Author: Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2026-11-20 13:56:37 +0000
Commit: Olivier Certner <olce@FreeBSD.org>
CommitDate: 2026-11-26 10:50:23 +0000
tests/sys: Move libkern's tests in a separate directory
Use 'sys/libkern', to mimick the source hierarchy.
Reviewed by: emaste
MFC with: a6e81841486a ("libkern: Bitfield extraction: Stick to standard, separate sign extension")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61961
---
tests/sys/Makefile | 1 +
tests/sys/kern/Makefile | 13 ------------
tests/sys/libkern/Makefile | 23 ++++++++++++++++++++++
.../sys/{kern/libkern_crc32.c => libkern/crc32.c} | 0
4 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/tests/sys/Makefile b/tests/sys/Makefile
index 9205e5749f68..a9ce0e8ee4ab 100644
--- a/tests/sys/Makefile
+++ b/tests/sys/Makefile
@@ -20,6 +20,7 @@ TESTS_SUBDIRS+= fs
TESTS_SUBDIRS+= geom
TESTS_SUBDIRS+= kern
TESTS_SUBDIRS+= kqueue
+TESTS_SUBDIRS+= libkern
TESTS_SUBDIRS+= mac
TESTS_SUBDIRS+= mqueue
TESTS_SUBDIRS+= net
diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile
index 95f07157f108..6c4f150dcce6 100644
--- a/tests/sys/kern/Makefile
+++ b/tests/sys/kern/Makefile
@@ -142,19 +142,6 @@ LIBADD.mqueue_test+= rt
LIBADD.tty_pts+= util
TEST_METADATA.mqueue_test+= required_kmods="mqueuefs"
-ATF_TESTS_C+= libkern_crc32
-SRCS.libkern_crc32+= libkern_crc32.c
-.PATH: ${SRCTOP}/sys/libkern
-SRCS.libkern_crc32+= gsb_crc32.c
-CFLAGS.libkern_crc32+= -DTESTING
-.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
-.PATH: ${SRCTOP}/sys/libkern/x86
-SRCS.libkern_crc32+= crc32_sse42.c
-.elif ${MACHINE_CPUARCH} == "aarch64"
-.PATH: ${SRCTOP}/sys/libkern/arm64
-SRCS.libkern_crc32+= crc32c_armv8.S
-.endif
-
CFLAGS.subr_physmem.c+= -D_WANT_FREEBSD_BITSET
SRCS.subr_physmem_test+= subr_physmem_test.c subr_physmem.c
diff --git a/tests/sys/libkern/Makefile b/tests/sys/libkern/Makefile
new file mode 100644
index 000000000000..1f3ced78280b
--- /dev/null
+++ b/tests/sys/libkern/Makefile
@@ -0,0 +1,23 @@
+.include <src.opts.mk>
+
+PACKAGE= tests
+
+.PATH: ${SRCTOP}/sys/libkern
+
+TESTSDIR= ${TESTSBASE}/sys/libkern
+
+ATF_TESTS_C+= crc32
+SRCS.crc32+= crc32.c
+SRCS.crc32+= gsb_crc32.c
+CFLAGS.crc32+= -DTESTING
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
+.PATH: ${SRCTOP}/sys/libkern/x86
+SRCS.crc32+= crc32_sse42.c
+.elif ${MACHINE_CPUARCH} == "aarch64"
+.PATH: ${SRCTOP}/sys/libkern/arm64
+SRCS.crc32+= crc32c_armv8.S
+.endif
+
+WARNS?= 3
+
+.include <bsd.test.mk>
diff --git a/tests/sys/kern/libkern_crc32.c b/tests/sys/libkern/crc32.c
similarity index 100%
rename from tests/sys/kern/libkern_crc32.c
rename to tests/sys/libkern/crc32.c