svn commit: r306033 - head/contrib/netbsd-tests/fs/tmpfs

Ngie Cooper ngie at FreeBSD.org
Tue Sep 20 16:31:58 UTC 2016


Author: ngie
Date: Tue Sep 20 16:31:57 2016
New Revision: 306033
URL: https://svnweb.freebsd.org/changeset/base/306033

Log:
  Port sizes_test and statvfs_test to FreeBSD
  
  Similar to r306030, use a simpler method for getting the value of
  `hw.pagesize`, i.e. `sysctl -n hw.pagesize`. The awk filtering method doesn't
  work on FreeBSD
  
  MFC after:	1 month
  Sponsored by:	Dell EMC Isilon

Modified:
  head/contrib/netbsd-tests/fs/tmpfs/t_sizes.sh
  head/contrib/netbsd-tests/fs/tmpfs/t_statvfs.sh

Modified: head/contrib/netbsd-tests/fs/tmpfs/t_sizes.sh
==============================================================================
--- head/contrib/netbsd-tests/fs/tmpfs/t_sizes.sh	Tue Sep 20 16:30:59 2016	(r306032)
+++ head/contrib/netbsd-tests/fs/tmpfs/t_sizes.sh	Tue Sep 20 16:31:57 2016	(r306033)
@@ -54,7 +54,15 @@ big_head() {
 big_body() {
 	test_mount -o -s10M
 
+	# Begin FreeBSD
+	if true; then
+		pagesize=$(sysctl -n hw.pagesize)
+	else
+	# End FreeBSD
 	pagesize=$(sysctl hw.pagesize | cut -d ' ' -f 3)
+	# Begin FreeBSD
+	fi
+	# End FreeBSD
 	eval $($(atf_get_srcdir)/h_tools statvfs . | sed -e 's|^f_|cf_|')
 	cf_bused=$((${cf_blocks} - ${cf_bfree}))
 

Modified: head/contrib/netbsd-tests/fs/tmpfs/t_statvfs.sh
==============================================================================
--- head/contrib/netbsd-tests/fs/tmpfs/t_statvfs.sh	Tue Sep 20 16:30:59 2016	(r306032)
+++ head/contrib/netbsd-tests/fs/tmpfs/t_statvfs.sh	Tue Sep 20 16:31:57 2016	(r306033)
@@ -38,7 +38,15 @@ values_head() {
 values_body() {
 	test_mount -o -s10M
 
+	# Begin FreeBSD
+	if true; then
+		pagesize=$(sysctl -n hw.pagesize)
+	else
+	# End FreeBSD
 	pagesize=$(sysctl hw.pagesize | cut -d ' ' -f 3)
+	# Begin FreeBSD
+	fi
+	# End FreeBSD
 	eval $($(atf_get_srcdir)/h_tools statvfs .)
 	[ ${pagesize} -eq ${f_bsize} ] || \
 	    atf_fail "Invalid bsize"


More information about the svn-src-head mailing list