diff options
author | ngie <ngie@FreeBSD.org> | 2016-12-03 02:47:16 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2016-12-03 02:47:16 +0000 |
commit | 29db3b90328498474388e9cfb2c8ef6d816c05c2 (patch) | |
tree | 91ac81530a80d5ea64a24212d143cb2012f49a0a /contrib/netbsd-tests/rump/modautoload/t_modautoload.c | |
parent | 8408238ce58163c0d88dea333c155b6806aae830 (diff) | |
download | FreeBSD-src-29db3b90328498474388e9cfb2c8ef6d816c05c2.zip FreeBSD-src-29db3b90328498474388e9cfb2c8ef6d816c05c2.tar.gz |
MFC r305358:
Update contrib/netbsd-tests with new content from NetBSD
This updates the snapshot from 09/30/2014 to 08/11/2016
This brings in a number of new testcases from upstream, most
notably:
- bin/cat
- lib/libc
- lib/msun
- lib/libthr
- usr.bin/sort
lib/libc/tests/stdio/open_memstream_test.c was moved to
lib/libc/tests/stdio/open_memstream2_test.c to accomodate
the new open_memstream test from NetBSD.
Tested on: amd64 (VMware fusion VM; various bare metal platforms); i386 (VMware fusion VM); make tinderbox
Diffstat (limited to 'contrib/netbsd-tests/rump/modautoload/t_modautoload.c')
-rw-r--r-- | contrib/netbsd-tests/rump/modautoload/t_modautoload.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/contrib/netbsd-tests/rump/modautoload/t_modautoload.c b/contrib/netbsd-tests/rump/modautoload/t_modautoload.c index f28ad55..b73e52a 100644 --- a/contrib/netbsd-tests/rump/modautoload/t_modautoload.c +++ b/contrib/netbsd-tests/rump/modautoload/t_modautoload.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_modautoload.c,v 1.2 2014/03/10 22:38:53 pooka Exp $ */ +/* $NetBSD: t_modautoload.c,v 1.4 2015/12/27 08:21:44 pgoyette Exp $ */ #include <sys/types.h> #include <sys/mount.h> @@ -33,6 +33,9 @@ ATF_TC_HEAD(modautoload, tc) static void mountkernfs(void) { + bool old_autoload, new_autoload; + size_t old_len, new_len; + int error; if (!rump_nativeabi_p()) atf_tc_skip("host kernel modules not supported"); @@ -41,6 +44,15 @@ mountkernfs(void) if (rump_sys_mkdir("/kern", 0777) == -1) atf_tc_fail_errno("mkdir /kern"); + + new_autoload = true; + new_len = sizeof(new_autoload); + error = sysctlbyname("kern.module.autoload", + &old_autoload, &old_len, + &new_autoload, new_len); + if (error != 0) + atf_tc_fail_errno("could not enable module autoload"); + if (rump_sys_mount(MOUNT_KERNFS, "/kern", 0, NULL, 0) == -1) atf_tc_fail_errno("could not mount kernfs"); } |