From a364852be85ada080d178629621de0aec0ae446e Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 6 Nov 2013 01:08:54 +0200 Subject: [PATCH] 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 --- tests/hwsim/test_ap_dynamic.py | 35 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/tests/hwsim/test_ap_dynamic.py b/tests/hwsim/test_ap_dynamic.py index 5d3238e5b..9cb1e443c 100644 --- a/tests/hwsim/test_ap_dynamic.py +++ b/tests/hwsim/test_ap_dynamic.py @@ -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):