Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/net tests: abort if MAC address duplication found
details: https://anonhg.NetBSD.org/src/rev/beb3f677d24e
branches: trunk
changeset: 1007459:beb3f677d24e
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Thu Feb 20 08:02:26 2020 +0000
description:
tests: abort if MAC address duplication found
diffstat:
tests/net/net_common.sh | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (39 lines):
diff -r 701d4ab3ac6d -r beb3f677d24e tests/net/net_common.sh
--- a/tests/net/net_common.sh Thu Feb 20 07:58:19 2020 +0000
+++ b/tests/net/net_common.sh Thu Feb 20 08:02:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: net_common.sh,v 1.38 2020/02/20 07:58:19 ozaki-r Exp $
+# $NetBSD: net_common.sh,v 1.39 2020/02/20 08:02:26 ozaki-r Exp $
#
# Copyright (c) 2016 Internet Initiative Japan Inc.
# All rights reserved.
@@ -183,6 +183,7 @@
_rump_server_socks=./.__socks
_rump_server_ifaces=./.__ifaces
_rump_server_buses=./.__buses
+_rump_server_macaddrs=./.__macaddrs
DEBUG_SYSCTL_ENTRIES="net.inet.arp.debug net.inet6.icmp6.nd6_debug \
net.inet.ipsec.debug"
@@ -318,14 +319,21 @@
local ifname=$2
local bus=$3
local backup=$RUMP_SERVER
+ local macaddr=
export RUMP_SERVER=$sock
atf_check -s exit:0 rump.ifconfig $ifname create
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
+ fi
+ echo $macaddr >> $_rump_server_macaddrs
+
echo $sock $ifname >> $_rump_server_ifaces
$DEBUG && cat $_rump_server_ifaces
Home |
Main Index |
Thread Index |
Old Index