Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/net Add IPSEC_KEY_DEBUG



details:   https://anonhg.NetBSD.org/src/rev/438d68fc2f65
branches:  trunk
changeset: 824334:438d68fc2f65
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Jun 02 01:18:51 2017 +0000

description:
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.

diffstat:

 tests/net/net_common.sh |  13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diffs (34 lines):

diff -r 88981bb0092d -r 438d68fc2f65 tests/net/net_common.sh
--- a/tests/net/net_common.sh   Fri Jun 02 01:07:53 2017 +0000
+++ b/tests/net/net_common.sh   Fri Jun 02 01:18:51 2017 +0000
@@ -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 @@
 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 @@
                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



Home | Main Index | Thread Index | Old Index