svn commit: r306031 - head/contrib/netbsd-tests/fs
Ngie Cooper
ngie at FreeBSD.org
Tue Sep 20 16:28:58 UTC 2016
Author: ngie
Date: Tue Sep 20 16:28:57 2016
New Revision: 306031
URL: https://svnweb.freebsd.org/changeset/base/306031
Log:
Port contrib/netbsd-tests/fs/h_funcs.subr to FreeBSD
Use kldstat -m to determine whether or not a filesystem is loaded. This works
well with tmpfs, ufs, and zfs
MFC after: 1 month
Sponsored by: Dell EMC Isilon
Modified:
head/contrib/netbsd-tests/fs/h_funcs.subr
Modified: head/contrib/netbsd-tests/fs/h_funcs.subr
==============================================================================
--- head/contrib/netbsd-tests/fs/h_funcs.subr Tue Sep 20 16:27:34 2016 (r306030)
+++ head/contrib/netbsd-tests/fs/h_funcs.subr Tue Sep 20 16:28:57 2016 (r306031)
@@ -45,6 +45,15 @@ require_fs() {
# if we have autoloadable modules, just assume the file system
atf_require_prog sysctl
+ # Begin FreeBSD
+ if true; then
+ if kldstat -m ${name}; then
+ found=yes
+ else
+ found=no
+ fi
+ else
+ # End FreeBSD
autoload=$(sysctl -n kern.module.autoload)
[ "${autoload}" = "1" ] && return 0
@@ -57,6 +66,9 @@ require_fs() {
fi
shift
done
+ # Begin FreeBSD
+ fi
+ # End FreeBSD
[ ${found} = yes ] || \
atf_skip "The kernel does not include support the " \
"\`${name}' file system"
More information about the svn-src-all
mailing list