From: Jouni Malinen Date: Sat, 29 Nov 2014 13:22:43 +0000 (+0200) Subject: tests: Make go_neg_with_bss_on_disallowed_chan more robust X-Git-Tag: hostap_2_4~972 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae13ad6413045533d33031c77ea9de14b6734cf7;p=thirdparty%2Fhostap.git tests: Make go_neg_with_bss_on_disallowed_chan more robust 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 --- diff --git a/tests/hwsim/test_p2p_channel.py b/tests/hwsim/test_p2p_channel.py index 3e2f275b5..41e60d46c 100644 --- a/tests/hwsim/test_p2p_channel.py +++ b/tests/hwsim/test_p2p_channel.py @@ -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")