Source-Changes-HG archive

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

[src/trunk]: src/tests/net Use rump.ping6 instead of ping6 with rumphijack(3)



details:   https://anonhg.NetBSD.org/src/rev/d13e21851ec2
branches:  trunk
changeset: 339730:d13e21851ec2
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Aug 07 00:50:12 2015 +0000

description:
Use rump.ping6 instead of ping6 with rumphijack(3)

diffstat:

 tests/net/if_bridge/t_bridge.sh |  32 ++++++++++----------------------
 tests/net/mpls/t_mpls_fw6.sh    |  14 +++++---------
 tests/net/mpls/t_mpls_fw64.sh   |  12 ++++--------
 tests/net/ndp/t_ndp.sh          |  15 ++++-----------
 tests/net/net/t_forwarding.sh   |  38 +++++++++++++-------------------------
 5 files changed, 36 insertions(+), 75 deletions(-)

diffs (291 lines):

diff -r 0075adfdc56c -r d13e21851ec2 tests/net/if_bridge/t_bridge.sh
--- a/tests/net/if_bridge/t_bridge.sh   Fri Aug 07 00:37:14 2015 +0000
+++ b/tests/net/if_bridge/t_bridge.sh   Fri Aug 07 00:50:12 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_bridge.sh,v 1.10 2015/07/23 11:05:34 ozaki-r Exp $
+#      $NetBSD: t_bridge.sh,v 1.11 2015/08/07 00:50:12 ozaki-r Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -108,9 +108,7 @@
        export RUMP_SERVER=${sock}
        atf_check -s exit:0 -o match:shmif0 rump.ifconfig
        if [ $mode = "ipv6" ]; then
-               export LD_PRELOAD=/usr/lib/librumphijack.so
-               atf_check -s exit:0 -o ignore ping6 -n -c 1 -X $TIMEOUT ${addr}
-               unset LD_PRELOAD
+               atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT ${addr}
        else
                atf_check -s exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 ${addr}
        fi
@@ -288,28 +286,22 @@
 
 test_ping6_failure()
 {
-       export LD_PRELOAD=/usr/lib/librumphijack.so
        export RUMP_SERVER=$SOCK1
-       atf_check -s not-exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP62
+       atf_check -s not-exit:0 -o ignore rump.ping6 -q -n -c 1 -X $TIMEOUT $IP62
        export RUMP_SERVER=$SOCK3
-       atf_check -s not-exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP61
-       unset LD_PRELOAD
+       atf_check -s not-exit:0 -o ignore rump.ping6 -q -n -c 1 -X $TIMEOUT $IP61
 }
 
 test_ping6_success()
 {
        export RUMP_SERVER=$SOCK1
        rump.ifconfig -v shmif0
-       export LD_PRELOAD=/usr/lib/librumphijack.so
-       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP62
-       unset LD_PRELOAD
+       atf_check -s exit:0 -o ignore rump.ping6 -q -n -c 1 -X $TIMEOUT $IP62
        rump.ifconfig -v shmif0
 
        export RUMP_SERVER=$SOCK3
        rump.ifconfig -v shmif0
-       export LD_PRELOAD=/usr/lib/librumphijack.so
-       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP61
-       unset LD_PRELOAD
+       atf_check -s exit:0 -o ignore rump.ping6 -q -n -c 1 -X $TIMEOUT $IP61
        rump.ifconfig -v shmif0
 }
 
