Date: Tue, 20 Sep 2016 16:28:57 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306031 - head/contrib/netbsd-tests/fs Message-ID: <201609201628.u8KGSvsp086675@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609201628.u8KGSvsp086675>