From patchwork Tue Jun 10 17:50:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 358093 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BF56014007B for ; Wed, 11 Jun 2014 04:46:51 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 68F199D0C7; Tue, 10 Jun 2014 14:46:48 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pDY+2gaM7SzH; Tue, 10 Jun 2014 14:46:48 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 21BD99D0D0; Tue, 10 Jun 2014 14:46:30 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id D977A9C1AA for ; Tue, 10 Jun 2014 14:46:28 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YJQXRK0BrN0T for ; Tue, 10 Jun 2014 14:46:24 -0400 (EDT) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 43EFE9C1B2 for ; Tue, 10 Jun 2014 14:46:23 -0400 (EDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 10 Jun 2014 11:41:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="4.98,1010,1392192000"; d="scan'208"; a="545850556" Received: from unknown (HELO ipeer-e6430-1.jer.intel.com) ([10.12.217.176]) by fmsmga001.fm.intel.com with ESMTP; 10 Jun 2014 11:46:20 -0700 From: Ilan Peer To: hostap@lists.shmoo.com Subject: [PATCH 01/14] tests: Add channels argument to run-all.sh and start.sh Date: Tue, 10 Jun 2014 20:50:29 +0300 Message-Id: <1402422642-16690-2-git-send-email-ilan.peer@intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1402422642-16690-1-git-send-email-ilan.peer@intel.com> References: <1402422642-16690-1-git-send-email-ilan.peer@intel.com> Cc: Haim Dreyfuss X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com From: Haim Dreyfuss Add an option to run-all.sh and start.sh to get as an argument the number of concurrent channels that mac80211_hwsim will be loaded with. To start mac80211_hwsim with more than one channel, the following parameter should be added to command line: channels= The default is one channel (no concurrent channels). The driver should be loaded with multi channel support in order to run some tests. Signed-off-by: Haim Dreyfuss --- tests/hwsim/README | 8 ++++++++ tests/hwsim/run-all.sh | 9 ++++++++- tests/hwsim/start.sh | 11 ++++++++++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/README b/tests/hwsim/README index 734ed9f..b31deb4 100644 --- a/tests/hwsim/README +++ b/tests/hwsim/README @@ -146,6 +146,9 @@ conditions: # run normal test cases with Linux tracing ./run-all.sh trace +# run normal test cases with multi channel support (see details below) +./run-all.sh channels= + run-all.sh directs debug logs into the logs subdirectory (or $LOGDIR if present in the environment). Log file names include the current UNIX timestamp and a postfix to identify the specific log: @@ -170,6 +173,11 @@ used to specify that all test cases from a single file are to be run. Test name as the last command line argument can be specified that a single test case is to be run (e.g., "./run-tests.py ap_pmf_required"). +Notice that some tests require the driver to support concurrent operation on +multi channels in order to run. These tests will be skipped in case the driver +does not support multi channels. +To enable support for multi channel, the number of channel supported should be +passed as an argument to run-all.sh or start.sh Adding/modifying test cases --------------------------- diff --git a/tests/hwsim/run-all.sh b/tests/hwsim/run-all.sh index 9b556a3..2598557 100755 --- a/tests/hwsim/run-all.sh +++ b/tests/hwsim/run-all.sh @@ -43,7 +43,14 @@ else unset TRACE_ARGS fi -if ! ./start.sh $VALGRIND $TRACE; then +NUM_CH=$1 +if [ x${NUM_CH%=[0-9]*} = "xchannels" ]; then + shift +else + unset NUM_CH +fi + +if ! ./start.sh $VALGRIND $TRACE $NUM_CH; then if ! [ -z "$LOGBASEDIR" ] ; then echo "Could not start test environment" > $LOGDIR/run fi diff --git a/tests/hwsim/start.sh b/tests/hwsim/start.sh index a130ec1..30a7b01 100755 --- a/tests/hwsim/start.sh +++ b/tests/hwsim/start.sh @@ -68,7 +68,16 @@ else fi $DIR/stop.sh -test -f /proc/modules && sudo modprobe mac80211_hwsim radios=6 + +TMP=$1 +if [ x${TMP%=[0-9]*} = "xchannels" ]; then + NUM_CH=${TMP#channels=} + shift +else + NUM_CH=1 +fi + +test -f /proc/modules && sudo modprobe mac80211_hwsim radios=6 channels=$NUM_CH sudo ifconfig hwsim0 up sudo $WLANTEST -i hwsim0 -n $LOGDIR/hwsim0.pcapng -c -dt -L $LOGDIR/hwsim0 & for i in 0 1 2; do