Source-Changes-HG archive

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

[src/trunk]: src/tests/net/if_bridge Add $DEBUG and remove a unused function



details:   https://anonhg.NetBSD.org/src/rev/57d3c2dd691c
branches:  trunk
changeset: 349135:57d3c2dd691c
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Nov 25 08:10:50 2016 +0000

description:
Add $DEBUG and remove a unused function

diffstat:

 tests/net/if_bridge/t_bridge.sh |  19 ++++++-------------
 1 files changed, 6 insertions(+), 13 deletions(-)

diffs (68 lines):

diff -r 9ff3710a002f -r 57d3c2dd691c tests/net/if_bridge/t_bridge.sh
--- a/tests/net/if_bridge/t_bridge.sh   Fri Nov 25 08:10:12 2016 +0000
+++ b/tests/net/if_bridge/t_bridge.sh   Fri Nov 25 08:10:50 2016 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_bridge.sh,v 1.14 2016/11/24 09:07:09 ozaki-r Exp $
+#      $NetBSD: t_bridge.sh,v 1.15 2016/11/25 08:10:50 ozaki-r Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -44,6 +44,7 @@
 IP6BR1=fc00::11
 IP6BR2=fc00::12
 
+DEBUG=${DEBUG:-false}
 TIMEOUT=5
 
 atf_test_case bridge_ipv4 cleanup
@@ -99,7 +100,7 @@
        fi
 
        atf_check -s exit:0 rump.ifconfig shmif0 up
-       rump.ifconfig shmif0
+       $DEBUG && rump.ifconfig shmif0
 }
 
 test_endpoint()
@@ -118,14 +119,6 @@
        fi
 }
 
-show_endpoint()
-{
-       sock=${1}
-
-       export RUMP_SERVER=${sock}
-       rump.ifconfig -v shmif0
-}
-
 test_setup()
 {
        test_endpoint $SOCK1 $IP1 bus1 ipv4
@@ -451,7 +444,7 @@
        # Confirm there is no MAC address caches.
        export RUMP_SERVER=$SOCK2
        export LD_PRELOAD=/usr/lib/librumphijack.so
-       /sbin/brconfig bridge0
+       $DEBUG && /sbin/brconfig bridge0
        atf_check -s exit:0 -o not-match:"$addr1" /sbin/brconfig bridge0
        atf_check -s exit:0 -o not-match:"$addr3" /sbin/brconfig bridge0
        unset LD_PRELOAD
@@ -464,7 +457,7 @@
        # Tests the addresses are in the cache.
        export RUMP_SERVER=$SOCK2
        export LD_PRELOAD=/usr/lib/librumphijack.so
-       /sbin/brconfig bridge0
+       $DEBUG && /sbin/brconfig bridge0
        atf_check -s exit:0 -o match:"$addr1 shmif0" /sbin/brconfig bridge0
        atf_check -s exit:0 -o match:"$addr3 shmif1" /sbin/brconfig bridge0
 
@@ -481,7 +474,7 @@
        unset RUMP_SERVER
        export RUMP_SERVER=$SOCK2
        export LD_PRELOAD=/usr/lib/librumphijack.so
-       /sbin/brconfig bridge0
+       $DEBUG && /sbin/brconfig bridge0
        atf_check -s exit:0 -o match:"$addr1 shmif0" /sbin/brconfig bridge0
        atf_check -s exit:0 -o match:"$addr3 shmif1" /sbin/brconfig bridge0
 



Home | Main Index | Thread Index | Old Index