@@ -334,25 +326,21 @@
 
 test_ping6_member()
 {
-       export LD_PRELOAD=/usr/lib/librumphijack.so
-
        export RUMP_SERVER=$SOCK1
        rump.ifconfig -v shmif0
-       atf_check -s exit:0 -o ignore ping6 -q -n -X $TIMEOUT -c 1 $IP6BR1
+       atf_check -s exit:0 -o ignore rump.ping6 -q -n -X $TIMEOUT -c 1 $IP6BR1
        rump.ifconfig -v shmif0
        # Test for PR#48104
-       atf_check -s exit:0 -o ignore ping6 -q -n -X $TIMEOUT -c 1 $IP6BR2
+       atf_check -s exit:0 -o ignore rump.ping6 -q -n -X $TIMEOUT -c 1 $IP6BR2
        rump.ifconfig -v shmif0
 
        export RUMP_SERVER=$SOCK3
        rump.ifconfig -v shmif0
        # Test for PR#48104
-       atf_check -s exit:0 -o ignore ping6 -q -n -X $TIMEOUT -c 1 $IP6BR1
+       atf_check -s exit:0 -o ignore rump.ping6 -q -n -X $TIMEOUT -c 1 $IP6BR1
        rump.ifconfig -v shmif0
-       atf_check -s exit:0 -o ignore ping6 -q -n -X $TIMEOUT -c 1 $IP6BR2
+       atf_check -s exit:0 -o ignore rump.ping6 -q -n -X $TIMEOUT -c 1 $IP6BR2
        rump.ifconfig -v shmif0
-
-       unset LD_PRELOAD
 }
 
 get_number_of_caches()
diff -r 0075adfdc56c -r d13e21851ec2 tests/net/mpls/t_mpls_fw6.sh
--- a/tests/net/mpls/t_mpls_fw6.sh      Fri Aug 07 00:37:14 2015 +0000
+++ b/tests/net/mpls/t_mpls_fw6.sh      Fri Aug 07 00:50:12 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_mpls_fw6.sh,v 1.1 2015/05/27 16:40:33 kefren Exp $
+# $NetBSD: t_mpls_fw6.sh,v 1.2 2015/08/07 00:50:12 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -134,26 +134,22 @@
 doping()
 {
 
-       export LD_PRELOAD=/usr/lib/librumphijack.so
-       export RUMPHIJACK="socket=inet6:inet"
        export RUMP_SERVER=${RUMP_SERVER1}
        atf_check -s exit:0 \
            -o match:" bytes from fd00:1234::2, icmp_seq=" \
-           ping6 -n -o -X 2 fd00:1234::2
+           rump.ping6 -n -o -X 2 fd00:1234::2
        export RUMP_SERVER=${RUMP_SERVER2}
        atf_check -s exit:0 \
            -o match:" bytes from fd00:1234:0:1::2, icmp_seq=" \
-           ping6 -n -o -X 2 fd00:1234:0:1::2
+           rump.ping6 -n -o -X 2 fd00:1234:0:1::2
        export RUMP_SERVER=${RUMP_SERVER3}
        atf_check -s exit:0 \
            -o match:" bytes from fd00:1234:0:2::2, icmp_seq=" \
-           ping6 -n -o -X 2 fd00:1234:0:2::2
+           rump.ping6 -n -o -X 2 fd00:1234:0:2::2
        export RUMP_SERVER=${RUMP_SERVER1}
        atf_check -s exit:0 \
            -o match:" bytes from fd00:1234:0:3::1, icmp_seq=" \
-           ping6 -n -o -X 2 fd00:1234:0:3::1
-       unset LD_PRELOAD
-       unset RUMPHIJACK
+           rump.ping6 -n -o -X 2 fd00:1234:0:3::1
        unset RUMP_SERVER
 }
 
diff -r 0075adfdc56c -r d13e21851ec2 tests/net/mpls/t_mpls_fw64.sh
--- a/tests/net/mpls/t_mpls_fw64.sh     Fri Aug 07 00:37:14 2015 +0000
+++ b/tests/net/mpls/t_mpls_fw64.sh     Fri Aug 07 00:50:12 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_mpls_fw64.sh,v 1.1 2015/05/27 18:13:14 kefren Exp $
+# $NetBSD: t_mpls_fw64.sh,v 1.2 2015/08/07 00:50:12 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -132,16 +132,14 @@
 doping()
 {
 
-       export LD_PRELOAD=/usr/lib/librumphijack.so
-       export RUMPHIJACK="socket=inet6:inet"
        export RUMP_SERVER=${RUMP_SERVER1}
        atf_check -s exit:0 \
            -o match:" bytes from fd00:1234::2, icmp_seq=" \
-           ping6 -n -o -X 2 fd00:1234::2
+           rump.ping6 -n -o -X 2 fd00:1234::2
        export RUMP_SERVER=${RUMP_SERVER2}
        atf_check -s exit:0 \
            -o match:" bytes from fd00:1234:0:1::2, icmp_seq=" \
-           ping6 -n -o -X 2 fd00:1234:0:1::2
+           rump.ping6 -n -o -X 2 fd00:1234:0:1::2
        export RUMP_SERVER=${RUMP_SERVER3}
        atf_check -s exit:0 \
            -o match:" bytes from 10.0.3.2: icmp_seq" \
@@ -149,9 +147,7 @@
        export RUMP_SERVER=${RUMP_SERVER1}
        atf_check -s exit:0 \
            -o match:" bytes from fd00:1234:0:3::1, icmp_seq=" \
-           ping6 -n -o -X 2 fd00:1234:0:3::1
-       unset LD_PRELOAD
-       unset RUMPHIJACK
+           rump.ping6 -n -o -X 2 fd00:1234:0:3::1
        unset RUMP_SERVER
 }
 
