Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143664665
D24468.id70693.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D24468.id70693.diff
View Options
Index: tests/sys/net/routing/Makefile
===================================================================
--- tests/sys/net/routing/Makefile
+++ tests/sys/net/routing/Makefile
@@ -14,4 +14,6 @@
# so running them in parallel will lead to weird results.
TEST_METADATA+= is_exclusive=true
+CFLAGS+= -I${.CURDIR:H:H:H}
+
.include <bsd.test.mk>
Index: tests/sys/net/routing/rtsock_common.h
===================================================================
--- tests/sys/net/routing/rtsock_common.h
+++ tests/sys/net/routing/rtsock_common.h
@@ -45,6 +45,7 @@
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/jail.h>
+#include <sys/linker.h>
#include <net/if.h>
#include <net/if_dl.h>
#include <net/route.h>
@@ -63,6 +64,7 @@
#include <sysexits.h>
#include <atf-c.h>
+#include "freebsd_test_suite/macros.h"
#include "rtsock_print.h"
#include "params.h"
@@ -126,33 +128,6 @@
return (found);
}
-/*
- * Tries to ensure if_tap is loaded.
- * Checks list of interface cloners first, then tries
- * to load the module.
- *
- * return nonzero on success.
- */
-static int
-_enforce_cloner_loaded(char *cloner_name)
-{
- if (_check_cloner(cloner_name))
- return (1);
- /* need to load */
- RLOG("trying to load %s driver", cloner_name);
-
- char cmd[64];
-
- snprintf(cmd, sizeof(cmd), "/sbin/kldload if_%s", cloner_name);
- int ret = system(cmd);
- if (ret != 0) {
- RLOG("'%s' failed, error %d", cmd, ret);
- return (0);
- }
-
- return (1);
-}
-
static char *
iface_create(char *ifname_orig)
{
@@ -165,9 +140,6 @@
*dst++ = *src;
*dst = '\0';
- if (_enforce_cloner_loaded(prefix) == 0)
- return (NULL);
-
memset(&ifr, 0, sizeof(struct ifreq));
s = socket(AF_LOCAL, SOCK_DGRAM, 0);
Index: tests/sys/net/routing/rtsock_config.h
===================================================================
--- tests/sys/net/routing/rtsock_config.h
+++ tests/sys/net/routing/rtsock_config.h
@@ -127,6 +127,9 @@
inet_ntop(AF_INET6, &c->addr6.sin6_addr, c->addr6_str, INET6_ADDRSTRLEN);
if (co->num_interfaces > 0) {
+ kldload("if_epair");
+ ATF_REQUIRE_KERNEL_MODULE("if_epair");
+
c->ifnames = calloc(co->num_interfaces, sizeof(char *));
for (int i = 0; i < co->num_interfaces; i++)
c->ifnames[i] = iface_create("epair");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 1, 5:19 AM (8 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28283168
Default Alt Text
D24468.id70693.diff (2 KB)
Attached To
Mode
D24468: Skip sys/net/routing/test_rtsock_* regression tests if module if_epair doesn't exist
Attached
Detach File
Event Timeline
Log In to Comment