Browse Source

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>
Jouni Malinen 11 years ago
parent
commit
a364852be8
1 changed files with 14 additions and 21 deletions
  1. 14 21
      tests/hwsim/test_ap_dynamic.py

+ 14 - 21
tests/hwsim/test_ap_dynamic.py

@@ -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):