]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: ctrl_iface LEVEL command
authorJouni Malinen <j@w1.fi>
Sun, 6 Apr 2014 12:16:24 +0000 (15:16 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 6 Apr 2014 21:55:38 +0000 (00:55 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_wpas_ctrl.py

index 193b9815c756e9b318fcfff40b02d0a41b5d01e4..c107df205e1bd63b73cc36d2615d96c31d90a7bc 100644 (file)
@@ -370,3 +370,18 @@ def test_wpas_ctrl_set_wps_params(dev):
     for t in ts:
         if "OK" not in dev[2].request("SET " + t):
             raise Exception("SET failed for: " + t)
+
+def test_wpas_ctrl_level(dev):
+    """wpa_supplicant ctrl_iface LEVEL"""
+    try:
+        if "FAIL" not in dev[2].request("LEVEL 3"):
+            raise Exception("Unexpected LEVEL success")
+        if "OK" not in dev[2].mon.request("LEVEL 2"):
+            raise Exception("Unexpected LEVEL failure")
+        dev[2].request("SCAN freq=2412")
+        ev = dev[2].wait_event(["State:"], timeout=5)
+        if ev is None:
+            raise Exception("No debug message received")
+        dev[2].wait_event(["CTRL-EVENT-SCAN-RESULTS"], timeout=5)
+    finally:
+        dev[2].mon.request("LEVEL 3")