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
This commit is contained in:
parent
61e13648e7
commit
548f948a56
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=306033
@ -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}))
|
||||
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user