Use sysctl -n rather than parse the output.
From Ngie Cooper in PR bin/51870
This commit is contained in:
parent
687000d215
commit
b42dccbff0
@ -1,4 +1,4 @@
|
|||||||
# $NetBSD: t_sizes.sh,v 1.5 2010/11/07 17:51:18 jmmv Exp $
|
# $NetBSD: t_sizes.sh,v 1.6 2018/01/17 00:23:17 maya Exp $
|
||||||
#
|
#
|
||||||
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
@ -54,7 +54,7 @@ big_head() {
|
|||||||
big_body() {
|
big_body() {
|
||||||
test_mount -o -s10M
|
test_mount -o -s10M
|
||||||
|
|
||||||
pagesize=$(sysctl hw.pagesize | cut -d ' ' -f 3)
|
pagesize=$(sysctl -n hw.pagesize)
|
||||||
eval $($(atf_get_srcdir)/h_tools statvfs . | sed -e 's|^f_|cf_|')
|
eval $($(atf_get_srcdir)/h_tools statvfs . | sed -e 's|^f_|cf_|')
|
||||||
cf_bused=$((${cf_blocks} - ${cf_bfree}))
|
cf_bused=$((${cf_blocks} - ${cf_bfree}))
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# $NetBSD: t_statvfs.sh,v 1.4 2010/11/07 17:51:18 jmmv Exp $
|
# $NetBSD: t_statvfs.sh,v 1.5 2018/01/17 00:23:17 maya Exp $
|
||||||
#
|
#
|
||||||
# Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
|
# Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
@ -38,7 +38,7 @@ values_head() {
|
|||||||
values_body() {
|
values_body() {
|
||||||
test_mount -o -s10M
|
test_mount -o -s10M
|
||||||
|
|
||||||
pagesize=$(sysctl hw.pagesize | cut -d ' ' -f 3)
|
pagesize=$(sysctl -n hw.pagesize)
|
||||||
eval $($(atf_get_srcdir)/h_tools statvfs .)
|
eval $($(atf_get_srcdir)/h_tools statvfs .)
|
||||||
[ ${pagesize} -eq ${f_bsize} ] || \
|
[ ${pagesize} -eq ${f_bsize} ] || \
|
||||||
atf_fail "Invalid bsize"
|
atf_fail "Invalid bsize"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# $NetBSD: t_vnode_leak.sh,v 1.6 2010/11/07 17:51:18 jmmv Exp $
|
# $NetBSD: t_vnode_leak.sh,v 1.7 2018/01/17 00:23:17 maya Exp $
|
||||||
#
|
#
|
||||||
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
@ -36,7 +36,7 @@ main_head() {
|
|||||||
}
|
}
|
||||||
main_body() {
|
main_body() {
|
||||||
echo "Lowering kern.maxvnodes to 2000"
|
echo "Lowering kern.maxvnodes to 2000"
|
||||||
sysctl kern.maxvnodes | awk '{ print $3; }' >oldvnodes
|
sysctl -n kern.maxvnodes >oldvnodes
|
||||||
atf_check -s eq:0 -o ignore -e empty sysctl -w kern.maxvnodes=2000
|
atf_check -s eq:0 -o ignore -e empty sysctl -w kern.maxvnodes=2000
|
||||||
|
|
||||||
test_mount -o -s$(((4000 + 2) * 4096))
|
test_mount -o -s$(((4000 + 2) * 4096))
|
||||||
|
Loading…
Reference in New Issue
Block a user