Source-Changes-HG archive

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

[src/trunk]: src/tests/net Provide a more robust regexp for time formats of 1...



details:   https://anonhg.NetBSD.org/src/rev/768d3b880e99
branches:  trunk
changeset: 351884:768d3b880e99
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Mar 03 07:34:04 2017 +0000

description:
Provide a more robust regexp for time formats of 1day-ish

diffstat:

 tests/net/ndp/t_ndp.sh  |   4 ++--
 tests/net/ndp/t_ra.sh   |  12 ++++++------
 tests/net/net_common.sh |   3 ++-
 3 files changed, 10 insertions(+), 9 deletions(-)

diffs (89 lines):

diff -r 421d83ae598b -r 768d3b880e99 tests/net/ndp/t_ndp.sh
--- a/tests/net/ndp/t_ndp.sh    Fri Mar 03 07:32:36 2017 +0000
+++ b/tests/net/ndp/t_ndp.sh    Fri Mar 03 07:34:04 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ndp.sh,v 1.17 2016/11/25 08:51:17 ozaki-r Exp $
+#      $NetBSD: t_ndp.sh,v 1.18 2017/03/03 07:34:04 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -137,7 +137,7 @@
        $DEBUG && rump.ndp -n -a
        atf_check -s exit:0 -o match:'permanent' rump.ndp -n $IP6SRC
        # Expired but remains until GC sweaps it (1 day)
-       atf_check -s exit:0 -o match:'(1d0h0m|23h59m)' rump.ndp -n $IP6DST
+       atf_check -s exit:0 -o match:"$ONEDAYISH" rump.ndp -n $IP6DST
 
        rump_server_destroy_ifaces
 }
diff -r 421d83ae598b -r 768d3b880e99 tests/net/ndp/t_ra.sh
--- a/tests/net/ndp/t_ra.sh     Fri Mar 03 07:32:36 2017 +0000
+++ b/tests/net/ndp/t_ra.sh     Fri Mar 03 07:34:04 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ra.sh,v 1.25 2017/02/22 03:03:37 ozaki-r Exp $
+#      $NetBSD: t_ra.sh,v 1.26 2017/03/03 07:34:04 ozaki-r Exp $
 #
 # Copyright (c) 2015 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -147,7 +147,7 @@
        atf_check -s exit:0 -o match:"${ll_srv}%shmif0 \(reachable\)" rump.ndp -p
        atf_check -s exit:0 -o match:'linkmtu=1300' rump.ndp -n -i shmif0
        atf_check -s exit:0 \
-           -o match:"$ll_srv%shmif0 +$mac_srv +shmif0 +(23h59m|1d0h0m)..s S R" \
+           -o match:"$ll_srv%shmif0 +$mac_srv +shmif0 +$ONEDAYISH S R" \
            rump.ndp -n -a
        atf_check -s exit:0 -o match:$addr_prefix rump.ndp -n -a
        atf_check -s exit:0 \
@@ -276,7 +276,7 @@
        atf_check -s exit:0 -o match:'if=shmif0' rump.ndp -r
        atf_check -s exit:0 -o empty rump.ndp -p
        atf_check -s exit:0 -o match:'linkmtu=1300' rump.ndp -n -i shmif0
-       atf_check -s exit:0 -o match:'(23h59m|1d0h0m)..s S R' rump.ndp -n -a
+       atf_check -s exit:0 -o match:"$ONEDAYISH S R" rump.ndp -n -a
        atf_check -s exit:0 -o match:'fc00:1:' rump.ndp -n -a
        atf_check -s exit:0 -o not-match:'fc00:1:' rump.ifconfig shmif0 inet6
        unset RUMP_SERVER
@@ -334,7 +334,7 @@
        atf_check -s exit:0 -o empty rump.ndp -r
        atf_check -s exit:0 -o match:'No advertising router' rump.ndp -p
        atf_check -s exit:0 -o match:'linkmtu=1300' rump.ndp -n -i shmif0
-       atf_check -s exit:0 -o match:'(23h59m|1d0h0m)..s S R' rump.ndp -n -a
+       atf_check -s exit:0 -o match:"$ONEDAYISH S R" rump.ndp -n -a
        atf_check -s exit:0 -o match:'fc00:1:' rump.ndp -n -a
        atf_check -s exit:0 -o match:'fc00:1:' rump.ifconfig shmif0 inet6
        unset RUMP_SERVER
@@ -762,7 +762,7 @@
        atf_check -s exit:0 -o not-match:'if=shmif0' rump.ndp -r
        atf_check -s exit:0 -o match:'No advertising router' rump.ndp -p
        atf_check -s exit:0 -o match:'linkmtu=1300' rump.ndp -n -i shmif0
-       atf_check -s exit:0 -o match:'(23h59m|1d0h0m)..s S R' rump.ndp -n -a
+       atf_check -s exit:0 -o match:"$ONEDAYISH S R" rump.ndp -n -a
        atf_check -s exit:0 -o match:'fc00:1:' rump.ndp -n -a
        atf_check -s exit:0 -o match:'fc00:1:' rump.ifconfig shmif0 inet6
        unset RUMP_SERVER
@@ -827,7 +827,7 @@
        atf_check -s exit:0 -o match:'if=shmif0' rump.ndp -r
        atf_check -s exit:0 -o empty rump.ndp -p
        atf_check -s exit:0 -o match:'linkmtu=1300' rump.ndp -n -i shmif0
-       atf_check -s exit:0 -o match:'(23h59m|1d0h0m)..s S R' rump.ndp -n -a
+       atf_check -s exit:0 -o match:"$ONEDAYISH S R" rump.ndp -n -a
        atf_check -s exit:0 -o match:'fc00:1:' rump.ndp -n -a
        atf_check -s exit:0 -o not-match:'fc00:1:' rump.ifconfig shmif0 inet6
        unset RUMP_SERVER
diff -r 421d83ae598b -r 768d3b880e99 tests/net/net_common.sh
--- a/tests/net/net_common.sh   Fri Mar 03 07:32:36 2017 +0000
+++ b/tests/net/net_common.sh   Fri Mar 03 07:34:04 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: net_common.sh,v 1.12 2017/02/16 08:12:47 ozaki-r Exp $
+#      $NetBSD: net_common.sh,v 1.13 2017/03/03 07:34:04 ozaki-r Exp $
 #
 # Copyright (c) 2016 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -31,6 +31,7 @@
 
 HIJACKING="env LD_PRELOAD=/usr/lib/librumphijack.so \
     RUMPHIJACK=path=/rump,socket=all:nolocal,sysctl=yes"
+ONEDAYISH="(23h5[0-9]m|1d0h0m)[0-9]+s"
 
 extract_new_packets()
 {



Home | Main Index | Thread Index | Old Index