git: 559b0f6b8286 - main - tests/sys/netmap: use require.kmods property instead of ad-hoc checks
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 05 Sep 2025 18:42:30 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=559b0f6b82867b60a2d5cb1b2744114603cb17a7
commit 559b0f6b82867b60a2d5cb1b2744114603cb17a7
Author: Siva Mahadevan <me@svmhdvn.name>
AuthorDate: 2025-07-21 13:25:26 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-09-05 18:42:22 +0000
tests/sys/netmap: use require.kmods property instead of ad-hoc checks
Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1780
---
tests/sys/netmap/Makefile | 1 +
tests/sys/netmap/ctrl-api-test.c | 7 -------
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/tests/sys/netmap/Makefile b/tests/sys/netmap/Makefile
index ee00d0421620..bd713ff795bc 100644
--- a/tests/sys/netmap/Makefile
+++ b/tests/sys/netmap/Makefile
@@ -3,6 +3,7 @@ PACKAGE= tests
TESTSDIR= ${TESTSBASE}/sys/netmap
TEST_METADATA+= required_user="root"
TEST_METADATA+= is_exclusive=true
+TEST_METADATA+= required_kmods="if_tap netmap"
PLAIN_TESTS_C+= ctrl-api-test
diff --git a/tests/sys/netmap/ctrl-api-test.c b/tests/sys/netmap/ctrl-api-test.c
index 6b45dbb1cfea..36c131980360 100644
--- a/tests/sys/netmap/ctrl-api-test.c
+++ b/tests/sys/netmap/ctrl-api-test.c
@@ -59,8 +59,6 @@
#include <stddef.h>
#ifdef __FreeBSD__
-#include "freebsd_test_suite/macros.h"
-
static int
eventfd(int x __unused, int y __unused)
{
@@ -2199,11 +2197,6 @@ main(int argc, char **argv)
int opt;
int i;
-#ifdef __FreeBSD__
- PLAIN_REQUIRE_KERNEL_MODULE("if_tap", 0);
- PLAIN_REQUIRE_KERNEL_MODULE("netmap", 0);
-#endif
-
memset(&ctx_, 0, sizeof(ctx_));
{