Date: Sat, 1 Feb 2020 11:31:45 +0000 (UTC) From: Kristof Provost <kp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357365 - head/tests/sys/net Message-ID: <202002011131.011BVj5V026631@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kp Date: Sat Feb 1 11:31:45 2020 New Revision: 357365 URL: https://svnweb.freebsd.org/changeset/base/357365 Log: tests: epair: Don't fail if the if_epair module is already loaded kldload() returns an error (EEXIST) if the module is already loaded. That's not a problem for us, so ignore that error. While here also clean up include statements. MFC after: 3 days X-MFC-With: r357234 Modified: head/tests/sys/net/if_epair.c Modified: head/tests/sys/net/if_epair.c ============================================================================== --- head/tests/sys/net/if_epair.c Sat Feb 1 10:25:13 2020 (r357364) +++ head/tests/sys/net/if_epair.c Sat Feb 1 11:31:45 2020 (r357365) @@ -25,17 +25,19 @@ * $FreeBSD$ */ +#include <sys/param.h> #include <sys/ioctl.h> #include <sys/linker.h> #include <sys/module.h> -#include <sys/param.h> #include <sys/socket.h> #include <sys/types.h> #include <net/if.h> +#include <errno.h> #include <fcntl.h> #include <stdio.h> +#include <strings.h> #include <atf-c.h> @@ -51,7 +53,7 @@ ATF_TC_BODY(params, tc) int s; s = kldload("if_epair"); - if (s != 0) + if (s != 0 && errno != EEXIST) atf_tc_fail("Failed to load if_epair"); s = socket(AF_INET, SOCK_DGRAM, 0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002011131.011BVj5V026631>