Author: asomers
Date: Sat Jul 21 23:54:40 2018
New Revision: 336594
URL: https://svnweb.freebsd.org/changeset/base/336594

Log:
  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

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   Sat Jul 21 22:54:43 2018        
(r336593)
+++ head/contrib/netbsd-tests/fs/h_funcs.subr   Sat Jul 21 23:54:40 2018        
(r336594)
@@ -43,17 +43,17 @@ require_fs() {
        atf_require_prog mount_${name}
        atf_require_prog umount
 
-       # if we have autoloadable modules, just assume the file system
-       atf_require_prog sysctl
        # Begin FreeBSD
        if true; then
-               if kldstat -m ${name}; then
+               if kldload -n ${name}; then
                        found=yes
                else
                        found=no
                fi
        else
        # End FreeBSD
+       # if we have autoloadable modules, just assume the file system
+       atf_require_prog sysctl
        autoload=$(sysctl -n kern.module.autoload)
        [ "${autoload}" = "1" ] && return 0
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to