[PATCH 02/24] tests: Use global control interface in test_wpas_ctrl_global()

Ilan Peer ilan.peer at intel.com
Wed Feb 4 04:30:14 EST 2015


Use the global control interface to set/get the status of the
P2P Device.

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

diff --git a/tests/hwsim/test_wpas_ctrl.py b/tests/hwsim/test_wpas_ctrl.py
index eb32206..203c9f8 100644
--- a/tests/hwsim/test_wpas_ctrl.py
+++ b/tests/hwsim/test_wpas_ctrl.py
@@ -1073,13 +1073,13 @@ def test_wpas_ctrl_global(dev):
     if "FAIL" not in wpas.global_request("SET foo 1"):
         raise Exception("SET succeeded unexpectedly")
 
-    if "p2p_state=IDLE" not in wpas.global_request("STATUS"):
+    if "p2p_state=IDLE" not in dev[0].global_request("STATUS"):
         raise Exception("P2P was disabled")
-    wpas.request("P2P_SET disabled 1")
-    if "p2p_state=DISABLED" not in wpas.global_request("STATUS"):
+    dev[0].global_request("P2P_SET disabled 1")
+    if "p2p_state=DISABLED" not in dev[0].global_request("STATUS"):
         raise Exception("P2P was not disabled")
-    wpas.request("P2P_SET disabled 0")
-    if "p2p_state=IDLE" not in wpas.global_request("STATUS"):
+    dev[0].global_request("P2P_SET disabled 0")
+    if "p2p_state=IDLE" not in dev[0].global_request("STATUS"):
         raise Exception("P2P was not enabled")
 
     # driver_nl80211.c does not support interface list, so do not fail because
-- 
1.8.3.2



More information about the HostAP mailing list