diff --git a/tests/net/net/t_forwarding.sh b/tests/net/net/t_forwarding.sh index af3d602..9315f11 100644 --- a/tests/net/net/t_forwarding.sh +++ b/tests/net/net/t_forwarding.sh @@ -31,6 +31,9 @@ inet6server="rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpnet_net SOCKSRC=unix://commsock1 SOCKFWD=unix://commsock2 SOCKDST=unix://commsock3 +LOGSRC=./log1 +LOGFWD=./log2 +LOGDST=./log3 IP4SRC=10.0.1.2 IP4SRCGW=10.0.1.1 IP4DSTGW=10.0.2.1 @@ -135,9 +138,15 @@ setup_forwarder() setup() { - atf_check -s exit:0 ${inetserver} $SOCKSRC - atf_check -s exit:0 ${inetserver} $SOCKFWD - atf_check -s exit:0 ${inetserver} $SOCKDST + if $DEBUG; then + atf_check -s exit:0 ${inetserver} -L $LOGSRC $SOCKSRC + atf_check -s exit:0 ${inetserver} -L $LOGFWD $SOCKFWD + atf_check -s exit:0 ${inetserver} -L $LOGDST $SOCKDST + else + atf_check -s exit:0 ${inetserver} $SOCKSRC + atf_check -s exit:0 ${inetserver} $SOCKFWD + atf_check -s exit:0 ${inetserver} $SOCKDST + fi setup_endpoint $SOCKSRC $IP4SRC bus1 ipv4 $IP4SRCGW setup_endpoint $SOCKDST $IP4DST bus2 ipv4 $IP4DSTGW @@ -248,6 +257,15 @@ dump() /usr/bin/shmif_dumpbus -p - bus1 2>/dev/null| /usr/sbin/tcpdump -n -e -r - /usr/bin/shmif_dumpbus -p - bus2 2>/dev/null| /usr/sbin/tcpdump -n -e -r - + + if $DEBUG; then + echo "--- kernel logs for src" + cat $LOGSRC + echo "--- kernel logs for fwd" + cat $LOGFWD + echo "--- kernel logs for dst" + cat $LOGDST + fi } test_ping_failure()