[PATCH 04/24] tests: Use Global and Group control interfaces in test_p2p_autogo

Ilan Peer ilan.peer
Wed Feb 4 01:30:16 PST 2015


1. In test_autogo_m2d(), in case that group interface
   is not the same as the main interface, need to use
   the group interface to listen for WPS-M2D event.
2. Similarly, in test_autogo_pbc(), use the global control
   interface to get the WPS-M2D event.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 tests/hwsim/test_p2p_autogo.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/hwsim/test_p2p_autogo.py b/tests/hwsim/test_p2p_autogo.py
index a6d9511..9e78f05 100644
--- a/tests/hwsim/test_p2p_autogo.py
+++ b/tests/hwsim/test_p2p_autogo.py
@@ -153,7 +153,7 @@ def test_autogo_m2d(dev):
     autogo(dev[0], freq=2412)
     go_addr = dev[0].p2p_dev_addr()
 
-    dev[1].request("SET p2p_no_group_iface 0")
+    dev[1].global_request("SET p2p_no_group_iface 0")
     if not dev[1].discover_peer(go_addr, social=True):
         raise Exception("GO " + go_addr + " not found")
     dev[1].dump_monitor()
@@ -183,10 +183,10 @@ def test_autogo_m2d(dev):
     if ev is None:
         raise Exception("No M2D event on group interface")
 
-    ev = dev[2].wait_global_event(["WPS-M2D"], timeout=10)
+    ev = dev[2].wait_group_event(["WPS-M2D"], timeout=10)
     if ev is None:
         raise Exception("No global M2D event (2)")
-    ev = dev[2].wait_event(["WPS-M2D"], timeout=10)
+    ev = dev[2].wait_group_event(["WPS-M2D"], timeout=10)
     if ev is None:
         raise Exception("No M2D event on group interface (2)")
 
@@ -235,7 +235,7 @@ def test_autogo_pbc(dev):
         raise Exception("WPS_PBC failed")
     dev[2].p2p_connect_group(dev[0].p2p_dev_addr(), "pbc", timeout=0,
                              social=True)
-    ev = dev[2].wait_event(["WPS-M2D"], timeout=15)
+    ev = dev[2].wait_global_event(["WPS-M2D"], timeout=15)
     if ev is None:
         raise Exception("WPS-M2D not reported")
     if "config_error=12" not in ev:
-- 
1.8.3.2




More information about the Hostap mailing list