Source-Changes-HG archive

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

[src/trunk]: src/tests/net Some interfaces (gif) don't have a mac address...



details:   https://anonhg.NetBSD.org/src/rev/b0edbb09557a
branches:  trunk
changeset: 1008670:b0edbb09557a
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Mar 30 13:01:39 2020 +0000

description:
Some interfaces (gif) don't have a mac address...

diffstat:

 tests/net/net_common.sh |  16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diffs (32 lines):

diff -r 87a3d5ce4569 -r b0edbb09557a tests/net/net_common.sh
--- a/tests/net/net_common.sh   Mon Mar 30 12:19:28 2020 +0000
+++ b/tests/net/net_common.sh   Mon Mar 30 13:01:39 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: net_common.sh,v 1.39 2020/02/20 08:02:26 ozaki-r Exp $
+#      $NetBSD: net_common.sh,v 1.40 2020/03/30 13:01:39 christos Exp $
 #
 # Copyright (c) 2016 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -326,13 +326,17 @@
        if [ -n "$bus" ]; then
                atf_check -s exit:0 rump.ifconfig $ifname linkstr $bus
        fi
-       macaddr=$(get_macaddr $sock $ifname)
-       export RUMP_SERVER=$backup
 
-       if [ -f $_rump_server_macaddrs ]; then
-               atf_check -s not-exit:0 grep -q $macaddr $_rump_server_macaddrs
+       macaddr=$(get_macaddr $sock $ifname)
+       if [ -n "$macaddr" ]; then
+               if [ -f $_rump_server_macaddrs ]; then
+                       atf_check -s not-exit:0 \
+                           grep -q $macaddr $_rump_server_macaddrs
+               fi
+               echo $macaddr >> $_rump_server_macaddrs
        fi
-       echo $macaddr >> $_rump_server_macaddrs
+
+       export RUMP_SERVER=$backup
 
        echo $sock $ifname >> $_rump_server_ifaces
        $DEBUG && cat $_rump_server_ifaces



Home | Main Index | Thread Index | Old Index