]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: D-Bus scan trigger and abort
authorJouni Malinen <j@w1.fi>
Sun, 7 May 2017 17:59:44 +0000 (20:59 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 7 May 2017 19:08:43 +0000 (22:08 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_dbus.py

index 994731537525fa4e70b5fc0c0ed5f90d71ee75fe..b906f3d80340b5e43c85215ae04ca00c4fe97418 100644 (file)
@@ -1166,6 +1166,24 @@ def test_dbus_scan_busy(dev, apdev):
     if ev is None:
         raise Exception("Scan timed out")
 
+def test_dbus_scan_abort(dev, apdev):
+    """D-Bus scan trigger and abort"""
+    (bus,wpas_obj,path,if_obj) = prepare_dbus(dev[0])
+    iface = dbus.Interface(if_obj, WPAS_DBUS_IFACE)
+
+    iface.Scan({'Type': 'active', 'AllowRoam': False})
+    ev = dev[0].wait_event(["CTRL-EVENT-SCAN-STARTED"], 15)
+    if ev is None:
+        raise Exception("Scan start timed out")
+
+    iface.AbortScan()
+    iface.Scan({'Type': 'active', 'AllowRoam': False})
+    iface.AbortScan()
+
+    ev = dev[0].wait_event(["CTRL-EVENT-SCAN-RESULTS"], 15)
+    if ev is None:
+        raise Exception("Scan timed out")
+
 def test_dbus_connect(dev, apdev):
     """D-Bus AddNetwork and connect"""
     (bus,wpas_obj,path,if_obj) = prepare_dbus(dev[0])