[PATCH 09/15] tests: Use global control interface to set p2p_no_group_iface

Ilan Peer ilan.peer at intel.com
Thu Apr 7 03:32:03 PDT 2016


Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 tests/hwsim/test_p2p_autogo.py      | 16 ++++++++--------
 tests/hwsim/test_p2p_concurrency.py | 16 ++++++++--------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/tests/hwsim/test_p2p_autogo.py b/tests/hwsim/test_p2p_autogo.py
index 32b8fe4..2e2fecf 100644
--- a/tests/hwsim/test_p2p_autogo.py
+++ b/tests/hwsim/test_p2p_autogo.py
@@ -83,7 +83,7 @@ def test_autogo(dev):
 
 def test_autogo2(dev):
     """P2P autonomous GO with a separate group interface and client joining group"""
-    dev[0].request("SET p2p_no_group_iface 0")
+    dev[0].global_request("SET p2p_no_group_iface 0")
     res = autogo(dev[0], freq=2437)
     if "p2p-wlan" not in res['ifname']:
         raise Exception("Unexpected group interface name on GO")
@@ -97,7 +97,7 @@ def test_autogo2(dev):
 
 def test_autogo3(dev):
     """P2P autonomous GO and client with a separate group interface joining group"""
-    dev[1].request("SET p2p_no_group_iface 0")
+    dev[1].global_request("SET p2p_no_group_iface 0")
     autogo(dev[0], freq=2462)
     res = connect_cli(dev[0], dev[1], social=True, freq=2462)
     if "p2p-wlan" not in res['ifname']:
@@ -112,8 +112,8 @@ def test_autogo3(dev):
 
 def test_autogo4(dev):
     """P2P autonomous GO and client joining group (both with a separate group interface)"""
-    dev[0].request("SET p2p_no_group_iface 0")
-    dev[1].request("SET p2p_no_group_iface 0")
+    dev[0].global_request("SET p2p_no_group_iface 0")
+    dev[1].global_request("SET p2p_no_group_iface 0")
     res1 = autogo(dev[0], freq=2412)
     res2 = connect_cli(dev[0], dev[1], social=True, freq=2412)
     if "p2p-wlan" not in res1['ifname']:
@@ -182,7 +182,7 @@ def test_autogo_fail(dev):
     go_addr = dev[0].p2p_dev_addr()
     dev[0].p2p_go_authorize_client("00000000")
 
-    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()
@@ -452,7 +452,7 @@ def test_autogo_bridge(dev):
 
 def test_presence_req_on_group_interface(dev):
     """P2P_PRESENCE_REQ on group interface"""
-    dev[1].request("SET p2p_no_group_iface 0")
+    dev[1].global_request("SET p2p_no_group_iface 0")
     res = autogo(dev[0], freq=2437)
     res = connect_cli(dev[0], dev[1], social=True, freq=2437)
     if "FAIL" in dev[1].group_request("P2P_PRESENCE_REQ 30000 102400"):
@@ -619,7 +619,7 @@ def test_go_search_non_social(dev):
 
 def test_autogo_many(dev):
     """P2P autonomous GO with large number of GO instances"""
-    dev[0].request("SET p2p_no_group_iface 0")
+    dev[0].global_request("SET p2p_no_group_iface 0")
     for i in range(100):
         if "OK" not in dev[0].global_request("P2P_GROUP_ADD freq=2412"):
             logger.info("Was able to add %d groups" % i)
@@ -785,7 +785,7 @@ def test_autogo_scan(dev):
 
 def test_autogo_join_before_found(dev):
     """P2P client joining a group before having found GO Device Address"""
-    dev[0].request("SET p2p_no_group_iface 0")
+    dev[0].global_request("SET p2p_no_group_iface 0")
     res = autogo(dev[0], freq=2412)
     if "p2p-wlan" not in res['ifname']:
         raise Exception("Unexpected group interface name on GO")
diff --git a/tests/hwsim/test_p2p_concurrency.py b/tests/hwsim/test_p2p_concurrency.py
index 0d49b25..a85b1f1 100644
--- a/tests/hwsim/test_p2p_concurrency.py
+++ b/tests/hwsim/test_p2p_concurrency.py
@@ -24,7 +24,7 @@ def test_concurrent_autogo(dev, apdev):
     hwsim_utils.test_connectivity(dev[0], hapd)
 
     logger.info("Start a P2P group while associated to an AP")
