From: Jouni Malinen Date: Sat, 20 Dec 2014 11:36:01 +0000 (+0200) Subject: tests: Clear cfg80211 scan results after wext_hidden X-Git-Tag: hostap_2_4~739 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1264b683559d29fff10d77cc205362d9b0f3f3d8;p=thirdparty%2Fhostap.git tests: Clear cfg80211 scan results after wext_hidden Leaving hidden SSIDs in the cfg80211 BSS table can result in errors in the following test cases, so use special care to clear all BSS entries at the end of the wext_hidden test case. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_wext.py b/tests/hwsim/test_wext.py index 6ba979a0d..1efb5c91c 100644 --- a/tests/hwsim/test_wext.py +++ b/tests/hwsim/test_wext.py @@ -212,10 +212,10 @@ def test_wext_scan_hidden(dev, apdev): if not wpas: return "skip" - hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan", - "ignore_broadcast_ssid": "1" }) - hostapd.add_ap(apdev[1]['ifname'], { "ssid": "test-scan2", - "ignore_broadcast_ssid": "1" }) + hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan", + "ignore_broadcast_ssid": "1" }) + hapd2 = hostapd.add_ap(apdev[1]['ifname'], { "ssid": "test-scan2", + "ignore_broadcast_ssid": "1" }) id1 = wpas.connect("test-scan", key_mgmt="NONE", scan_ssid="1", only_add_network=True) @@ -232,6 +232,13 @@ def test_wext_scan_hidden(dev, apdev): id = wpas.connect("test-scan2", key_mgmt="NONE", scan_ssid="1", only_add_network=True) wpas.connect_network(id, timeout=30) + wpas.request("DISCONNECT") + hapd2.disable() + hapd.disable() + wpas.interface_remove("wlan5") + wpas.interface_add("wlan5") + wpas.flush_scan_cache(freq=2412) + wpas.flush_scan_cache() def test_wext_rfkill(dev, apdev): """WEXT and rfkill block/unblock"""