]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Additional coverage for filter_ssids=1
authorJouni Malinen <j@w1.fi>
Fri, 19 Dec 2014 18:26:07 +0000 (20:26 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 19 Dec 2014 18:26:07 +0000 (20:26 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_scan.py

index 0e5a9e52ee0909f966b6f224d02e51aa4cf6c982..cd51fa71ab315a744ffd19a6c0761e2c5684e43e 100644 (file)
@@ -164,7 +164,7 @@ def test_scan_filter(dev, apdev):
     try:
         if "OK" not in dev[0].request("SET filter_ssids 1"):
             raise Exception("SET failed")
-        dev[0].connect("test-scan", key_mgmt="NONE", only_add_network=True)
+        id = dev[0].connect("test-scan", key_mgmt="NONE", only_add_network=True)
         hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan" })
         bssid = apdev[0]['bssid']
         hostapd.add_ap(apdev[1]['ifname'], { "ssid": "test-scan2" })
@@ -174,6 +174,10 @@ def test_scan_filter(dev, apdev):
             raise Exception("BSS not found in scan results")
         if bssid2 in dev[0].request("SCAN_RESULTS"):
             raise Exception("Unexpected BSS found in scan results")
+        dev[0].set_network_quoted(id, "ssid", "")
+        dev[0].scan(freq="2412")
+        id2 = dev[0].connect("test", key_mgmt="NONE", only_add_network=True)
+        dev[0].scan(freq="2412")
     finally:
         dev[0].request("SET filter_ssids 0")