Source-Changes-HG archive

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

[src/trunk]: src/tests/net/if_pppoe fix accidentally if_pppoe atf failure dep...



details:   https://anonhg.NetBSD.org/src/rev/932ea1817a79
branches:  trunk
changeset: 819632:932ea1817a79
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Mon Dec 12 09:56:58 2016 +0000

description:
fix accidentally if_pppoe atf failure depends on cpu workload.

advised by s-yamaguchi@IIJ, thanks.

diffstat:

 tests/net/if_pppoe/t_pppoe.sh |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r e6f037a8f084 -r 932ea1817a79 tests/net/if_pppoe/t_pppoe.sh
--- a/tests/net/if_pppoe/t_pppoe.sh     Mon Dec 12 04:20:31 2016 +0000
+++ b/tests/net/if_pppoe/t_pppoe.sh     Mon Dec 12 09:56:58 2016 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_pppoe.sh,v 1.14 2016/12/02 06:19:50 knakahara Exp $
+#      $NetBSD: t_pppoe.sh,v 1.15 2016/12/12 09:56:58 knakahara Exp $
 #
 # Copyright (c) 2016 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -114,8 +114,14 @@
        local n=$WAITTIME
 
        for i in $(seq $n); do
-               $HIJACKING pppoectl -d pppoe0 | grep -q "state = session"
-               [ $? -eq 0 ] || return
+               $HIJACKING pppoectl -d pppoe0 | grep -q "state = initial"
+               [ $? = 0 ] && return
+               # If PPPoE client is disconnected by PPPoE server and then
+               # the client kicks callout of pppoe_timeout(), the client
+               # state is changed to PPPOE_STATE_PADI_SENT while padi retrying.
+               $HIJACKING pppoectl -d pppoe0 | grep -q "state = PADI sent"
+               [ $? = 0 ] && return
+
                sleep 1
        done
 



Home | Main Index | Thread Index | Old Index