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 debugging code and enable it by default



details:   https://anonhg.NetBSD.org/src/rev/b596318c9fb3
branches:  trunk
changeset: 344078:b596318c9fb3
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Sat Mar 12 06:15:31 2016 +0000

description:
Add debugging code and enable it by default
to know what is happening on anita (qemu)

diffstat:

 tests/net/net/t_ipv6address.sh |  16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diffs (51 lines):

diff -r 4ef936597106 -r b596318c9fb3 tests/net/net/t_ipv6address.sh
--- a/tests/net/net/t_ipv6address.sh    Sat Mar 12 03:14:59 2016 +0000
+++ b/tests/net/net/t_ipv6address.sh    Sat Mar 12 06:15:31 2016 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ipv6address.sh,v 1.3 2015/12/15 01:33:08 ozaki-r Exp $
+#      $NetBSD: t_ipv6address.sh,v 1.4 2016/03/12 06:15:31 ozaki-r Exp $
 #
 # Copyright (c) 2015 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -40,7 +40,7 @@
 BUSSRC=bus_src
 BUSDST=bus_dst
 
-DEBUG=false
+DEBUG=true
 TIMEOUT=3
 
 atf_test_case linklocal cleanup
@@ -185,6 +185,8 @@
        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}
@@ -214,6 +216,15 @@
        env RUMP_SERVER=${SOCKFWD} rump.halt
 }
 
+dump_bus()
+{
+
+       shmif_dumpbus -p - ${BUSSRC} 2>/dev/null| tcpdump -n -e -r -
+       shmif_dumpbus -p - ${BUSDST} 2>/dev/null| tcpdump -n -e -r -
+       shmif_dumpbus -p - ${BUS1} 2>/dev/null| tcpdump -n -e -r -
+       shmif_dumpbus -p - ${BUS2} 2>/dev/null| tcpdump -n -e -r -
+}
+
 linklocal_head()
 {
        atf_set "descr" "Test for bassically function of the IPv6 linklocal address"
@@ -311,6 +322,7 @@
 linklocal_cleanup()
 {
 
+       $DEBUG && dump_bus
        cleanup_rump_servers
 }
 



Home | Main Index | Thread Index | Old Index