]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: hostapd and RADAR ctrl_iface command
authorJouni Malinen <j@w1.fi>
Tue, 27 Dec 2016 18:05:12 +0000 (20:05 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 28 Dec 2016 12:31:42 +0000 (14:31 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_hapd_ctrl.py

index 5151783f7afffc6ad0edc817e17940d6dabba494..39818cddc370d4d4cc14ba230dac970ea4d5fe42 100644 (file)
@@ -726,3 +726,21 @@ def test_hapd_ctrl_set(dev, apdev):
     for t in tests:
         if "FAIL" not in hapd.request("SET " + t):
             raise Exception("Invalid SET command accepted: " + t)
+
+def test_hapd_ctrl_radar(dev, apdev):
+    """hostapd and RADAR ctrl_iface command"""
+    ssid = "hapd-ctrl"
+    params = { "ssid": ssid }
+    hapd = hostapd.add_ap(apdev[0], params)
+
+    tests = [ "foo", "foo bar" ]
+    for t in tests:
+        if "FAIL" not in hapd.request("RADAR " + t):
+            raise Exception("Invalid RADAR command accepted: " + t)
+
+    tests = [ "DETECTED freq=2412 chan_offset=12 cf1=1234 cf2=2345",
+              "CAC-FINISHED freq=2412",
+              "CAC-ABORTED freq=2412",
+              "NOP-FINISHED freq=2412" ]
+    for t in tests:
+        hapd.request("RADAR " + t)