Module Name:    src
Committed By:   pooka
Date:           Wed Jun 23 11:19:17 UTC 2010

Modified Files:
        src/tests/fs: h_funcs.subr

Log Message:
If kernel modules are set to autoload, skip the vfslist part of
the check when determining if there is kernel support for a given
fs.  Makes tmpfs tests run and fixes PR misc/43304.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/fs/h_funcs.subr

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/fs/h_funcs.subr
diff -u src/tests/fs/h_funcs.subr:1.2 src/tests/fs/h_funcs.subr:1.3
--- src/tests/fs/h_funcs.subr:1.2	Wed Apr 30 13:11:00 2008
+++ src/tests/fs/h_funcs.subr	Wed Jun 23 11:19:17 2010
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: h_funcs.subr,v 1.2 2008/04/30 13:11:00 martin Exp $
+# $NetBSD: h_funcs.subr,v 1.3 2010/06/23 11:19:17 pooka Exp $
 #
 # Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -36,9 +36,18 @@
 #
 require_fs() {
 	local name
+	local autoload
 	name="${1}"
 
+	atf_require_prog mount
+	atf_require_prog mount_${name}
+	atf_require_prog umount
+
+	# if we have autoloadable modules, just assume the file system
 	atf_require_prog sysctl
+	autoload=$(sysctl -n kern.module.autoload)
+	[ "${autoload}" = "1" ] && return 0
+
 	set -- $(sysctl -n vfs.generic.fstypes)
 	found=no
 	while [ ${#} -gt 1 ];  do
@@ -51,8 +60,4 @@
 	[ ${found} = yes ] || \
 		atf_skip "The kernel does not include support the " \
 		         "\`${name}' file system"
-
-	atf_require_prog mount
-	atf_require_prog mount_${name}
-	atf_require_prog umount
 }

Reply via email to