From owner-svn-src-projects@FreeBSD.ORG Tue Jul 31 13:11:21 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB47D106564A; Tue, 31 Jul 2012 13:11:21 +0000 (UTC) (envelope-from monthadar@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D4D28FC15; Tue, 31 Jul 2012 13:11:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6VDBLeU030276; Tue, 31 Jul 2012 13:11:21 GMT (envelope-from monthadar@svn.freebsd.org) Received: (from monthadar@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6VDBLGR030274; Tue, 31 Jul 2012 13:11:21 GMT (envelope-from monthadar@svn.freebsd.org) Message-Id: <201207311311.q6VDBLGR030274@svn.freebsd.org> From: Monthadar Al Jaberi Date: Tue, 31 Jul 2012 13:11:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238946 - projects/net80211_testsuite/wtap/009 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 13:11:21 -0000 Author: monthadar Date: Tue Jul 31 13:11:20 2012 New Revision: 238946 URL: http://svn.freebsd.org/changeset/base/238946 Log: Modified test 9 to test ping between each node at the end. Modified: projects/net80211_testsuite/wtap/009/test.sh Modified: projects/net80211_testsuite/wtap/009/test.sh ============================================================================== --- projects/net80211_testsuite/wtap/009/test.sh Tue Jul 31 11:31:12 2012 (r238945) +++ projects/net80211_testsuite/wtap/009/test.sh Tue Jul 31 13:11:20 2012 (r238946) @@ -48,6 +48,8 @@ It: * node A filters out B with ACL deny policy * node B should not flood with PEER OPEN +* node A changed ACL policy to open +* does a ping test from each node to each other node. EOL } @@ -101,19 +103,47 @@ run() { NBR_TESTS=1 NBR_FAIL=0 - cmd sleep 10 + # chicken egg problem, this is default value + cmd sleep 5 #net.wlan.mesh.backofftimeout=5 n="`expr ${NBR_NODES} - 1`" for i in `seq 0 ${n}`; do vnet="`expr ${i} + 1`" cmd cat /dev/wtap${i} > wtap${i}.debug done - TMP=`cat wtap${i}.debug | grep "send PEER OPEN" | wc -l` + TMP=`cat wtap${i}.debug | grep "OPEN SENT -> HOLDING" | wc -l` - if [ $TMP -gt "3" ]; then # 3 is just random, should read from sysctl. + NBR_HOLDING="2" #net.wlan.mesh.maxholding=2 + + if [ $TMP -gt "$NBR_HOLDING" ]; then info "node B is flooding!" NBR_FAIL="`expr ${NBR_FAIL} + 1`" fi + # Now remove ACL policy and see if we can ping + cmd jexec 1 ifconfig wlan0 mac:open + + # Test connectivity from each node to each other node + for i in `seq 1 ${NBR_NODES}`; do + for j in `seq 1 ${NBR_NODES}`; do + if [ "$i" != "$j" ]; then + # From vimage '$i' to vimage '$j'.. + info "Checking ${i} -> ${j}.." + NBR_TESTS="`expr ${NBR_TESTS} + 1`" + # Return after a single successful packet + cmd jexec $i ping -q -t 5 -c 5 \ + -o ${IP_SUBNET}${j} + + if [ "$?" = "0" ]; then + info "CHECK: ${i} -> ${j}: SUCCESS" + else + info "CHECK: ${i} -> ${j}: FAILURE" + NBR_FAIL="`expr ${NBR_FAIL} + 1`" + fi + fi + done + done + + if [ $NBR_FAIL = 0 ]; then info "ALL TESTS PASSED" TEST_RESULT=0