]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Adjust BSS add/remove test cases for primary BSS constraint
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 5 Nov 2013 23:08:54 +0000 (01:08 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 5 Nov 2013 23:08:54 +0000 (01:08 +0200)
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>

tests/hwsim/test_ap_dynamic.py

index 5d3238e5baed72c8579676375dfa52b528d04ece..9cb1e443c5b403f2956457b87eacf256b87a441a 100644 (file)
@@ -90,38 +90,25 @@ 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')
-    multi_check(dev, [ True, True, True ])
-
-    logger.info("Remove two BSSes and re-add them")
-    hostapd.remove_bss(ifname2)
-    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 ])
+    logger.info("Remove two BSSes and re-add them")
     hostapd.remove_bss(ifname2)
-    multi_check(dev, [ False, False, True ])
+    multi_check(dev, [ True, 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):