Source-Changes-HG archive

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

[src/bouyer-socketcan]: src/tests/net/can Decrease timeout from 2 to 1 second...



details:   https://anonhg.NetBSD.org/src/rev/e81f5666c9a7
branches:  bouyer-socketcan
changeset: 820822:e81f5666c9a7
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Feb 05 11:44:17 2017 +0000

description:
Decrease timeout from 2 to 1 second. Speeds up the tests where timeout is
the expected case, and it should still be enough to get the looped back
packet.

diffstat:

 tests/net/can/h_canutils.c |  12 ++++++------
 tests/net/can/t_can.c      |   8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diffs (69 lines):

diff -r 46c81238cd24 -r e81f5666c9a7 tests/net/can/h_canutils.c
--- a/tests/net/can/h_canutils.c        Sun Feb 05 10:56:12 2017 +0000
+++ b/tests/net/can/h_canutils.c        Sun Feb 05 11:44:17 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: h_canutils.c,v 1.1.2.1 2017/02/04 22:26:16 bouyer Exp $        */
+/*     $NetBSD: h_canutils.c,v 1.1.2.2 2017/02/05 11:44:17 bouyer Exp $        */
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: h_canutils.c,v 1.1.2.1 2017/02/04 22:26:16 bouyer Exp $");
+__RCSID("$NetBSD: h_canutils.c,v 1.1.2.2 2017/02/05 11:44:17 bouyer Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -100,8 +100,8 @@
        memset(cf,  0, sizeof(struct can_frame));
        FD_ZERO(&rfds);
        FD_SET(s, &rfds);
-       /* we should receive no message; wait for 2 seconds */
-       tmout.tv_sec = 2;
+       /* wait 1 second for the message (in some tests we expect no message) */
+       tmout.tv_sec = 1;
        tmout.tv_usec = 0;
        rv = rump_sys_select(s + 1, &rfds, NULL, NULL, &tmout);
        switch(rv) {
@@ -138,8 +138,8 @@
        memset(cf,  0, sizeof(struct can_frame));
        FD_ZERO(&rfds);
        FD_SET(s, &rfds);
-       /* we should receive no message; wait for 2 seconds */
-       tmout.tv_sec = 2;
+       /* wait 1 second for the message (in some tests we expect no message) */
+       tmout.tv_sec = 1;
        tmout.tv_usec = 0;
        rv = rump_sys_select(s + 1, &rfds, NULL, NULL, &tmout);
        switch(rv) {
diff -r 46c81238cd24 -r e81f5666c9a7 tests/net/can/t_can.c
--- a/tests/net/can/t_can.c     Sun Feb 05 10:56:12 2017 +0000
+++ b/tests/net/can/t_can.c     Sun Feb 05 11:44:17 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_can.c,v 1.1.2.3 2017/02/04 22:26:16 bouyer Exp $     */
+/*     $NetBSD: t_can.c,v 1.1.2.4 2017/02/05 11:44:17 bouyer Exp $     */
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: t_can.c,v 1.1.2.3 2017/02/04 22:26:16 bouyer Exp $");
+__RCSID("$NetBSD: t_can.c,v 1.1.2.4 2017/02/05 11:44:17 bouyer Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -835,8 +835,8 @@
        FD_ZERO(&rfds);
        FD_SET(s1, &rfds);
        FD_SET(s2, &rfds);
-       /* we should receive no message; wait for 2 seconds */
-       tmout.tv_sec = 2;
+       /* we should receive no message; wait for 1 seconds */
+       tmout.tv_sec = 1;
        tmout.tv_usec = 0;
        rv1 = rump_sys_select(MAX(s1,s2) + 1, &rfds, NULL, NULL, &tmout);
        switch(rv1) {



Home | Main Index | Thread Index | Old Index