From patchwork Thu Oct 31 07:48:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 287413 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 DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id AC44C2C03CC for ; Thu, 31 Oct 2013 18:49:04 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 7B0089C17E; Thu, 31 Oct 2013 03:49:02 -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 RtybvMl9c5nG; Thu, 31 Oct 2013 03:49:02 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 19B4B9C156; Thu, 31 Oct 2013 03:48:58 -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 185CE9C16F for ; Thu, 31 Oct 2013 03:48:57 -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 uXWgWAJiaxFT for ; Thu, 31 Oct 2013 03:48:53 -0400 (EDT) Received: from sipsolutions.net (s3.sipsolutions.net [144.76.43.152]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id DBF3B9C152 for ; Thu, 31 Oct 2013 03:48:52 -0400 (EDT) Received: by sipsolutions.net with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Vbmzr-0005EP-Nl; Thu, 31 Oct 2013 08:48:51 +0100 From: Johannes Berg To: hostap@lists.shmoo.com Subject: [PATCH 1/2] hwsim tests: silence modprobe warnings Date: Thu, 31 Oct 2013 08:48:42 +0100 Message-Id: <1383205723-1859-1-git-send-email-johannes@sipsolutions.net> X-Mailer: git-send-email 1.8.4.rc3 Cc: Johannes Berg 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: Johannes Berg If module loading isn't enabled (e.g. in VM tests) then don't try to load/unload the modules. Signed-hostap: Johannes Berg --- tests/hwsim/start.sh | 2 +- tests/hwsim/stop-wifi.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/start.sh b/tests/hwsim/start.sh index 64b089d..8dff6f7 100755 --- a/tests/hwsim/start.sh +++ b/tests/hwsim/start.sh @@ -49,7 +49,7 @@ else fi $DIR/stop-wifi.sh -sudo modprobe mac80211_hwsim radios=5 +test -f /proc/modules && sudo modprobe mac80211_hwsim radios=5 if [ "$CONCURRENT" = "y" ]; then sudo iw wlan0 interface add sta0 type station sudo iw wlan1 interface add sta1 type station diff --git a/tests/hwsim/stop-wifi.sh b/tests/hwsim/stop-wifi.sh index eaa9d4e..d578b5b 100755 --- a/tests/hwsim/stop-wifi.sh +++ b/tests/hwsim/stop-wifi.sh @@ -67,7 +67,7 @@ for i in /tmp/wpas-wlan0 /tmp/wpas-wlan1 /tmp/wpas-wlan2 /var/run/hostapd-global fi done -if grep -q mac80211_hwsim /proc/modules ; then +if grep -q mac80211_hwsim /proc/modules 2>/dev/null ; then sudo rmmod mac80211_hwsim sudo rmmod mac80211 sudo rmmod cfg80211