]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make go_neg_with_bss_on_disallowed_chan more robust
authorJouni Malinen <j@w1.fi>
Sat, 29 Nov 2014 13:22:43 +0000 (15:22 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 29 Nov 2014 13:22:43 +0000 (15:22 +0200)
Clear scan results to avoid PBC overlap issues caused by earlier test
cases. For example, go_neg_with_bss_connected followed by
go_neg_with_bss_on_disallowed_chan resulted in failure before this
change.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_p2p_channel.py

index 3e2f275b51887e5538d53a769677e395036f4137..41e60d46cd68f9fc9146fc8d8e11b1607d24dcbf 100644 (file)
@@ -280,6 +280,11 @@ def test_go_neg_with_bss_on_disallowed_chan(dev, apdev):
         try:
             hapd = hostapd.add_ap(apdev[0]['ifname'],
                                   { "ssid": 'bss-2.4ghz', "channel": '1' })
+            # make sure PBC overlap from old test cases is not maintained
+            dev[0].request("BSS_FLUSH 0")
+            dev[0].request("SCAN freq=2412 only_new=1")
+            dev[1].request("BSS_FLUSH 0")
+            dev[1].request("SCAN freq=2412 only_new=1")
             wpas.connect("bss-2.4ghz", key_mgmt="NONE", scan_freq="2412")
             wpas.request("P2P_SET disallow_freq 2412")