Fix tmpfs detection in the sys/fs/tmpfs tests
This code was originally written for NetBSD. r306031 tried to adapt it to FreeBSD, but didn't correctly handle the case that tmpfs was available, but not already loaded. Fix the logic to load the module if necessary. The tmpfs tests shouldn't be skipped anymore. Also, fix a comment that was dislocated by r306031. Reported by: Jenkins MFC after: 2 weeks
This commit is contained in:
parent
9d29e641f7
commit
f2573d2e4d
@ -43,17 +43,17 @@ require_fs() {
|
|||||||
atf_require_prog mount_${name}
|
atf_require_prog mount_${name}
|
||||||
atf_require_prog umount
|
atf_require_prog umount
|
||||||
|
|
||||||
# if we have autoloadable modules, just assume the file system
|
|
||||||
atf_require_prog sysctl
|
|
||||||
# Begin FreeBSD
|
# Begin FreeBSD
|
||||||
if true; then
|
if true; then
|
||||||
if kldstat -m ${name}; then
|
if kldload -n ${name}; then
|
||||||
found=yes
|
found=yes
|
||||||
else
|
else
|
||||||
found=no
|
found=no
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# End FreeBSD
|
# End FreeBSD
|
||||||
|
# if we have autoloadable modules, just assume the file system
|
||||||
|
atf_require_prog sysctl
|
||||||
autoload=$(sysctl -n kern.module.autoload)
|
autoload=$(sysctl -n kern.module.autoload)
|
||||||
[ "${autoload}" = "1" ] && return 0
|
[ "${autoload}" = "1" ] && return 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user