Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Oct 2018 15:45:20 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r339050 - stable/11/contrib/netbsd-tests/fs
Message-ID:  <201810011545.w91FjKw6002355@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Mon Oct  1 15:45:20 2018
New Revision: 339050
URL: https://svnweb.freebsd.org/changeset/base/339050

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

Modified:
  stable/11/contrib/netbsd-tests/fs/h_funcs.subr
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/netbsd-tests/fs/h_funcs.subr
==============================================================================
--- stable/11/contrib/netbsd-tests/fs/h_funcs.subr	Mon Oct  1 15:43:56 2018	(r339049)
+++ stable/11/contrib/netbsd-tests/fs/h_funcs.subr	Mon Oct  1 15:45:20 2018	(r339050)
@@ -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
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810011545.w91FjKw6002355>