Date: Wed, 15 Oct 2025 17:39:34 GMT From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: f8b76ec4cac7 - main - tests/hpts: provide stub KTEST module compiled without TCP_HPTS_KTEST Message-ID: <202510151739.59FHdYvA023818@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f8b76ec4cac745fcb1659e1ae34033a777d35a40 commit f8b76ec4cac745fcb1659e1ae34033a777d35a40 Author: Nick Banks <nickbanks@netflix.com> AuthorDate: 2025-10-15 17:37:07 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2025-10-15 17:37:07 +0000 tests/hpts: provide stub KTEST module compiled without TCP_HPTS_KTEST This will close a panic on test run when kernel is compiled without HPTS KTEST support. --- sys/netinet/tcp_hpts_test.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sys/netinet/tcp_hpts_test.c b/sys/netinet/tcp_hpts_test.c index bab5827e0572..c5dc9cb5b03b 100644 --- a/sys/netinet/tcp_hpts_test.c +++ b/sys/netinet/tcp_hpts_test.c @@ -27,6 +27,7 @@ #include <tests/ktest.h> #include <sys/cdefs.h> +#include "opt_inet.h" #include <sys/param.h> #include <sys/bus.h> #include <sys/interrupt.h> @@ -119,6 +120,8 @@ SYSCTL_INT(_net_inet_tcp_hpts_test, OID_AUTO, exit_on_failure, CTLFLAG_RW, } \ } while (0) +#ifdef TCP_HPTS_KTEST + static void dump_hpts_entry(struct ktest_test_context *ctx, struct tcp_hpts_entry *hpts) { @@ -1658,5 +1661,22 @@ static const struct ktest_test_info tests[] = { KTEST_INFO(generation_count_validation), }; +#else /* TCP_HPTS_KTEST */ + +/* + * Stub to indicate that the TCP HPTS ktest is not enabled. + */ +KTEST_FUNC(module_load_without_tests) +{ + KTEST_LOG(ctx, "Warning: TCP HPTS ktest is not enabled"); + return (0); +} + +static const struct ktest_test_info tests[] = { + KTEST_INFO(module_load_without_tests), +}; + +#endif + KTEST_MODULE_DECLARE(ktest_tcphpts, tests); KTEST_MODULE_DEPEND(ktest_tcphpts, tcphpts);help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202510151739.59FHdYvA023818>
