]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make discovery_auto more robust
authorJouni Malinen <j@w1.fi>
Sun, 26 Jul 2015 15:23:37 +0000 (18:23 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 26 Jul 2015 15:45:14 +0000 (18:45 +0300)
This test case could fail if there were old BSS entries remaining in
cfg80211 scan results. That happened, e.g., when running test cases in
the following sequence: "discovery_social_plus_one discovery_auto".

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

index 6f7aefaa5a0e51ce23f11cfdb346caf3c4339c3a..0a028e6fcacc35ff8a0f1e54262519b9b35326f4 100644 (file)
@@ -289,6 +289,7 @@ def test_discovery_and_interface_disabled(dev):
 
 def test_discovery_auto(dev):
     """P2P device discovery and provision discovery with auto GO/dev selection"""
+    dev[0].flush_scan_cache()
     addr0 = dev[0].p2p_dev_addr()
     addr1 = dev[1].p2p_dev_addr()
     addr2 = dev[2].p2p_dev_addr()