Source-Changes-HG archive

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

[src/trunk]: src/tests/net/icmp send pings in ascending order



details:   https://anonhg.NetBSD.org/src/rev/41b650e5f311
branches:  trunk
changeset: 757195:41b650e5f311
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Aug 18 17:49:03 2010 +0000

description:
send pings in ascending order

diffstat:

 tests/net/icmp/t_ping.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r 656f48bde58d -r 41b650e5f311 tests/net/icmp/t_ping.c
--- a/tests/net/icmp/t_ping.c   Wed Aug 18 17:01:55 2010 +0000
+++ b/tests/net/icmp/t_ping.c   Wed Aug 18 17:49:03 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ping.c,v 1.3 2010/08/18 16:39:22 pooka Exp $ */
+/*     $NetBSD: t_ping.c,v 1.4 2010/08/18 17:49:03 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.3 2010/08/18 16:39:22 pooka Exp $");
+__RCSID("$NetBSD: t_ping.c,v 1.4 2010/08/18 17:49:03 pooka Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -278,15 +278,15 @@
        succ = 0;
 
        /* small sizes */
-       for (i = IP_MAXPACKET - 60000; i > 0; i--)
+       for (i = 0 ; i < IP_MAXPACKET - 60000; i++)
                succ += doping("1.1.1.10", 1, i);
 
        /* medium sizes */
-       for (i = IP_MAXPACKET - 100; i > IP_MAXPACKET - 60000; i -= 1000)
+       for (i = IP_MAXPACKET - 60000; i < IP_MAXPACKET - 100; i += 1000)
                succ += doping("1.1.1.10", 1, i);
 
        /* big sizes */
-       for (i = IP_MAXPACKET; i > IP_MAXPACKET - 100; i -= 10)
+       for (i = IP_MAXPACKET - 100; i < IP_MAXPACKET; i += 10)
                succ += doping("1.1.1.10", 1, i);
 
        printf("got %d/%d\n", succ, IP_MAXPACKET);



Home | Main Index | Thread Index | Old Index