Source-Changes-HG archive

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

[src/trunk]: src/tests/net/net Add more debugging code



details:   https://anonhg.NetBSD.org/src/rev/7ad596c2d707
branches:  trunk
changeset: 344107:7ad596c2d707
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Sun Mar 13 05:46:20 2016 +0000

description:
Add more debugging code

diffstat:

 tests/net/net/t_ipv6address.sh |  24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diffs (66 lines):

diff -r 7c207b9df042 -r 7ad596c2d707 tests/net/net/t_ipv6address.sh
--- a/tests/net/net/t_ipv6address.sh    Sun Mar 13 03:47:41 2016 +0000
+++ b/tests/net/net/t_ipv6address.sh    Sun Mar 13 05:46:20 2016 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ipv6address.sh,v 1.4 2016/03/12 06:15:31 ozaki-r Exp $
+#      $NetBSD: t_ipv6address.sh,v 1.5 2016/03/13 05:46:20 ozaki-r Exp $
 #
 # Copyright (c) 2015 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -164,6 +164,8 @@
 {
        local tmp_rump_server=$RUMP_SERVER
 
+       $DEBUG && dump_bus
+
        export RUMP_SERVER=${SOCKSRC}
        atf_check -s exit:0 rump.ifconfig shmif0 down
        atf_check -s exit:0 rump.ifconfig shmif0 -linkstr
@@ -185,8 +187,6 @@
        atf_check -s exit:0 rump.ifconfig shmif1 -linkstr
        unset RUMP_SERVER
 
-       $DEBUG && dump_bus
-
        atf_check -s exit:0 rm ${BUSSRC}
        atf_check -s exit:0 rm ${BUSDST}
        atf_check -s exit:0 rm ${BUS1}
@@ -225,6 +225,21 @@
        shmif_dumpbus -p - ${BUS2} 2>/dev/null| tcpdump -n -e -r -
 }
 
+dump()
+{
+
+       export RUMP_SERVER=${SOCKSRC}
+       rump.ndp -n -a
+       rump.netstat -nr -f inet6
+       export RUMP_SERVER=${SOCKDST}
+       rump.ndp -n -a
+       rump.netstat -nr -f inet6
+       export RUMP_SERVER=${SOCKFWD}
+       rump.ndp -n -a
+       rump.netstat -nr -f inet6
+       unset RUMP_SERVER
+}
+
 linklocal_head()
 {
        atf_set "descr" "Test for bassically function of the IPv6 linklocal address"
@@ -280,6 +295,8 @@
        atf_check -s exit:0 -o ignore rump.ifconfig -w 10
 
        $DEBUG && rump.ifconfig shmif0
+       $DEBUG && dump
+
        atf_check -s exit:0 -o match:"0.0% packet loss" \
            rump.ping6 -c 1 -X $TIMEOUT -n -S ${src_if0_lladdr}%shmif0 ${IP6FWD0}
        unset RUMP_SERVER
@@ -322,6 +339,7 @@
 linklocal_cleanup()
 {
 
+       $DEBUG && dump
        $DEBUG && dump_bus
        cleanup_rump_servers
 }



Home | Main Index | Thread Index | Old Index