]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: RADIO_WORK error cases
authorJouni Malinen <j@w1.fi>
Thu, 11 Dec 2014 22:27:06 +0000 (00:27 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 11 Dec 2014 22:27:06 +0000 (00:27 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_radio_work.py

index 02ffc454a50f025bff6e4c403e3cd9ec221e0880..83eb8f41bf46352a1504c30588da5641414406e0 100644 (file)
@@ -65,6 +65,20 @@ def test_ext_radio_work(dev, apdev):
     if id not in ev:
         raise Exception("Radio work id mismatch")
 
+    for i in range(5):
+        dev[0].request(("RADIO_WORK add test-work-%d-" % i) + 100*'a')
+    ev = dev[0].wait_event(["EXT-RADIO-WORK-START"])
+    if ev is None:
+        raise Exception("Timeout while waiting radio work to start")
+    if "FAIL" not in dev[0].request("RADIO_WORK done 12345678"):
+        raise Exception("Invalid RADIO_WORK done accepted");
+    if "FAIL" not in dev[0].request("RADIO_WORK foo"):
+        raise Exception("Invalid RADIO_WORK accepted");
+    dev[0].request("FLUSH")
+    items = dev[0].request("RADIO_WORK show")
+    if items != "":
+        raise Exception("Unexpected radio work remaining after FLUSH: " + items)
+
 def test_radio_work_cancel(dev, apdev):
     """Radio work items cancelled on interface removal"""
     params = hostapd.wpa2_params(ssid="radio", passphrase="12345678")