Port vnode_leak_test:main to FreeBSD

Use a simpler way of dumping kern.maxvnodes, i.e. `sysctl -n kern.maxvnodes`

The awk filtering method employed in NetBSD doesn't work on FreeBSD

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
This commit is contained in:
ngie 2016-09-20 16:27:34 +00:00
parent ba45f5a850
commit 857d7c1572

View File

@ -36,7 +36,15 @@ main_head() {
}
main_body() {
echo "Lowering kern.maxvnodes to 2000"
# Begin FreeBSD
if true; then
sysctl -n kern.maxvnodes > oldvnodes
else
# End FreeBSD
sysctl kern.maxvnodes | awk '{ print $3; }' >oldvnodes
# Begin FreeBSD
fi
# End FreeBSD
atf_check -s eq:0 -o ignore -e empty sysctl -w kern.maxvnodes=2000
test_mount -o -s$(((4000 + 2) * 4096))