diff -r 0075adfdc56c -r d13e21851ec2 tests/net/ndp/t_ndp.sh
--- a/tests/net/ndp/t_ndp.sh    Fri Aug 07 00:37:14 2015 +0000
+++ b/tests/net/ndp/t_ndp.sh    Fri Aug 07 00:50:12 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ndp.sh,v 1.2 2015/08/04 07:43:25 ozaki-r Exp $
+#      $NetBSD: t_ndp.sh,v 1.3 2015/08/07 00:50:12 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -110,10 +110,7 @@
        # Check if a cache is expired expectedly
        #
        export RUMP_SERVER=$SOCKSRC
-       #atf_check -s exit:0 -o ignore $HIJACKING ping6 -n -X $TIMEOUT -c 1 $IP6DST
-       export LD_PRELOAD=/usr/lib/librumphijack.so
-       atf_check -s exit:0 -o ignore ping6 -n -X $TIMEOUT -c 1 $IP6DST
-       unset LD_PRELOAD
+       atf_check -s exit:0 -o ignore rump.ping6 -n -X $TIMEOUT -c 1 $IP6DST
 
        $DEBUG && rump.ndp -n -a
        atf_check -s exit:0 -o match:'permanent' rump.ndp -n $IP6SRC
@@ -161,9 +158,7 @@
        #atf_check -s exit:0 -o ignore rump.ndp -f ./list
        #$DEBUG && rump.ndp -n -a
 
-       export LD_PRELOAD=/usr/lib/librumphijack.so
-       atf_check -s exit:0 -o ignore ping6 -n -X $TIMEOUT -c 1 $IP6DST
-       unset LD_PRELOAD
+       atf_check -s exit:0 -o ignore rump.ping6 -n -X $TIMEOUT -c 1 $IP6DST
        atf_check -s exit:0 -o ignore rump.ndp -s fc00::11 b2:a0:20:00:00:11
        atf_check -s exit:0 -o ignore rump.ndp -s fc00::12 b2:a0:20:00:00:12
 
@@ -207,9 +202,7 @@
        atf_check -s not-exit:0 -e ignore rump.ndp -s $IP6SRC b2:a0:20:00:00:ff
        $DEBUG && rump.ndp -n -a
 
-       export LD_PRELOAD=/usr/lib/librumphijack.so
-       atf_check -s exit:0 -o ignore ping6 -n -X $TIMEOUT -c 1 $IP6DST
-       unset LD_PRELOAD
+       atf_check -s exit:0 -o ignore rump.ping6 -n -X $TIMEOUT -c 1 $IP6DST
        $DEBUG && rump.ndp -n -a
        # Can overwrite a dynamic cache
        atf_check -s exit:0 -o ignore rump.ndp -s $IP6DST b2:a0:20:00:00:00
diff -r 0075adfdc56c -r d13e21851ec2 tests/net/net/t_forwarding.sh
--- a/tests/net/net/t_forwarding.sh     Fri Aug 07 00:37:14 2015 +0000
+++ b/tests/net/net/t_forwarding.sh     Fri Aug 07 00:50:12 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_forwarding.sh,v 1.5 2015/06/02 07:32:50 ozaki-r Exp $
+#      $NetBSD: t_forwarding.sh,v 1.6 2015/08/07 00:50:12 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -94,9 +94,7 @@
        export RUMP_SERVER=${sock}
        atf_check -s exit:0 -o match:shmif0 rump.ifconfig
        if [ $mode = "ipv6" ]; then
