Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/net tests: restore rump_server_check_poolleaks for lle...
details: https://anonhg.NetBSD.org/src/rev/be19ca78bc76
branches: trunk
changeset: 453795:be19ca78bc76
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Mon Aug 26 04:50:03 2019 +0000
description:
tests: restore rump_server_check_poolleaks for llentpl
It didn't work correctly because rumphijack for vmstat didn't work expectedly;
vmstat has the sgid bit for kvm(3) and that prevents rumphijack from working.
Address the issue by cloning a vmstat binary without the sgid bit temporarily
and using it for rumphijack. Note that it's a workaround. vmstat should stop
using kvm(3) for /dev/kmem and drop the sgid bit eventually.
diffstat:
tests/net/net_common.sh | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diffs (47 lines):
diff -r 01ce9e49b1a3 -r be19ca78bc76 tests/net/net_common.sh
--- a/tests/net/net_common.sh Mon Aug 26 04:49:45 2019 +0000
+++ b/tests/net/net_common.sh Mon Aug 26 04:50:03 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: net_common.sh,v 1.35 2019/08/20 09:53:45 ozaki-r Exp $
+# $NetBSD: net_common.sh,v 1.36 2019/08/26 04:50:03 ozaki-r Exp $
#
# Copyright (c) 2016 Internet Initiative Japan Inc.
# All rights reserved.
@@ -341,8 +341,13 @@
{
local target=$1
- reqs=$($HIJACKING vmstat -mv | awk "/$target/ {print \$3;}")
- rels=$($HIJACKING vmstat -mv | awk "/$target/ {print \$5;}")
+ # XXX rumphijack doesn't work with a binary with suid/sgid bits like
+ # vmstat. Use a copied one to drop sgid bit as a workaround until
+ # vmstat stops using kvm(3) for /dev/kmem and the sgid bit.
+ cp /usr/bin/vmstat ./vmstat
+ reqs=$($HIJACKING ./vmstat -mv | awk "/$target/ {print \$3;}")
+ rels=$($HIJACKING ./vmstat -mv | awk "/$target/ {print \$5;}")
+ rm -f ./vmstat
atf_check_equal '$target$reqs' '$target$rels'
}
@@ -350,8 +355,7 @@
rump_server_check_memleaks()
{
- # XXX this doesn't work in some cases for unknown reasons
- #rump_server_check_poolleaks llentrypl
+ rump_server_check_poolleaks llentrypl
# This doesn't work for objects allocated through pool_cache
#rump_server_check_poolleaks mbpl
#rump_server_check_poolleaks mclpl
@@ -437,7 +441,10 @@
rump.netstat -nr
# XXX still need hijacking
$HIJACKING rump.netstat -nai
- $HIJACKING vmstat -m
+ # XXX workaround for vmstat with the sgid bit
+ cp /usr/bin/vmstat ./vmstat
+ $HIJACKING ./vmstat -m
+ rm -f ./vmstat
rump.arp -na
rump.ndp -na
$HIJACKING ifmcstat
Home |
Main Index |
Thread Index |
Old Index