Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/fs/tmpfs Use sysctl -n rather than parse the output.
details: https://anonhg.NetBSD.org/src/rev/f0431693a8e2
branches: trunk
changeset: 358799:f0431693a8e2
user: maya <maya%NetBSD.org@localhost>
date: Wed Jan 17 00:23:17 2018 +0000
description:
Use sysctl -n rather than parse the output.
>From Ngie Cooper in PR bin/51870
diffstat:
tests/fs/tmpfs/t_sizes.sh | 4 ++--
tests/fs/tmpfs/t_statvfs.sh | 4 ++--
tests/fs/tmpfs/t_vnode_leak.sh | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r e509e64caca1 -r f0431693a8e2 tests/fs/tmpfs/t_sizes.sh
--- a/tests/fs/tmpfs/t_sizes.sh Wed Jan 17 00:22:29 2018 +0000
+++ b/tests/fs/tmpfs/t_sizes.sh Wed Jan 17 00:23:17 2018 +0000
@@ -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.
# All rights reserved.
@@ -54,7 +54,7 @@
big_body() {
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_|')
cf_bused=$((${cf_blocks} - ${cf_bfree}))
diff -r e509e64caca1 -r f0431693a8e2 tests/fs/tmpfs/t_statvfs.sh
--- a/tests/fs/tmpfs/t_statvfs.sh Wed Jan 17 00:22:29 2018 +0000
+++ b/tests/fs/tmpfs/t_statvfs.sh Wed Jan 17 00:23:17 2018 +0000
@@ -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.
# All rights reserved.
@@ -38,7 +38,7 @@
values_body() {
test_mount -o -s10M
- pagesize=$(sysctl hw.pagesize | cut -d ' ' -f 3)
+ pagesize=$(sysctl -n hw.pagesize)
eval $($(atf_get_srcdir)/h_tools statvfs .)
[ ${pagesize} -eq ${f_bsize} ] || \
atf_fail "Invalid bsize"
diff -r e509e64caca1 -r f0431693a8e2 tests/fs/tmpfs/t_vnode_leak.sh
--- a/tests/fs/tmpfs/t_vnode_leak.sh Wed Jan 17 00:22:29 2018 +0000
+++ b/tests/fs/tmpfs/t_vnode_leak.sh Wed Jan 17 00:23:17 2018 +0000
@@ -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.
# All rights reserved.
@@ -36,7 +36,7 @@
}
main_body() {
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
test_mount -o -s$(((4000 + 2) * 4096))
Home |
Main Index |
Thread Index |
Old Index