-    dev[0].request("SET p2p_no_group_iface 0")
+    dev[0].global_request("SET p2p_no_group_iface 0")
     dev[0].p2p_start_go()
     pin = dev[1].wps_read_pin()
     dev[0].p2p_go_authorize_client(pin)
@@ -61,7 +61,7 @@ def test_concurrent_autogo_5ghz_ht40(dev, apdev):
         dev[0].scan_for_bss(apdev[1]['bssid'], freq=5765)
         dev[0].connect("test-open-5", key_mgmt="NONE", scan_freq="5745")
 
-        dev[0].request("SET p2p_no_group_iface 0")
+        dev[0].global_request("SET p2p_no_group_iface 0")
         if "OK" not in dev[0].global_request("P2P_GROUP_ADD ht40"):
             raise Exception("P2P_GROUP_ADD failed")
         ev = dev[0].wait_global_event(["P2P-GROUP-STARTED"], timeout=5)
@@ -138,7 +138,7 @@ def test_concurrent_p2pcli(dev, apdev):
     hwsim_utils.test_connectivity(dev[0], hapd)
 
     logger.info("Join a P2P group while associated to an AP")
-    dev[0].request("SET p2p_no_group_iface 0")
+    dev[0].global_request("SET p2p_no_group_iface 0")
     dev[1].p2p_start_go(freq=2412)
     pin = dev[0].wps_read_pin()
     dev[1].p2p_go_authorize_client(pin)
@@ -159,7 +159,7 @@ def test_concurrent_grpform_go(dev, apdev):
     hwsim_utils.test_connectivity(dev[0], hapd)
 
     logger.info("Form a P2P group while associated to an AP")
-    dev[0].request("SET p2p_no_group_iface 0")
+    dev[0].global_request("SET p2p_no_group_iface 0")
 
     [i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=15,
                                            r_dev=dev[1], r_intent=0)
@@ -177,7 +177,7 @@ def test_concurrent_grpform_cli(dev, apdev):
     hwsim_utils.test_connectivity(dev[0], hapd)
 
     logger.info("Form a P2P group while associated to an AP")
-    dev[0].request("SET p2p_no_group_iface 0")
+    dev[0].global_request("SET p2p_no_group_iface 0")
 
     [i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=0,
                                            r_dev=dev[1], r_intent=15)
@@ -194,7 +194,7 @@ def test_concurrent_grpform_while_connecting(dev, apdev):
     dev[0].connect("test-open", key_mgmt="NONE", wait_connect=False)
 
     logger.info("Form a P2P group while connecting to an AP")
-    dev[0].request("SET p2p_no_group_iface 0")
+    dev[0].global_request("SET p2p_no_group_iface 0")
 
     [i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_freq=2412,
                                            r_dev=dev[1], r_freq=2412)
@@ -212,7 +212,7 @@ def test_concurrent_grpform_while_connecting2(dev, apdev):
     dev[1].flush_scan_cache()
 
     logger.info("Form a P2P group while connecting to an AP")
-    dev[0].request("SET p2p_no_group_iface 0")
+    dev[0].global_request("SET p2p_no_group_iface 0")
 
     [i_res, r_res] = go_neg_pbc(i_dev=dev[0], i_intent=15, i_freq=2412,
                                 r_dev=dev[1], r_intent=0, r_freq=2412)
@@ -230,7 +230,7 @@ def test_concurrent_grpform_while_connecting3(dev, apdev):
     dev[0].connect("test-open", key_mgmt="NONE", wait_connect=False)
 
     logger.info("Form a P2P group while connecting to an AP")
-    dev[0].request("SET p2p_no_group_iface 0")
+    dev[0].global_request("SET p2p_no_group_iface 0")
 
     [i_res, r_res] = go_neg_pbc(i_dev=dev[1], i_intent=15, i_freq=2412,
                                 r_dev=dev[0], r_intent=0, r_freq=2412)
-- 
1.9.1




More information about the Hostap mailing list