Module Name: src
Committed By: ozaki-r
Date: Fri Jun 2 01:18:51 UTC 2017
Modified Files:
src/tests/net: net_common.sh
Log Message:
Add IPSEC_KEY_DEBUG
Enable the debugging feature of IPsec key (sysctl net.key.debug)
on rump kernels if the ATF test is run with IPSEC_KEY_DEBUG=true.
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/tests/net/net_common.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/net/net_common.sh
diff -u src/tests/net/net_common.sh:1.17 src/tests/net/net_common.sh:1.18
--- src/tests/net/net_common.sh:1.17 Fri May 19 02:56:58 2017
+++ src/tests/net/net_common.sh Fri Jun 2 01:18:51 2017
@@ -1,4 +1,4 @@
-# $NetBSD: net_common.sh,v 1.17 2017/05/19 02:56:58 ozaki-r Exp $
+# $NetBSD: net_common.sh,v 1.18 2017/06/02 01:18:51 ozaki-r Exp $
#
# Copyright (c) 2016 Internet Initiative Japan Inc.
# All rights reserved.
@@ -188,6 +188,8 @@ _rump_server_buses=./.__buses
DEBUG_SYSCTL_ENTRIES="net.inet.arp.debug net.inet6.icmp6.nd6_debug \
net.inet.ipsec.debug"
+IPSEC_KEY_DEBUG=${IPSEC_KEY_DEBUG:-false}
+
_rump_server_start_common()
{
local sock=$1
@@ -209,6 +211,15 @@ _rump_server_start_common()
done
export RUMP_SERVER=$backup
fi
+ if $IPSEC_KEY_DEBUG; then
+ # Enable debugging features in the kernel
+ export RUMP_SERVER=$sock
+ if rump.sysctl -q net.key.debug; then
+ atf_check -s exit:0 \
+ rump.sysctl -q -w net.key.debug=0xffff
+ fi
+ export RUMP_SERVER=$backup
+ fi
echo $sock >> $_rump_server_socks
$DEBUG && cat $_rump_server_socks