Source-Changes-HG archive

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

[src/trunk]: src/tests/net/icmp Add a delay between startup of pinger and pin...



details:   https://anonhg.NetBSD.org/src/rev/2375e15ca062
branches:  trunk
changeset: 757281:2375e15ca062
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Aug 23 10:49:27 2010 +0000

description:
Add a delay between startup of pinger and pingee here too.

XXX: there's apparently some race condition which appears to trigger
if a broadcast arp arrives around the same time as the arpwhohas
is sent.  This causes original packet to never be sent by the
arpwhohas requestor.  If this rings a bell to someone, please let
me know.

diffstat:

 tests/net/icmp/t_ping.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r e3ff3c16d782 -r 2375e15ca062 tests/net/icmp/t_ping.c
--- a/tests/net/icmp/t_ping.c   Mon Aug 23 06:01:04 2010 +0000
+++ b/tests/net/icmp/t_ping.c   Mon Aug 23 10:49:27 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ping.c,v 1.6 2010/08/18 21:23:48 pooka Exp $ */
+/*     $NetBSD: t_ping.c,v 1.7 2010/08/23 10:49:27 pooka Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: t_ping.c,v 1.6 2010/08/18 21:23:48 pooka Exp $");
+__RCSID("$NetBSD: t_ping.c,v 1.7 2010/08/23 10:49:27 pooka Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -84,6 +84,8 @@
                break;
        }
 
+       usleep(500000);
+
        netcfg_rump_if(ifname, "1.1.1.20", "255.255.255.0");
 
        /*



Home | Main Index | Thread Index | Old Index