Source-Changes-HG archive

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

[src/trunk]: src/tests/net/net tests: add tests for IPv6 link-local addresses...



details:   https://anonhg.NetBSD.org/src/rev/a13e0127874a
branches:  trunk
changeset: 453797:a13e0127874a
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Mon Aug 26 07:41:50 2019 +0000

description:
tests: add tests for IPv6 link-local addresses with a scope ID

Setting an address with a scope ID doesn't work for rump.ifconfig for some
reasons and needs $HIJACKING for now.  The bug should be fixed someday.

diffstat:

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

diffs (37 lines):

diff -r 839ad6f18e8a -r a13e0127874a tests/net/net/t_ipv6address.sh
--- a/tests/net/net/t_ipv6address.sh    Mon Aug 26 04:50:32 2019 +0000
+++ b/tests/net/net/t_ipv6address.sh    Mon Aug 26 07:41:50 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ipv6address.sh,v 1.15 2019/05/13 17:55:09 bad Exp $
+#      $NetBSD: t_ipv6address.sh,v 1.16 2019/08/26 07:41:50 ozaki-r Exp $
 #
 # Copyright (c) 2015 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -247,6 +247,7 @@
        local dst_if0_lladdr=`get_linklocal_addr ${SOCKDST} shmif0`
        local fwd_if0_lladdr=`get_linklocal_addr ${SOCKFWD} shmif0`
        local fwd_if1_lladdr=`get_linklocal_addr ${SOCKFWD} shmif1`
+       local lladdr=fe80::2
 
        export RUMP_SERVER=${SOCKSRC}
        $DEBUG && rump.ifconfig
@@ -325,6 +326,19 @@
        atf_check -s ignore -o not-empty -e ignore \
            -x "shmif_dumpbus -p - ${BUS2} | tcpdump -r - -n -p icmp6"
 
+       # Setting a link-local address with a scope ID
+       # XXX need $HIJACKING for some reasons
+       cleanup_bus
+       export RUMP_SERVER=${SOCKFWD}
+       $DEBUG && rump.ifconfig shmif0
+       atf_check -s exit:0 $HIJACKING rump.ifconfig shmif0 inet6 $lladdr%shmif0/64
+       export RUMP_SERVER=${SOCKSRC}
+       atf_check -s exit:0 -o match:"0.0% packet loss" rump.ping6 -c 1 \
+           -X $TIMEOUT -n $lladdr
+       export RUMP_SERVER=${SOCKDST}
+       atf_check -s not-exit:0 -o match:"100.0% packet loss" rump.ping6 -c 1 \
+           -X $TIMEOUT -n $lladdr
+
        unset RUMP_SERVER
 
 }



Home | Main Index | Thread Index | Old Index