]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: RADIO_WORK timeout
authorJouni Malinen <j@w1.fi>
Fri, 11 Apr 2014 22:06:09 +0000 (01:06 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 13 Apr 2014 07:26:52 +0000 (10:26 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_radio_work.py

index 1903cd47b63b0bb7e79c2e0d33ca5e83fccc4798..08a5c5e362b21f6798633675ce214e435c3664ce 100644 (file)
@@ -53,3 +53,13 @@ def test_ext_radio_work(dev, apdev):
     if "ext:" in items:
         logger.info("Pending radio work items:\n" + items)
         raise Exception("Unexpected remaining radio work item")
+
+    id = dev[0].request("RADIO_WORK add test-work timeout=1")
+    ev = dev[0].wait_event(["EXT-RADIO-WORK-START"])
+    if ev is None:
+        raise Exception("Timeout while waiting radio work to start")
+    ev = dev[0].wait_event(["EXT-RADIO-WORK-TIMEOUT"], timeout=2)
+    if ev is None:
+        raise Exception("Timeout while waiting radio work to time out")
+    if id not in ev:
+        raise Exception("Radio work id mismatch")