Patchwork [V2,00/23] P2P: support nl80211 P2P_DEVICE interface

login
register
mail settings
Submitter Arend van Spriel
Date May 29, 2013, 10:12 a.m.
Message ID <51A5D48E.9000809@broadcom.com>
Download mbox | patch
Permalink /patch/247219/
State Not Applicable
Headers show

Comments

Arend van Spriel - May 29, 2013, 10:12 a.m.
On 05/29/2013 11:07 AM, Arend van Spriel wrote:
> Also ran the hwsim tests 'test_p2p_*.py' with some modifications,
> because P2P events are now sent to a different control interface.

Executed the P2P tests on 3.10-rc1 kernel with the attached patch 
applied to hwsim tests. Two test cases are failing:

passed 10 test case(s)
failed tests: ['test_grpform2', 'test_autogo_tdls']

Also tried with hostap/master:

passed 9 test case(s)
failed tests: ['test_discovery_group_client', 'test_grpform2', 
'test_autogo_tdls']

Regards,
Arend
From 1f3d3f45946ffa8d223f2b1dafcb7a7bf05a0ac0 Mon Sep 17 00:00:00 2001
From: Arend van Spriel <arend@broadcom.com>
Date: Wed, 29 May 2013 12:01:06 +0200
Subject: [PATCH] tests: hwsim: hack test scripts to verify P2P functionality

This is just a quick hack that should not be applied. Just to
show what was done to execute the tests with P2P_DEVICE support.

Signed-hostap: Arend van Spriel <arend@broadcom.com>
---
 tests/hwsim/run-tests.py |    8 ++++----
 tests/hwsim/start.sh     |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
Jouni Malinen - June 30, 2013, 9:49 p.m.
On Wed, May 29, 2013 at 12:12:30PM +0200, Arend van Spriel wrote:
> On 05/29/2013 11:07 AM, Arend van Spriel wrote:
> >Also ran the hwsim tests 'test_p2p_*.py' with some modifications,
> >because P2P events are now sent to a different control interface.
> 
> Executed the P2P tests on 3.10-rc1 kernel with the attached patch
> applied to hwsim tests. Two test cases are failing:

This is a good example of why the new p2p-dev-* control interface was
not a good thing to have.. I converted the test scripts to use the
global control interface for P2P operations and this allows both designs
to be used.

> passed 10 test case(s)
> failed tests: ['test_grpform2', 'test_autogo_tdls']
> 
> Also tried with hostap/master:
> 
> passed 9 test case(s)
> failed tests: ['test_discovery_group_client', 'test_grpform2',
> 'test_autogo_tdls']

test_autogo_tdls is still failing due to the hack it uses to build a P2P
persistent group entry. I guess something else needs to be done here
(e.g., another hack to push that network profile to the p2pdev
interface). The other test cases should now pass with both the
driver_param=p2p_device=1 (i.e., with the dedicated P2P_DEVICE) and
without this (wlan# netdev for P2P management operations).

Patch

diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py
index 7bdd414..a525e42 100755
--- a/tests/hwsim/run-tests.py
+++ b/tests/hwsim/run-tests.py
@@ -49,9 +49,9 @@  def main():
     else:
         test_filter = None
 
-    dev0 = WpaSupplicant('wlan0')
-    dev1 = WpaSupplicant('wlan1')
-    dev2 = WpaSupplicant('wlan2')
+    dev0 = WpaSupplicant('p2p-dev-wlan0')
+    dev1 = WpaSupplicant('p2p-dev-wlan1')
+    dev2 = WpaSupplicant('p2p-dev-wlan2')
     dev = [ dev0, dev1, dev2 ]
     apdev = [ ]
     apdev.append({"ifname": 'wlan3', "bssid": "02:00:00:00:03:00"})
@@ -67,7 +67,7 @@  def main():
 
     tests = []
     for t in os.listdir("."):
-        m = re.match(r'(test_.*)\.py$', t)
+        m = re.match(r'(test_p2p.*)\.py$', t)
         if m:
             if test_file and test_file not in t:
                 continue
diff --git a/tests/hwsim/start.sh b/tests/hwsim/start.sh
index 9a76ecb..f9789c8 100755
--- a/tests/hwsim/start.sh
+++ b/tests/hwsim/start.sh
@@ -6,7 +6,7 @@  HAPD=$DIR/../../hostapd/hostapd
 WLANTEST=$DIR/../../wlantest/wlantest
 
 $DIR/stop-wifi.sh
-sudo modprobe mac80211_hwsim radios=5
+sudo modprobe mac80211_hwsim radios=5 channels=2
 mkdir -p $DIR/logs
 DATE=`date +%s`
 sudo ifconfig hwsim0 up