]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: OLBC AP table error cases
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 29 Jan 2015 19:11:41 +0000 (21:11 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 29 Jan 2015 19:11:41 +0000 (21:11 +0200)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_ap_ht.py

index c06db18b565dc9aeeecbd90a999a748a9d0b5436..0cba57edc10d6e47899715089121c728e7a268f7 100644 (file)
@@ -11,7 +11,7 @@ import struct
 import subprocess
 
 import hostapd
-from utils import HwsimSkip
+from utils import HwsimSkip, alloc_fail
 import hwsim_utils
 from test_ap_csa import csa_supported
 
@@ -468,6 +468,28 @@ def test_olbc(dev, apdev):
     if not cleared:
         raise Exception("OLBC state did nto time out")
 
+def test_olbc_table_limit(dev, apdev):
+    """OLBC AP table size limit"""
+    ifname1 = apdev[0]['ifname']
+    ifname2 = apdev[0]['ifname'] + '-2'
+    ifname3 = apdev[0]['ifname'] + '-3'
+    hostapd.add_bss('phy3', ifname1, 'bss-1.conf')
+    hostapd.add_bss('phy3', ifname2, 'bss-2.conf')
+    hostapd.add_bss('phy3', ifname3, 'bss-3.conf')
+
+    params = { "ssid": "test-olbc",
+               "channel": "1",
+               "ap_table_max_size": "2" }
+    hapd = hostapd.add_ap(apdev[1]['ifname'], params)
+
+    time.sleep(0.3)
+    with alloc_fail(hapd, 1, "ap_list_process_beacon"):
+        time.sleep(0.3)
+    hapd.set("ap_table_max_size", "1")
+    time.sleep(0.3)
+    hapd.set("ap_table_max_size", "0")
+    time.sleep(0.3)
+
 def test_olbc_5ghz(dev, apdev):
     """OLBC detection on 5 GHz"""
     try: