aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-02-25 16:45:59 (GMT)
committerJouni Malinen <j@w1.fi>2017-02-26 10:05:40 (GMT)
commit47e148592d7a607e6c4815862897b0b9ef3124fc (patch)
tree09172675b3404f336001aab6133d61b819d7f082
parent88a447556e4d36f5390a78f508cbe9a3497145bf (diff)
downloadhostap-47e148592d7a607e6c4815862897b0b9ef3124fc.zip
hostap-47e148592d7a607e6c4815862897b0b9ef3124fc.tar.gz
hostap-47e148592d7a607e6c4815862897b0b9ef3124fc.tar.bz2
tests: AP with open mode and use for SELECT_NETWORK freq parameter
Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--tests/hwsim/test_ap_open.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/hwsim/test_ap_open.py b/tests/hwsim/test_ap_open.py
index 5566c2c..4a94e52 100644
--- a/tests/hwsim/test_ap_open.py
+++ b/tests/hwsim/test_ap_open.py
@@ -723,3 +723,21 @@ def test_ap_open_drop_duplicate(dev, apdev, params):
raise Exception("Unexpected number of reassociation frames: %d" % num_reassoc)
if num_action != 1:
raise Exception("Unexpected number of Action frames: %d" % num_action)
+
+def test_ap_open_select_network_freq(dev, apdev):
+ """AP with open mode and use for SELECT_NETWORK freq parameter"""
+ hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
+ id = dev[0].connect("open", key_mgmt="NONE", only_add_network=True)
+ dev[0].select_network(id, freq=2412)
+ start = os.times()[4]
+ ev = dev[0].wait_event(["CTRL-EVENT-SCAN-STARTED"], timeout=5)
+ if ev is None:
+ raise Exception("Scan not started")
+ ev = dev[0].wait_event(["CTRL-EVENT-SCAN-RESULTS"], timeout=15)
+ if ev is None:
+ raise Exception("Scan not completed")
+ end = os.times()[4]
+ logger.info("Scan duration: {} seconds".format(end - start))
+ if end - start > 3:
+ raise Exception("Scan took unexpectedly long time")
+ dev[0].wait_connected()