aboutsummaryrefslogtreecommitdiff
path: root/tests/sys/pmc/Makefile
diff options
context:
space:
mode:
authorAlexander Leidinger <netchild@FreeBSD.org>2026-07-19 08:08:48 +0000
committerAlexander Leidinger <netchild@FreeBSD.org>2026-07-20 10:24:36 +0000
commit2cfd82f747c04f68f679824ba627460e87ab3848 (patch)
tree890194f3391818a41d36845c442ada4e51c3b720 /tests/sys/pmc/Makefile
parente42703f5c4b2d3a869b17e2cb8670f1b6359c8cf (diff)
hwpmc: add regression tests for counting-PMC counter wraparound
Exercise a process-mode counting PMC whose accumulated count crosses, or already exceeds, the range of the underlying hardware counter. Before the previous commit, the first context switch after the hardware counter wrapped panicked INVARIANTS kernels with "negative increment" and silently corrupted the accumulated count on other kernels. The tests need a hardware counting event backed by a counter narrower than 64 bits and skip where none is available (hwpmc(4) not loaded, or a VM without a vPMU). Reviewed by: adrian MFC after: 2 weeks Assisted-by: Claude Code (Fable 5) Differential Revision: https://reviews.freebsd.org/D58341
Diffstat (limited to 'tests/sys/pmc/Makefile')
-rw-r--r--tests/sys/pmc/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/sys/pmc/Makefile b/tests/sys/pmc/Makefile
new file mode 100644
index 000000000000..403acd0311ce
--- /dev/null
+++ b/tests/sys/pmc/Makefile
@@ -0,0 +1,7 @@
+TESTSDIR= ${TESTSBASE}/sys/pmc
+
+ATF_TESTS_C= pmc_wrap_test
+
+LIBADD+= pmc
+
+.include <bsd.test.mk>