From: Jouni Malinen Date: Sat, 29 Mar 2014 14:35:54 +0000 (+0200) Subject: tests: OLBC state clearing on timeout X-Git-Tag: hostap_2_2~429 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9645dbe9b2c2d49e064c8bb12c6b8e8f8f8aab2b;p=thirdparty%2Fhostap.git tests: OLBC state clearing on timeout Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_ht.py b/tests/hwsim/test_ap_ht.py index b0d444094..8f022d7db 100644 --- a/tests/hwsim/test_ap_ht.py +++ b/tests/hwsim/test_ap_ht.py @@ -360,7 +360,8 @@ def test_olbc(dev, apdev): """OLBC detection""" params = { "ssid": "test-olbc", "channel": "6", - "ht_capab": "[HT40-]" } + "ht_capab": "[HT40-]", + "ap_table_expiration_time": "2" } hapd = hostapd.add_ap(apdev[0]['ifname'], params) status = hapd.get_status() if status['olbc'] != '0' or status['olbc_ht'] != '0': @@ -376,6 +377,20 @@ def test_olbc(dev, apdev): if status['olbc'] != '1' or status['olbc_ht'] != '1': raise Exception("Missing OLBC information") + hapd_global = hostapd.HostapdGlobal() + hapd_global.remove(apdev[1]['ifname']) + + logger.info("Waiting for OLBC state to time out") + cleared = False + for i in range(0, 15): + time.sleep(1) + status = hapd.get_status() + if status['olbc'] == '0' and status['olbc_ht'] == '0': + cleared = True + break + if not cleared: + raise Exception("OLBC state did nto time out") + def test_olbc_5ghz(dev, apdev): """OLBC detection on 5 GHz""" try: