Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/fs If kernel modules are set to autoload, skip the vfs...
details: https://anonhg.NetBSD.org/src/rev/6bc5c3c681d4
branches: trunk
changeset: 755817:6bc5c3c681d4
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Jun 23 11:19:17 2010 +0000
description:
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.
diffstat:
tests/fs/h_funcs.subr | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diffs (39 lines):
diff -r 49f6938b96b0 -r 6bc5c3c681d4 tests/fs/h_funcs.subr
--- a/tests/fs/h_funcs.subr Wed Jun 23 08:36:03 2010 +0000
+++ b/tests/fs/h_funcs.subr Wed Jun 23 11:19:17 2010 +0000
@@ -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
}
Home |
Main Index |
Thread Index |
Old Index