Source-Changes-HG archive

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

[src/trunk]: src/tests/net/arp Reflect the current ARP cache implementation i...



details:   https://anonhg.NetBSD.org/src/rev/091c6fddc624
branches:  trunk
changeset: 810461:091c6fddc624
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Mon Aug 31 08:08:20 2015 +0000

description:
Reflect the current ARP cache implementation in tests

net.inet.arp.prune and net.inet.arp.refresh were obsoleted.

diffstat:

 tests/net/arp/t_arp.sh |  21 +++++++--------------
 1 files changed, 7 insertions(+), 14 deletions(-)

diffs (96 lines):

diff -r 689bbaca74a3 -r 091c6fddc624 tests/net/arp/t_arp.sh
--- a/tests/net/arp/t_arp.sh    Mon Aug 31 08:06:30 2015 +0000
+++ b/tests/net/arp/t_arp.sh    Mon Aug 31 08:08:20 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_arp.sh,v 1.8 2015/08/13 10:22:21 ozaki-r Exp $
+#      $NetBSD: t_arp.sh,v 1.9 2015/08/31 08:08:20 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -87,16 +87,12 @@
 
 setup_src_server()
 {
-       local prune=$1
-       local keep=$2
+       local keep=$1
 
        export RUMP_SERVER=$SOCKSRC
 
        # Adjust ARP parameters
-       atf_check -s exit:0 -o ignore rump.sysctl -w net.inet.arp.prune=$prune
        atf_check -s exit:0 -o ignore rump.sysctl -w net.inet.arp.keep=$keep
-       # Don't refresh to test expiration easily
-       atf_check -s exit:0 -o ignore rump.sysctl -w net.inet.arp.refresh=0
 
        # Setup an interface
        atf_check -s exit:0 rump.ifconfig shmif0 create
@@ -114,7 +110,6 @@
 
 test_cache_expiration()
 {
-       local arp_prune=1
        local arp_keep=$1
        local bonus=2
 
@@ -122,7 +117,7 @@
        atf_check -s exit:0 ${inetserver} $SOCKDST
 
        setup_dst_server
-       setup_src_server $arp_prune $arp_keep
+       setup_src_server $arp_keep
 
        #
        # Check if a cache is expired expectedly
@@ -135,7 +130,7 @@
        # Should be cached
        atf_check -s exit:0 -o ignore rump.arp -n $IP4DST
 
-       atf_check -s exit:0 sleep $(($arp_keep + $arp_prune + $bonus))
+       atf_check -s exit:0 sleep $(($arp_keep + $bonus))
 
        $DEBUG && rump.arp -n -a
        atf_check -s exit:0 -o ignore rump.arp -n $IP4SRC
@@ -155,7 +150,6 @@
 
 command_body()
 {
-       local arp_prune=1
        local arp_keep=5
        local bonus=2
 
@@ -163,7 +157,7 @@
        atf_check -s exit:0 ${inetserver} $SOCKDST
 
        setup_dst_server
-       setup_src_server $arp_prune $arp_keep
+       setup_src_server $arp_keep
 
        export RUMP_SERVER=$SOCKSRC
 
@@ -224,7 +218,7 @@
        atf_check -s exit:0 -o not-match:'permanent' rump.arp -n 10.0.1.10
 
        # Hm? the cache doesn't expire...
-       atf_check -s exit:0 sleep $(($arp_keep + $arp_prune + $bonus))
+       atf_check -s exit:0 sleep $(($arp_keep + $bonus))
        $DEBUG && rump.arp -n -a
        #atf_check -s not-exit:0 -e ignore rump.arp -n 10.0.1.10
 
@@ -279,7 +273,6 @@
 
 cache_overwriting_body()
 {
-       local arp_prune=1
        local arp_keep=5
        local bonus=2
 
@@ -287,7 +280,7 @@
        atf_check -s exit:0 ${inetserver} $SOCKDST
 
        setup_dst_server
-       setup_src_server $arp_prune $arp_keep
+       setup_src_server $arp_keep
 
        export RUMP_SERVER=$SOCKSRC
 



Home | Main Index | Thread Index | Old Index