aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Freeland <jfree@FreeBSD.org>2026-03-25 22:57:16 +0000
committerJake Freeland <jfree@FreeBSD.org>2026-03-26 00:22:55 +0000
commitcb692380f1e05ffc4184877844e93051f24ed302 (patch)
tree277a7493b10ea934c0b90f04332e4aa22ab8aae9
parent41b423cc4e4dfe3132bb5d287bba03b82ecb5be8 (diff)
timerfd: Expect periodic timer performance failures
The current timerfd implementation fails to correctly count events on a nanosecond callout interval. The timerfd__periodic_timer_performance test detects this and reports failure. Mark this test as an expected failure so it isn't flagged by CI. A link to the bug report is attached to the test for reference. While we're here, clean up some minor style and Make issues. Fixes: 834c1ba793d9 ("timerfd: Add tests") MFC after: 1 week
-rw-r--r--tests/sys/kern/Makefile1
-rw-r--r--tests/sys/kern/timerfd.c5
2 files changed, 2 insertions, 4 deletions
diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile
index 0e505d6cb51a..e65b4812f90b 100644
--- a/tests/sys/kern/Makefile
+++ b/tests/sys/kern/Makefile
@@ -54,7 +54,6 @@ PLAIN_TESTS_C+= subr_unit_test
ATF_TESTS_C+= sysctl_kern_proc
ATF_TESTS_C+= sys_getrandom
ATF_TESTS_C+= timerfd
-CFLAGS.timerfd+= -I${.CURDIR}
LIBADD.timerfd+= pthread
ATF_TESTS_C+= tty_pts
ATF_TESTS_C+= unix_dgram
diff --git a/tests/sys/kern/timerfd.c b/tests/sys/kern/timerfd.c
index b24d093b346e..cacc1d9aafa9 100644
--- a/tests/sys/kern/timerfd.c
+++ b/tests/sys/kern/timerfd.c
@@ -25,11 +25,11 @@
#include <atf-c.h>
#include <sys/types.h>
-
#include <sys/event.h>
#include <sys/param.h>
#include <sys/select.h>
#include <sys/time.h>
+#include <sys/timerfd.h>
#include <errno.h>
#include <signal.h>
@@ -44,8 +44,6 @@
#include <time.h>
#include <unistd.h>
-#include <sys/timerfd.h>
-
/* Time in ns that sleeps are allowed to take longer for in unit tests. */
#define TIMER_SLACK (90000000)
@@ -739,6 +737,7 @@ ATF_TC_BODY(timerfd__periodic_timer_performance, tc)
uint64_t timeouts;
ATF_REQUIRE(read(timerfd, &timeouts, sizeof(timeouts)) ==
(ssize_t)sizeof(timeouts));
+ atf_tc_expect_fail("https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294053");
ATF_REQUIRE_MSG(timeouts >= 400000000, "%ld", (long)timeouts);
ATF_REQUIRE(close(timerfd) == 0);