-               export LD_PRELOAD=/usr/lib/librumphijack.so
-               atf_check -s exit:0 -o ignore ping6 -n -c 1 -X $TIMEOUT ${addr}
-               unset LD_PRELOAD
+               atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT ${addr}
        else
                atf_check -s exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 ${addr}
        fi
@@ -178,10 +176,8 @@
        atf_check -s exit:0 -o match:shmif0 rump.ifconfig
        atf_check -s exit:0 -o match:shmif1 rump.ifconfig
 
-       export LD_PRELOAD=/usr/lib/librumphijack.so
-       atf_check -s exit:0 -o ignore ping6 -n -c 1 -X $TIMEOUT ${IP6SRCGW}
-       atf_check -s exit:0 -o ignore ping6 -n -c 1 -X $TIMEOUT ${IP6DSTGW}
-       unset LD_PRELOAD
+       atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT ${IP6SRCGW}
+       atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT ${IP6DSTGW}
 }
 
 setup_forwarding()
@@ -287,30 +283,24 @@
 
 test_ping6_failure()
 {
-       export LD_PRELOAD=/usr/lib/librumphijack.so
        export RUMP_SERVER=$SOCKSRC
-       atf_check -s not-exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP6DST
+       atf_check -s not-exit:0 -o ignore rump.ping6 -q -n -c 1 -X $TIMEOUT $IP6DST
        export RUMP_SERVER=$SOCKDST
-       atf_check -s not-exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP6SRC
-       unset LD_PRELOAD
+       atf_check -s not-exit:0 -o ignore rump.ping6 -q -n -c 1 -X $TIMEOUT $IP6SRC
 }
 
 test_ping6_success()
 {
        export RUMP_SERVER=$SOCKSRC
        $DEBUG && rump.ifconfig -v shmif0
-       export LD_PRELOAD=/usr/lib/librumphijack.so
-       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP6SRCGW
-       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP6DST
-       unset LD_PRELOAD
+       atf_check -s exit:0 -o ignore rump.ping6 -q -n -c 1 -X $TIMEOUT $IP6SRCGW
+       atf_check -s exit:0 -o ignore rump.ping6 -q -n -c 1 -X $TIMEOUT $IP6DST
        $DEBUG && rump.ifconfig -v shmif0
 
        export RUMP_SERVER=$SOCKDST
        $DEBUG && rump.ifconfig -v shmif0
-       export LD_PRELOAD=/usr/lib/librumphijack.so
-       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP6DSTGW
-       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP6SRC
-       unset LD_PRELOAD
+       atf_check -s exit:0 -o ignore rump.ping6 -q -n -c 1 -X $TIMEOUT $IP6DSTGW
+       atf_check -s exit:0 -o ignore rump.ping6 -q -n -c 1 -X $TIMEOUT $IP6SRC
        $DEBUG && rump.ifconfig -v shmif0
 }
 
@@ -318,12 +308,10 @@
 {
        export RUMP_SERVER=$SOCKSRC
        $DEBUG && rump.ifconfig -v shmif0
-       export LD_PRELOAD=/usr/lib/librumphijack.so
-       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -h 1 -X $TIMEOUT $IP6SRCGW
+       atf_check -s exit:0 -o ignore rump.ping6 -q -n -c 1 -h 1 -X $TIMEOUT $IP6SRCGW
        atf_check -s not-exit:0 -o match:'Time to live exceeded' \
-           ping6 -v -n -c 1 -h 1 -X $TIMEOUT $IP6DST
-       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -h 2 -X $TIMEOUT $IP6DST
-       unset LD_PRELOAD
+           rump.ping6 -v -n -c 1 -h 1 -X $TIMEOUT $IP6DST
+       atf_check -s exit:0 -o ignore rump.ping6 -q -n -c 1 -h 2 -X $TIMEOUT $IP6DST
        $DEBUG && rump.ifconfig -v shmif0
 }
 



Home | Main Index | Thread Index | Old Index