Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Sep 2016 16:31:57 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r306033 - head/contrib/netbsd-tests/fs/tmpfs
Message-ID:  <201609201631.u8KGVvuT090453@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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"



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