[PATCH 14/14] tests: Modify persistent_group_profile_add() test

Ilan Peer ilan.peer
Wed Oct 14 08:43:20 PDT 2015


From: Avraham Stern <avraham.stern at intel.com>

Add the persistent group profile on the global control interface
to support configurations that use a dedicated P2P Device interface.

Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
 tests/hwsim/test_p2p_persistent.py | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/hwsim/test_p2p_persistent.py b/tests/hwsim/test_p2p_persistent.py
index 048a6dc..975bb1e 100644
--- a/tests/hwsim/test_p2p_persistent.py
+++ b/tests/hwsim/test_p2p_persistent.py
@@ -636,11 +636,13 @@ def test_persistent_group_missed_inv_resp(dev):
 def test_persistent_group_profile_add(dev):
     """Create a P2P persistent group with ADD_NETWORK"""
     passphrase="passphrase here"
-    id = dev[0].add_network()
-    dev[0].set_network_quoted(id, "ssid", "DIRECT-ab")
-    dev[0].set_network_quoted(id, "psk", passphrase)
-    dev[0].set_network(id, "mode", "3")
-    dev[0].set_network(id, "disabled", "2")
+    id = dev[0].global_request("ADD_NETWORK")
+    if "FAIL" in id:
+	raise Exception("ADD_NETWORK failed")
+    dev[0].global_request("SET_NETWORK " + id + " " + 'ssid "DIRECT-ab"')
+    dev[0].global_request("SET_NETWORK " + id + " " + "psk " + '"' + passphrase + '"')
+    dev[0].global_request("SET_NETWORK " + id + " " + "mode 3")
+    dev[0].global_request("SET_NETWORK " + id + " " + "disabled 2")
     dev[0].p2p_start_go(persistent=id, freq=2412)
 
     pin = dev[1].wps_read_pin()
-- 
1.9.1




More information about the Hostap mailing list