tests: Adjust BSS add/remove test cases for primary BSS constraint

Since removal of the primary BSS is now going to remove all the BSSs
for a radio, these two test cases need changes to not trigger false
failures.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2013-11-06 01:08:54 +02:00 committed by Jouni Malinen
parent cdf3fb1f1c
commit a364852be8

View file

@ -90,10 +90,12 @@ def test_ap_bss_add_remove(dev, apdev):
hostapd.add_bss('phy3', ifname2, 'bss-2.conf')
multi_check(dev, [ True, True, True ])
logger.info("Remove the first BSS and re-add it")
logger.info("Remove the first BSS and re-add it and other BSSs")
hostapd.remove_bss(ifname1)
multi_check(dev, [ False, True, True ])
multi_check(dev, [ False, False, False ])
hostapd.add_bss('phy3', ifname1, 'bss-1.conf')
hostapd.add_bss('phy3', ifname2, 'bss-2.conf')
hostapd.add_bss('phy3', ifname3, 'bss-3.conf')
multi_check(dev, [ True, True, True ])
logger.info("Remove two BSSes and re-add them")
@ -101,27 +103,12 @@ def test_ap_bss_add_remove(dev, apdev):
multi_check(dev, [ True, False, True ])
hostapd.remove_bss(ifname3)
multi_check(dev, [ True, False, False ])
dev[0].request("NOTE failure-done")
hostapd.add_bss('phy3', ifname2, 'bss-2.conf')
multi_check(dev, [ True, True, False ])
hostapd.add_bss('phy3', ifname3, 'bss-3.conf')
multi_check(dev, [ True, True, True ])
logger.info("Remove three BSSes and re-add them")
hostapd.remove_bss(ifname1)
multi_check(dev, [ False, True, True ])
hostapd.remove_bss(ifname2)
multi_check(dev, [ False, False, True ])
hostapd.remove_bss(ifname3)
multi_check(dev, [ False, False, False ])
hostapd.add_bss('phy3', ifname1, 'bss-1.conf')
multi_check(dev, [ True, False, False ])
hostapd.add_bss('phy3', ifname2, 'bss-2.conf')
multi_check(dev, [ True, True, False ])
hostapd.add_bss('phy3', ifname3, 'bss-3.conf')
multi_check(dev, [ True, True, True ])
logger.info("Remove three BSSes in reverse order and re-add them")
logger.info("Remove three BSSes in and re-add them")
hostapd.remove_bss(ifname3)
multi_check(dev, [ True, True, False ])
hostapd.remove_bss(ifname2)
@ -151,11 +138,17 @@ def test_ap_multi_bss_config(dev, apdev):
hapd = hostapd.Hostapd(ifname1)
hapd.enable()
multi_check(dev, [ True, True, True ])
hostapd.remove_bss(ifname1)
multi_check(dev, [ False, True, True ])
hostapd.remove_bss(ifname2)
multi_check(dev, [ False, False, True ])
multi_check(dev, [ True, False, True ])
hostapd.remove_bss(ifname3)
multi_check(dev, [ True, False, False ])
hostapd.remove_bss(ifname1)
multi_check(dev, [ False, False, False ])
hostapd.add_iface(ifname1, 'multi-bss.conf')
hapd = hostapd.Hostapd(ifname1)
hapd.enable()
hostapd.remove_bss(ifname1)
multi_check(dev, [ False, False, False ])
def invalid_ap(hapd_global, ifname):