All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] station: make autoconnect settable via debug interface
@ 2021-08-12 20:38 James Prestwood
  2021-08-12 20:38 ` [PATCH 2/7] station: disable autoconnect when in developer mode James Prestwood
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: James Prestwood @ 2021-08-12 20:38 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 2588 bytes --]

This adds the property "AutoConnect" to the station debug interface
which can be read/written to disable or enable autoconnect globally.
As one would expect this property is only going to be used for testing
hence why it was put on the debug interface. Mosts tests disable
autoconnect (or they should) because it leads to unexpected connections.
---
 src/station.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/src/station.c b/src/station.c
index f77fd663..f9b2b16d 100644
--- a/src/station.c
+++ b/src/station.c
@@ -1211,6 +1211,11 @@ bool station_set_autoconnect(struct station *station, bool autoconnect)
 	if (station_is_autoconnecting(station) && !autoconnect)
 		station_enter_state(station, STATION_STATE_DISCONNECTED);
 
+	if (iwd_is_developer_mode())
+		l_dbus_property_changed(dbus_get_bus(),
+				netdev_get_path(station->netdev),
+				IWD_STATION_DEBUG_INTERFACE, "AutoConnect");
+
 	return true;
 }
 
@@ -3831,6 +3836,41 @@ invalid_args:
 	return dbus_error_invalid_args(message);
 }
 
+static bool station_property_get_autoconnect(struct l_dbus *dbus,
+					struct l_dbus_message *message,
+					struct l_dbus_message_builder *builder,
+					void *user_data)
+{
+	struct station *station = user_data;
+	bool autoconnect;
+
+	autoconnect = station->autoconnect;
+
+	l_dbus_message_builder_append_basic(builder, 'b', &autoconnect);
+
+	return true;
+}
+
+static struct l_dbus_message *station_property_set_autoconnect(
+					struct l_dbus *dbus,
+					struct l_dbus_message *message,
+					struct l_dbus_message_iter *new_value,
+					l_dbus_property_complete_cb_t complete,
+					void *user_data)
+{
+	struct station *station = user_data;
+	bool autoconnect;
+
+	if (!l_dbus_message_iter_get_variant(new_value, "b", &autoconnect))
+		return dbus_error_invalid_args(message);
+
+	l_debug("Setting autoconnect %s", autoconnect ? "true" : "false");
+
+	station_set_autoconnect(station, autoconnect);
+
+	return l_dbus_message_new_method_return(message);
+}
+
 static void station_setup_debug_interface(
 					struct l_dbus_interface *interface)
 {
@@ -3839,6 +3879,10 @@ static void station_setup_debug_interface(
 					"mac");
 	l_dbus_interface_method(interface, "Roam", 0,
 					station_force_roam, "", "ay", "mac");
+
+	l_dbus_interface_property(interface, "AutoConnect", 0, "b",
+					station_property_get_autoconnect,
+					station_property_set_autoconnect);
 }
 
 static void ap_roam_frame_event(const struct mmpdu_header *hdr,
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/7] station: disable autoconnect when in developer mode
  2021-08-12 20:38 [PATCH 1/7] station: make autoconnect settable via debug interface James Prestwood
@ 2021-08-12 20:38 ` James Prestwood
  2021-08-12 20:38 ` [PATCH 3/7] auto-t: iwd.py: add autoconnect property/StationDebug James Prestwood
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: James Prestwood @ 2021-08-12 20:38 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]

Most autotests do not want autoconnect behavior so it is being
turned off by default. There are a few tests where it is needed
and in these few cases the test can enable autoconnect through
the new station debug property.
---
 src/station.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/station.c b/src/station.c
index f9b2b16d..2155aa3c 100644
--- a/src/station.c
+++ b/src/station.c
@@ -3507,6 +3507,7 @@ static struct station *station_create(struct netdev *netdev)
 {
 	struct station *station;
 	struct l_dbus *dbus = dbus_get_bus();
+	bool autoconnect = true;
 
 	station = l_new(struct station, 1);
 	watchlist_init(&station->state_watches, NULL);
@@ -3524,8 +3525,6 @@ static struct station *station_create(struct netdev *netdev)
 
 	l_queue_push_head(station_list, station);
 
-	station_set_autoconnect(station, true);
-
 	l_dbus_object_add_interface(dbus, netdev_get_path(netdev),
 					IWD_STATION_INTERFACE, station);
 
@@ -3536,11 +3535,15 @@ static struct station *station_create(struct netdev *netdev)
 
 	station_fill_scan_freq_subsets(station);
 
-	if (iwd_is_developer_mode())
+	if (iwd_is_developer_mode()) {
 		l_dbus_object_add_interface(dbus,
 					netdev_get_path(station->netdev),
 					IWD_STATION_DEBUG_INTERFACE,
 					station);
+		autoconnect = false;
+	}
+
+	station_set_autoconnect(station, autoconnect);
 
 	return station;
 }
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/7] auto-t: iwd.py: add autoconnect property/StationDebug
  2021-08-12 20:38 [PATCH 1/7] station: make autoconnect settable via debug interface James Prestwood
  2021-08-12 20:38 ` [PATCH 2/7] station: disable autoconnect when in developer mode James Prestwood
@ 2021-08-12 20:38 ` James Prestwood
  2021-08-12 20:38 ` [PATCH 4/7] auto-t: iwd.py: make scan_if_needed True by default James Prestwood
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: James Prestwood @ 2021-08-12 20:38 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1899 bytes --]

---
 autotests/util/iwd.py | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py
index 1785081f..5d041e57 100755
--- a/autotests/util/iwd.py
+++ b/autotests/util/iwd.py
@@ -226,6 +226,21 @@ class AdHocDevice(IWDDBusAbstract):
     def connected_peers(self):
         return self._properties['ConnectedPeers']
 
+class StationDebug(IWDDBusAbstract):
+    '''
+        Class represents net.connman.iwd.StationDebug
+    '''
+    _iface_name = IWD_STATION_DEBUG_INTERFACE
+
+    def __init__(self, *args, **kwargs):
+        self._debug_props = None
+        self._debug_iface = None
+
+        IWDDBusAbstract.__init__(self, *args, **kwargs)
+
+    @property
+    def autoconnect(self):
+        return self._properties['AutoConnect']
 
 class Device(IWDDBusAbstract):
     '''
@@ -238,6 +253,7 @@ class Device(IWDDBusAbstract):
         self._wps_manager_if = None
         self._station_if = None
         self._station_props = None
+        self._station_debug = None
         IWDDBusAbstract.__init__(self, *args, **kwargs)
 
     @property
@@ -354,6 +370,21 @@ class Device(IWDDBusAbstract):
         props = self._station_properties()
         return bool(props['Scanning'])
 
+    @property
+    def autoconnect(self):
+        if not self._station_debug:
+            self._station_debug = StationDebug(self._object_path)
+
+        return self._station_debug.autoconnect
+
+    @autoconnect.setter
+    def autoconnect(self, value):
+        if not self._station_debug:
+            self._station_debug = StationDebug(self._object_path)
+
+        self._station_debug._prop_proxy.Set(IWD_STATION_DEBUG_INTERFACE,
+                                            'AutoConnect', value)
+
     def scan(self):
         '''Schedule a network scan.
 
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/7] auto-t: iwd.py: make scan_if_needed True by default
  2021-08-12 20:38 [PATCH 1/7] station: make autoconnect settable via debug interface James Prestwood
  2021-08-12 20:38 ` [PATCH 2/7] station: disable autoconnect when in developer mode James Prestwood
  2021-08-12 20:38 ` [PATCH 3/7] auto-t: iwd.py: add autoconnect property/StationDebug James Prestwood
@ 2021-08-12 20:38 ` James Prestwood
  2021-08-12 20:38 ` [PATCH 5/7] auto-t: make hwsim registration off " James Prestwood
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: James Prestwood @ 2021-08-12 20:38 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 2262 bytes --]

There is a common block of code in nearly every test which is incorrect,
most likely a copy-paste from long ago. It goes something like:

wd.wait_for_object_condition(device, 'not obj.scanning')
device.scan()
wd.wait_for_object_condition(device, 'not obj.scanning')

network = device.get_ordered_network("ssid")

The problem here is that sometimes the scanning property does not get
updated fast enough before device.scan() returns, meaning get_ordered_network
comes up with nothing. Some tests pass scan_if_needed=True which 'fixes'
this but ends up re-scanning after the original scan finishes.

To put this to rest scan_if_needed is now defaulted to True, and no
explicit scan should be needed.
---
 autotests/util/iwd.py | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py
index 5d041e57..f5c224b8 100755
--- a/autotests/util/iwd.py
+++ b/autotests/util/iwd.py
@@ -410,7 +410,7 @@ class Device(IWDDBusAbstract):
 
         self._wait_for_async_op()
 
-    def get_ordered_networks(self, scan_if_needed = False):
+    def get_ordered_networks(self, scan_if_needed = True):
         '''Return the list of networks found in the most recent
            scan, sorted by their user interface importance
            score as calculated by iwd.  If the device is
@@ -432,7 +432,13 @@ class Device(IWDDBusAbstract):
         elif not scan_if_needed:
             return None
 
-        self.scan()
+        condition = 'not obj.scanning'
+        IWD._wait_for_object_condition(self, condition)
+
+        try:
+            self.scan()
+        except InProgressEx:
+            pass
 
         condition = 'obj.scanning'
         IWD._wait_for_object_condition(self, condition)
@@ -448,7 +454,7 @@ class Device(IWDDBusAbstract):
 
         return None
 
-    def get_ordered_network(self, network, scan_if_needed = False):
+    def get_ordered_network(self, network, scan_if_needed = True):
         '''Returns a single network from ordered network call, or None if the
            network wasn't found. If the network is not found an exception is
            raised, this removes the need to extra asserts in autotests.
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/7] auto-t: make hwsim registration off by default
  2021-08-12 20:38 [PATCH 1/7] station: make autoconnect settable via debug interface James Prestwood
                   ` (2 preceding siblings ...)
  2021-08-12 20:38 ` [PATCH 4/7] auto-t: iwd.py: make scan_if_needed True by default James Prestwood
@ 2021-08-12 20:38 ` James Prestwood
  2021-08-12 20:38 ` [PATCH 6/7] auto-t: update all tests to remove bad scanning logic James Prestwood
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: James Prestwood @ 2021-08-12 20:38 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 12880 bytes --]

With the addition of connect_bssid/roam very few tests actually
require hwsim. Since hwsim can lead to problems with scan results
its best to have it off by default and have each test that needs
it explicitly turn it on.

Tests which previously turned it off have had that option removed.

Tests that do require hwsim still are vulnerable to scan result
problems, so for these tests beacon_int was added to the hostapd
config which seems to help with reliability somewhat.
---
 autotests/testAP/hw.conf                           | 1 -
 autotests/testBSSBlacklist/hw.conf                 | 1 +
 autotests/testBSSBlacklist/ssid1.conf              | 1 +
 autotests/testBSSBlacklist/ssid2.conf              | 1 +
 autotests/testBSSBlacklist/ssid3.conf              | 3 ++-
 autotests/testFT-FILS/hw.conf                      | 1 +
 autotests/testHT-VHT/ht.conf                       | 1 +
 autotests/testHT-VHT/hw.conf                       | 1 +
 autotests/testHT-VHT/non-ht-vht.conf               | 1 +
 autotests/testHT-VHT/vht.conf                      | 1 +
 autotests/testHiddenNetworks/hw.conf               | 1 -
 autotests/testHotspot/hw.conf                      | 1 +
 autotests/testHotspot/ssidHotspot.conf             | 1 +
 autotests/testHotspot/ssidHotspotUnconfigured.conf | 1 +
 autotests/testHotspot/ssidWPA2-1.conf              | 1 +
 autotests/testHotspot/ssidWPA2-2.conf              | 1 +
 autotests/testHotspot/ssidWPA2-3.conf              | 1 +
 autotests/testKnownNetworks/ssidCCMP-2G.conf       | 1 +
 autotests/testKnownNetworks/ssidCCMP-5G.conf       | 1 +
 autotests/testKnownNetworks/ssidHotspot.conf       | 1 +
 autotests/testNetconfig/hw.conf                    | 1 -
 autotests/testOWE/hw.conf                          | 1 +
 autotests/testP2P/hw.conf                          | 1 -
 autotests/testPSK-roam/hw.conf                     | 1 +
 autotests/testRSSIAgent/hw.conf                    | 1 +
 autotests/testRoamRetry/hw.conf                    | 1 +
 autotests/testRoamRetry/ssid1.conf                 | 1 +
 autotests/testRoamRetry/ssid2.conf                 | 1 +
 autotests/testSAE/hw.conf                          | 1 +
 autotests/testSAQuery-spoofing/hw.conf             | 1 +
 autotests/testSAQuery-spoofing/ssidCCMP.conf       | 1 +
 tools/test-runner                                  | 2 +-
 32 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/autotests/testAP/hw.conf b/autotests/testAP/hw.conf
index c9c0c7ca..f1ed6cd9 100644
--- a/autotests/testAP/hw.conf
+++ b/autotests/testAP/hw.conf
@@ -1,7 +1,6 @@
 [SETUP]
 num_radios=6
 start_iwd=0
-hwsim_medium=no
 
 [HOSTAPD]
 rad0=psk-ccmp.conf
diff --git a/autotests/testBSSBlacklist/hw.conf b/autotests/testBSSBlacklist/hw.conf
index d6b754aa..cfabbc32 100644
--- a/autotests/testBSSBlacklist/hw.conf
+++ b/autotests/testBSSBlacklist/hw.conf
@@ -1,6 +1,7 @@
 [SETUP]
 num_radios=5
 start_iwd=0
+hwsim_medium=yes
 
 [HOSTAPD]
 rad0=ssid1.conf
diff --git a/autotests/testBSSBlacklist/ssid1.conf b/autotests/testBSSBlacklist/ssid1.conf
index 2db39a8c..21f1a2fe 100644
--- a/autotests/testBSSBlacklist/ssid1.conf
+++ b/autotests/testBSSBlacklist/ssid1.conf
@@ -9,3 +9,4 @@ wpa_passphrase=secret123
 ctrl_interface=/var/run/hostapd
 
 rrm_neighbor_report=1
+beacon_int=10
diff --git a/autotests/testBSSBlacklist/ssid2.conf b/autotests/testBSSBlacklist/ssid2.conf
index d37c308d..9d350506 100644
--- a/autotests/testBSSBlacklist/ssid2.conf
+++ b/autotests/testBSSBlacklist/ssid2.conf
@@ -9,3 +9,4 @@ wpa_passphrase=secret123
 ctrl_interface=/var/run/hostapd
 
 rrm_neighbor_report=1
+beacon_int=10
diff --git a/autotests/testBSSBlacklist/ssid3.conf b/autotests/testBSSBlacklist/ssid3.conf
index c352d781..9ac34fcb 100644
--- a/autotests/testBSSBlacklist/ssid3.conf
+++ b/autotests/testBSSBlacklist/ssid3.conf
@@ -9,4 +9,5 @@ wpa_passphrase=secret123
 ctrl_interface=/var/run/hostapd
 
 rrm_neighbor_report=1
-max_num_sta=1
\ No newline at end of file
+max_num_sta=1
+beacon_int=10
diff --git a/autotests/testFT-FILS/hw.conf b/autotests/testFT-FILS/hw.conf
index 322f0862..c74cf864 100644
--- a/autotests/testFT-FILS/hw.conf
+++ b/autotests/testFT-FILS/hw.conf
@@ -1,6 +1,7 @@
 [SETUP]
 num_radios=3
 start_iwd=0
+hwsim_medium=yes
 
 [HOSTAPD]
 rad0=ft-eap-ccmp-1.conf
diff --git a/autotests/testHT-VHT/ht.conf b/autotests/testHT-VHT/ht.conf
index 9a84b063..71829074 100644
--- a/autotests/testHT-VHT/ht.conf
+++ b/autotests/testHT-VHT/ht.conf
@@ -9,3 +9,4 @@ wpa_passphrase=secret123
 
 ieee80211n=1
 channel=36
+beacon_int=10
diff --git a/autotests/testHT-VHT/hw.conf b/autotests/testHT-VHT/hw.conf
index 037b3e85..b9335368 100644
--- a/autotests/testHT-VHT/hw.conf
+++ b/autotests/testHT-VHT/hw.conf
@@ -1,6 +1,7 @@
 [SETUP]
 num_radios=4
 reg_domain=US
+hwsim_medium=yes
 
 [HOSTAPD]
 rad0=non-ht-vht.conf
diff --git a/autotests/testHT-VHT/non-ht-vht.conf b/autotests/testHT-VHT/non-ht-vht.conf
index 6df06a02..dc00a249 100644
--- a/autotests/testHT-VHT/non-ht-vht.conf
+++ b/autotests/testHT-VHT/non-ht-vht.conf
@@ -6,3 +6,4 @@ ssid=testSSID
 wpa=2
 wpa_pairwise=CCMP
 wpa_passphrase=secret123
+beacon_int=10
diff --git a/autotests/testHT-VHT/vht.conf b/autotests/testHT-VHT/vht.conf
index 9a7ec0d7..513cf4cc 100644
--- a/autotests/testHT-VHT/vht.conf
+++ b/autotests/testHT-VHT/vht.conf
@@ -12,3 +12,4 @@ ieee80211n=1
 ieee80211ac=1
 
 channel=36
+beacon_int=10
diff --git a/autotests/testHiddenNetworks/hw.conf b/autotests/testHiddenNetworks/hw.conf
index 065e9003..be72c4a5 100644
--- a/autotests/testHiddenNetworks/hw.conf
+++ b/autotests/testHiddenNetworks/hw.conf
@@ -1,7 +1,6 @@
 [SETUP]
 num_radios=7
 start_iwd=0
-hwsim_medium=no
 
 [HOSTAPD]
 rad0=ssidHiddenOpen.conf
diff --git a/autotests/testHotspot/hw.conf b/autotests/testHotspot/hw.conf
index d2e49ffd..20204694 100644
--- a/autotests/testHotspot/hw.conf
+++ b/autotests/testHotspot/hw.conf
@@ -1,6 +1,7 @@
 [SETUP]
 num_radios=6
 start_iwd=0
+hwsim_medium=yes
 
 [HOSTAPD]
 rad0=ssidHotspot.conf
diff --git a/autotests/testHotspot/ssidHotspot.conf b/autotests/testHotspot/ssidHotspot.conf
index bcad7210..860aacfb 100644
--- a/autotests/testHotspot/ssidHotspot.conf
+++ b/autotests/testHotspot/ssidHotspot.conf
@@ -44,3 +44,4 @@ eap_user_file=/tmp/eap_users.text
 ca_cert=/tmp/certs/cert-ca.pem
 server_cert=/tmp/certs/cert-server.pem
 private_key=/tmp/certs/cert-server-key.pem
+beacon_int=10
diff --git a/autotests/testHotspot/ssidHotspotUnconfigured.conf b/autotests/testHotspot/ssidHotspotUnconfigured.conf
index 287dab6c..635fc0b3 100644
--- a/autotests/testHotspot/ssidHotspotUnconfigured.conf
+++ b/autotests/testHotspot/ssidHotspotUnconfigured.conf
@@ -44,3 +44,4 @@ eap_user_file=/tmp/eap_users.text
 ca_cert=/tmp/certs/cert-ca.pem
 server_cert=/tmp/certs/cert-server.pem
 private_key=/tmp/certs/cert-server-key.pem
+beacon_int=10
diff --git a/autotests/testHotspot/ssidWPA2-1.conf b/autotests/testHotspot/ssidWPA2-1.conf
index 0c9aede5..b2f04eec 100644
--- a/autotests/testHotspot/ssidWPA2-1.conf
+++ b/autotests/testHotspot/ssidWPA2-1.conf
@@ -6,3 +6,4 @@ ssid=ssidWPA2-1
 wpa=2
 wpa_pairwise=CCMP
 wpa_passphrase=secret123
+beacon_int=10
diff --git a/autotests/testHotspot/ssidWPA2-2.conf b/autotests/testHotspot/ssidWPA2-2.conf
index 2058d4a3..cc0c31b3 100644
--- a/autotests/testHotspot/ssidWPA2-2.conf
+++ b/autotests/testHotspot/ssidWPA2-2.conf
@@ -6,3 +6,4 @@ ssid=ssidWPA2-2
 wpa=2
 wpa_pairwise=CCMP
 wpa_passphrase=secret123
+beacon_int=10
diff --git a/autotests/testHotspot/ssidWPA2-3.conf b/autotests/testHotspot/ssidWPA2-3.conf
index d536ebd1..a3468936 100644
--- a/autotests/testHotspot/ssidWPA2-3.conf
+++ b/autotests/testHotspot/ssidWPA2-3.conf
@@ -6,3 +6,4 @@ ssid=ssidWPA2-3
 wpa=2
 wpa_pairwise=CCMP
 wpa_passphrase=secret123
+beacon_int=10
diff --git a/autotests/testKnownNetworks/ssidCCMP-2G.conf b/autotests/testKnownNetworks/ssidCCMP-2G.conf
index 074e8228..83b82e35 100644
--- a/autotests/testKnownNetworks/ssidCCMP-2G.conf
+++ b/autotests/testKnownNetworks/ssidCCMP-2G.conf
@@ -5,3 +5,4 @@ ssid=ssidCCMP
 wpa=2
 wpa_pairwise=CCMP
 wpa_passphrase=secret123
+beacon_int=10
diff --git a/autotests/testKnownNetworks/ssidCCMP-5G.conf b/autotests/testKnownNetworks/ssidCCMP-5G.conf
index feb26a9d..3110cce8 100644
--- a/autotests/testKnownNetworks/ssidCCMP-5G.conf
+++ b/autotests/testKnownNetworks/ssidCCMP-5G.conf
@@ -6,3 +6,4 @@ country_code=US
 wpa=2
 wpa_pairwise=CCMP
 wpa_passphrase=secret123
+beacon_int=10
diff --git a/autotests/testKnownNetworks/ssidHotspot.conf b/autotests/testKnownNetworks/ssidHotspot.conf
index 8f5ea7cc..95170c84 100644
--- a/autotests/testKnownNetworks/ssidHotspot.conf
+++ b/autotests/testKnownNetworks/ssidHotspot.conf
@@ -44,3 +44,4 @@ eap_user_file=/tmp/eap_users.text
 ca_cert=/tmp/certs/cert-ca.pem
 server_cert=/tmp/certs/cert-server.pem
 private_key=/tmp/certs/cert-server-key.pem
+beacon_int=10
diff --git a/autotests/testNetconfig/hw.conf b/autotests/testNetconfig/hw.conf
index a2618b35..d5adc9ad 100644
--- a/autotests/testNetconfig/hw.conf
+++ b/autotests/testNetconfig/hw.conf
@@ -1,7 +1,6 @@
 [SETUP]
 num_radios=3
 start_iwd=0
-hwsim_medium=no
 
 [HOSTAPD]
 rad0=ssidTKIP.conf
diff --git a/autotests/testOWE/hw.conf b/autotests/testOWE/hw.conf
index fe59f389..1421b69c 100644
--- a/autotests/testOWE/hw.conf
+++ b/autotests/testOWE/hw.conf
@@ -1,5 +1,6 @@
 [SETUP]
 num_radios=4
+hwsim_medium=yes
 
 [HOSTAPD]
 rad0=ssidOWE-1.conf
diff --git a/autotests/testP2P/hw.conf b/autotests/testP2P/hw.conf
index d8f213f7..7cc89267 100644
--- a/autotests/testP2P/hw.conf
+++ b/autotests/testP2P/hw.conf
@@ -1,6 +1,5 @@
 [SETUP]
 num_radios=2
-hwsim_medium=no
 
 [WPA_SUPPLICANT]
 rad1=rad1-p2p.conf
diff --git a/autotests/testPSK-roam/hw.conf b/autotests/testPSK-roam/hw.conf
index 3fc77613..c2b35d6e 100644
--- a/autotests/testPSK-roam/hw.conf
+++ b/autotests/testPSK-roam/hw.conf
@@ -1,6 +1,7 @@
 [SETUP]
 num_radios=3
 start_iwd=0
+hwsim_medium=yes
 
 [HOSTAPD]
 rad0=ft-psk-ccmp-1.conf
diff --git a/autotests/testRSSIAgent/hw.conf b/autotests/testRSSIAgent/hw.conf
index 1145b4b6..fb5a0bbd 100644
--- a/autotests/testRSSIAgent/hw.conf
+++ b/autotests/testRSSIAgent/hw.conf
@@ -1,5 +1,6 @@
 [SETUP]
 num_radios=2
+hwsim_medium=yes
 
 [HOSTAPD]
 rad0=open.conf
diff --git a/autotests/testRoamRetry/hw.conf b/autotests/testRoamRetry/hw.conf
index 8b450b63..3408a352 100644
--- a/autotests/testRoamRetry/hw.conf
+++ b/autotests/testRoamRetry/hw.conf
@@ -1,5 +1,6 @@
 [SETUP]
 num_radios=3
+hwsim_medium=yes
 
 [HOSTAPD]
 rad0=ssid1.conf
diff --git a/autotests/testRoamRetry/ssid1.conf b/autotests/testRoamRetry/ssid1.conf
index 2c5cc8d6..f7b3dac5 100644
--- a/autotests/testRoamRetry/ssid1.conf
+++ b/autotests/testRoamRetry/ssid1.conf
@@ -9,3 +9,4 @@ wpa_passphrase=secret123
 ctrl_interface=/var/run/hostapd
 
 rrm_neighbor_report=1
+beacon_int=10
diff --git a/autotests/testRoamRetry/ssid2.conf b/autotests/testRoamRetry/ssid2.conf
index 5626c032..4907b549 100644
--- a/autotests/testRoamRetry/ssid2.conf
+++ b/autotests/testRoamRetry/ssid2.conf
@@ -9,3 +9,4 @@ wpa_passphrase=secret123
 ctrl_interface=/var/run/hostapd
 
 rrm_neighbor_report=1
+beacon_int=10
diff --git a/autotests/testSAE/hw.conf b/autotests/testSAE/hw.conf
index c2b1ba51..72b161b8 100644
--- a/autotests/testSAE/hw.conf
+++ b/autotests/testSAE/hw.conf
@@ -1,6 +1,7 @@
 [SETUP]
 num_radios=2
 start_iwd=0
+hwsim_medium=yes
 
 [HOSTAPD]
 rad0=ssidSAE.conf
diff --git a/autotests/testSAQuery-spoofing/hw.conf b/autotests/testSAQuery-spoofing/hw.conf
index fad15b88..38b57e18 100644
--- a/autotests/testSAQuery-spoofing/hw.conf
+++ b/autotests/testSAQuery-spoofing/hw.conf
@@ -1,5 +1,6 @@
 [SETUP]
 num_radios=2
+hwsim_medium=yes
 
 [HOSTAPD]
 rad0=ssidCCMP.conf
diff --git a/autotests/testSAQuery-spoofing/ssidCCMP.conf b/autotests/testSAQuery-spoofing/ssidCCMP.conf
index c79f5e55..517083bf 100644
--- a/autotests/testSAQuery-spoofing/ssidCCMP.conf
+++ b/autotests/testSAQuery-spoofing/ssidCCMP.conf
@@ -8,3 +8,4 @@ wpa_passphrase=secret123
 
 ieee80211w=2
 wpa_key_mgmt=WPA-PSK-SHA256
+beacon_int=10
diff --git a/tools/test-runner b/tools/test-runner
index 28c7d900..1d148b13 100755
--- a/tools/test-runner
+++ b/tools/test-runner
@@ -755,7 +755,7 @@ class TestContext(Namespace):
 		nradios = int(setup['num_radios'])
 		args = ['hwsim']
 
-		if not self.hw_config['SETUP'].get('hwsim_medium', 'yes') in ['yes', '1', 'true']:
+		if self.hw_config['SETUP'].get('hwsim_medium', 'no') in ['no', '0', 'false']:
 			# register hwsim as medium
 			args.extend(['--no-register'])
 
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/7] auto-t: update all tests to remove bad scanning logic
  2021-08-12 20:38 [PATCH 1/7] station: make autoconnect settable via debug interface James Prestwood
                   ` (3 preceding siblings ...)
  2021-08-12 20:38 ` [PATCH 5/7] auto-t: make hwsim registration off " James Prestwood
@ 2021-08-12 20:38 ` James Prestwood
  2021-08-12 20:38 ` [PATCH 7/7] auto-t: set autoconnect=True for tests that need it James Prestwood
  2021-08-12 21:59 ` [PATCH 1/7] station: make autoconnect settable via debug interface Denis Kenzior
  6 siblings, 0 replies; 8+ messages in thread
From: James Prestwood @ 2021-08-12 20:38 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 56442 bytes --]

This changes all tests to use the default get_ordered_network behavior
rather than some custom or incorrect logic. Any use of
scan_if_needed=True has been removed since this is now the default.
Also any explicit scanning has been removed for tests which do not
require it (where the default behavior is good enough).
---
 autotests/testAP/connection_test.py            |  2 +-
 .../connection_test.py                         |  8 --------
 autotests/testAgent/agent_test.py              |  2 +-
 .../testBSSBlacklist/all_blacklisted_test.py   |  2 +-
 autotests/testBSSBlacklist/bad_pass_test.py    |  2 +-
 autotests/testBSSBlacklist/connection_test.py  |  2 +-
 .../testBSSBlacklist/temp_blacklist_test.py    | 18 +-----------------
 .../connect_command_test.py                    |  3 +++
 .../testDisconnectOnConnect/connection_test.py |  8 --------
 autotests/testEAP-AKA-ofono/connection_test.py |  8 --------
 .../testEAP-AKA-prime-ofono/connection_test.py |  8 --------
 .../testEAP-PEAP-GTC/peap_gtc_nosecret_test.py |  8 --------
 autotests/testEAP-PEAP-GTC/peap_gtc_test.py    |  8 --------
 .../testEAP-PEAP-MSCHAPv2/connection_test.py   |  8 --------
 autotests/testEAP-PEAP-SIM/connection_test.py  |  8 --------
 autotests/testEAP-PEAP/peap_frag_test.py       |  8 --------
 autotests/testEAP-PEAP/peap_v0_test.py         |  8 --------
 autotests/testEAP-PEAP/peap_v1_test.py         |  8 --------
 .../testEAP-PEAPv0-CryptoBinding/ISK_test.py   |  8 --------
 .../testEAP-PEAPv0-CryptoBinding/NoISK_test.py |  8 --------
 autotests/testEAP-PWD/connection_test.py       |  8 --------
 autotests/testEAP-PWD/frag_test.py             |  8 --------
 autotests/testEAP-SIM-ofono/connection_test.py |  8 --------
 autotests/testEAP-TLS-Frag/connection_test.py  |  8 --------
 .../connection_test.py                         | 10 ----------
 autotests/testEAP-TLS/connection_test.py       | 10 ----------
 .../testEAP-TLSwithMFPC/connection_test.py     |  8 --------
 .../testEAP-TLSwithMFPR/connection_test.py     |  8 --------
 autotests/testEAP-TTLS-CHAP/connection_test.py |  8 --------
 .../connection_test.py                         | 10 ----------
 autotests/testEAP-TTLS-Frag/connection_test.py |  8 --------
 .../testEAP-TTLS-MSCHAP/connection_test.py     |  8 --------
 .../testEAP-TTLS-MSCHAPv2/connection_test.py   | 11 +----------
 .../testEAP-TTLS-MSCHAPv2/failure_test.py      | 11 +----------
 autotests/testEAP-TTLS-PAP/connection_test.py  |  8 --------
 autotests/testEAP-TTLS/connection_test.py      |  8 --------
 autotests/testFILS/fils_256_test.py            |  8 --------
 autotests/testFILS/fils_384_test.py            |  8 --------
 autotests/testFT-8021x-roam/connection_test.py |  2 +-
 autotests/testHT-VHT/connection_test.py        |  6 +++++-
 .../connect_after_hidden_connect_test.py       |  3 +--
 autotests/testHotspot/anqp_delay_test.py       | 13 ++++++++++++-
 autotests/testHotspot/hessid_test.py           |  8 --------
 autotests/testHotspot/hotspot_test.py          |  8 --------
 autotests/testHotspot/roaming_test.py          |  8 --------
 autotests/testKnownNetworks/frequency_test.py  |  8 --------
 .../testKnownNetworks/known_network_test.py    |  8 --------
 autotests/testMFP-Options/connection_test.py   |  8 --------
 autotests/testNetconfig/connection_test.py     |  8 --------
 autotests/testNetconfig/static_test.py         |  8 --------
 autotests/testOWE/connection_test.py           |  4 ++--
 autotests/testOWE/timeout_test.py              | 11 -----------
 autotests/testOpen/connection_test.py          |  8 --------
 autotests/testPreauth-roam/connection_test.py  |  2 +-
 autotests/testRRM/connection_test.py           |  8 --------
 autotests/testRoamRetry/fast_retry_test.py     |  8 --------
 autotests/testRoamRetry/stop_retry_test.py     |  8 --------
 autotests/testSAE/connection_test.py           |  7 ++++++-
 autotests/testSAE/failure_test.py              |  8 --------
 autotests/testSAE/timeout_test.py              |  8 --------
 .../testSAQuery-spoofing/connection_test.py    |  5 +----
 autotests/testSAQuery/connection_test.py       |  8 --------
 autotests/testWPA/connection_test.py           |  8 --------
 autotests/testWPA2-SHA256/connection_test.py   |  8 --------
 autotests/testWPA2-no-CCMP/connection_test.py  |  8 --------
 autotests/testWPA2/connection_test.py          |  8 --------
 autotests/testWPA2/failure_test.py             |  8 --------
 autotests/testWPA2/password_test.py            | 10 ----------
 autotests/testWPA2withMFP/connection_test.py   |  8 --------
 69 files changed, 40 insertions(+), 482 deletions(-)

diff --git a/autotests/testAP/connection_test.py b/autotests/testAP/connection_test.py
index 754ce952..1bba5f35 100644
--- a/autotests/testAP/connection_test.py
+++ b/autotests/testAP/connection_test.py
@@ -15,7 +15,7 @@ class Test(unittest.TestCase):
     def client_connect(self, wd, dev):
         hostapd = HostapdCLI(config='psk-ccmp.conf')
 
-        ordered_network = dev.get_ordered_network('TestAP1', True)
+        ordered_network = dev.get_ordered_network('TestAP1')
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
 
diff --git a/autotests/testAddressRandomization/connection_test.py b/autotests/testAddressRandomization/connection_test.py
index d9806f8a..32163e0f 100644
--- a/autotests/testAddressRandomization/connection_test.py
+++ b/autotests/testAddressRandomization/connection_test.py
@@ -45,14 +45,6 @@ class Test(unittest.TestCase):
 
         perm_addr = device.address
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         # 1. Test per-network deterministic MAC generation
         os.system('cat pernetwork.psk > /tmp/iwd/ssidCCMP.psk')
         new_addr = self.try_connection(wd)
diff --git a/autotests/testAgent/agent_test.py b/autotests/testAgent/agent_test.py
index 60465d3f..7d3b6119 100644
--- a/autotests/testAgent/agent_test.py
+++ b/autotests/testAgent/agent_test.py
@@ -17,7 +17,7 @@ class Test(unittest.TestCase):
     def check_connection(self, wd, ssid):
 
         device = wd.list_devices(1)[0]
-        ordered_network = device.get_ordered_network(ssid, scan_if_needed=True)
+        ordered_network = device.get_ordered_network(ssid)
 
         ordered_network.network_object.connect()
 
diff --git a/autotests/testBSSBlacklist/all_blacklisted_test.py b/autotests/testBSSBlacklist/all_blacklisted_test.py
index b52d0900..4d8cca1e 100644
--- a/autotests/testBSSBlacklist/all_blacklisted_test.py
+++ b/autotests/testBSSBlacklist/all_blacklisted_test.py
@@ -47,7 +47,7 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        ordered_network = device.get_ordered_network("TestBlacklist", scan_if_needed=True)
+        ordered_network = device.get_ordered_network("TestBlacklist")
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
 
diff --git a/autotests/testBSSBlacklist/bad_pass_test.py b/autotests/testBSSBlacklist/bad_pass_test.py
index 1d41f390..5ea5df0c 100644
--- a/autotests/testBSSBlacklist/bad_pass_test.py
+++ b/autotests/testBSSBlacklist/bad_pass_test.py
@@ -47,7 +47,7 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        ordered_network = device.get_ordered_network("TestBlacklist", scan_if_needed=True)
+        ordered_network = device.get_ordered_network("TestBlacklist")
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
 
diff --git a/autotests/testBSSBlacklist/connection_test.py b/autotests/testBSSBlacklist/connection_test.py
index 58931d3e..23b56b57 100644
--- a/autotests/testBSSBlacklist/connection_test.py
+++ b/autotests/testBSSBlacklist/connection_test.py
@@ -51,7 +51,7 @@ class Test(unittest.TestCase):
 
         devices[1].disconnect()
 
-        ordered_network = device.get_ordered_network("TestBlacklist", scan_if_needed=True)
+        ordered_network = device.get_ordered_network("TestBlacklist")
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
 
diff --git a/autotests/testBSSBlacklist/temp_blacklist_test.py b/autotests/testBSSBlacklist/temp_blacklist_test.py
index 02438f89..cbd07ad2 100644
--- a/autotests/testBSSBlacklist/temp_blacklist_test.py
+++ b/autotests/testBSSBlacklist/temp_blacklist_test.py
@@ -46,7 +46,7 @@ class Test(unittest.TestCase):
 
         dev1, dev2 = wd.list_devices(2)
 
-        ordered_network = dev1.get_ordered_network("TestBlacklist", scan_if_needed=True)
+        ordered_network = dev1.get_ordered_network("TestBlacklist")
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
 
@@ -63,14 +63,6 @@ class Test(unittest.TestCase):
         # dev1 now connected, this should max out the first AP, causing the next
         # connection to fail to this AP.
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(dev2, condition)
-
-        dev2.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(dev2, condition)
-
         ordered_network = dev2.get_ordered_network("TestBlacklist")
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
@@ -92,14 +84,6 @@ class Test(unittest.TestCase):
         dev1.disconnect()
         dev2.disconnect()
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(dev2, condition)
-
-        dev2.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(dev2, condition)
-
         ordered_network = dev2.get_ordered_network("TestBlacklist")
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
diff --git a/autotests/testClientNonInteractive/connect_command_test.py b/autotests/testClientNonInteractive/connect_command_test.py
index 247b40c7..8ca7ad42 100644
--- a/autotests/testClientNonInteractive/connect_command_test.py
+++ b/autotests/testClientNonInteractive/connect_command_test.py
@@ -98,6 +98,9 @@ class Test(unittest.TestCase):
 
         device.scan()
 
+        condition = 'obj.scanning'
+        cls.wd.wait_for_object_condition(device, condition)
+
         condition = 'not obj.scanning'
         cls.wd.wait_for_object_condition(device, condition)
 
diff --git a/autotests/testDisconnectOnConnect/connection_test.py b/autotests/testDisconnectOnConnect/connection_test.py
index 7e36d4aa..2fc6fb89 100644
--- a/autotests/testDisconnectOnConnect/connection_test.py
+++ b/autotests/testDisconnectOnConnect/connection_test.py
@@ -20,14 +20,6 @@ class Test(unittest.TestCase):
 
         device = wd.list_devices(1)[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         wpa_net = device.get_ordered_network('ssidTKIP')
         self.assertEqual(wpa_net.type, NetworkType.psk)
 
diff --git a/autotests/testEAP-AKA-ofono/connection_test.py b/autotests/testEAP-AKA-ofono/connection_test.py
index 7b1a8c37..1b250da2 100644
--- a/autotests/testEAP-AKA-ofono/connection_test.py
+++ b/autotests/testEAP-AKA-ofono/connection_test.py
@@ -22,14 +22,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-AKA')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-AKA-prime-ofono/connection_test.py b/autotests/testEAP-AKA-prime-ofono/connection_test.py
index dc8f04bf..5edf4965 100644
--- a/autotests/testEAP-AKA-prime-ofono/connection_test.py
+++ b/autotests/testEAP-AKA-prime-ofono/connection_test.py
@@ -22,14 +22,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-AKA')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-PEAP-GTC/peap_gtc_nosecret_test.py b/autotests/testEAP-PEAP-GTC/peap_gtc_nosecret_test.py
index 16203c68..a4903dbd 100644
--- a/autotests/testEAP-PEAP-GTC/peap_gtc_nosecret_test.py
+++ b/autotests/testEAP-PEAP-GTC/peap_gtc_nosecret_test.py
@@ -18,14 +18,6 @@ class Test(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-PEAPv1-GTC-nosecret')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-PEAP-GTC/peap_gtc_test.py b/autotests/testEAP-PEAP-GTC/peap_gtc_test.py
index f3bea378..c5ccb50f 100644
--- a/autotests/testEAP-PEAP-GTC/peap_gtc_test.py
+++ b/autotests/testEAP-PEAP-GTC/peap_gtc_test.py
@@ -17,14 +17,6 @@ class Test(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-PEAPv1-GTC')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-PEAP-MSCHAPv2/connection_test.py b/autotests/testEAP-PEAP-MSCHAPv2/connection_test.py
index 7998fa07..017729cf 100644
--- a/autotests/testEAP-PEAP-MSCHAPv2/connection_test.py
+++ b/autotests/testEAP-PEAP-MSCHAPv2/connection_test.py
@@ -17,14 +17,6 @@ class Test(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-PEAP-MSCHAPv2')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-PEAP-SIM/connection_test.py b/autotests/testEAP-PEAP-SIM/connection_test.py
index 4183e65e..ebf22a46 100644
--- a/autotests/testEAP-PEAP-SIM/connection_test.py
+++ b/autotests/testEAP-PEAP-SIM/connection_test.py
@@ -17,14 +17,6 @@ class Test(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-PEAP-SIM')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-PEAP/peap_frag_test.py b/autotests/testEAP-PEAP/peap_frag_test.py
index 8bae8bd9..c5a7ccff 100644
--- a/autotests/testEAP-PEAP/peap_frag_test.py
+++ b/autotests/testEAP-PEAP/peap_frag_test.py
@@ -16,14 +16,6 @@ class Test(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-PEAP-frag')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-PEAP/peap_v0_test.py b/autotests/testEAP-PEAP/peap_v0_test.py
index 4ad73c20..ea93ff6f 100644
--- a/autotests/testEAP-PEAP/peap_v0_test.py
+++ b/autotests/testEAP-PEAP/peap_v0_test.py
@@ -16,14 +16,6 @@ class Test(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-PEAPv0')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-PEAP/peap_v1_test.py b/autotests/testEAP-PEAP/peap_v1_test.py
index efd55337..16f38d92 100644
--- a/autotests/testEAP-PEAP/peap_v1_test.py
+++ b/autotests/testEAP-PEAP/peap_v1_test.py
@@ -16,14 +16,6 @@ class Test(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-PEAPv1')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-PEAPv0-CryptoBinding/ISK_test.py b/autotests/testEAP-PEAPv0-CryptoBinding/ISK_test.py
index 5febc8db..07382623 100644
--- a/autotests/testEAP-PEAPv0-CryptoBinding/ISK_test.py
+++ b/autotests/testEAP-PEAPv0-CryptoBinding/ISK_test.py
@@ -19,14 +19,6 @@ class Test(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-PEAPv0-ISK')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-PEAPv0-CryptoBinding/NoISK_test.py b/autotests/testEAP-PEAPv0-CryptoBinding/NoISK_test.py
index 638ad4b3..9a1fa52c 100644
--- a/autotests/testEAP-PEAPv0-CryptoBinding/NoISK_test.py
+++ b/autotests/testEAP-PEAPv0-CryptoBinding/NoISK_test.py
@@ -23,14 +23,6 @@ class Test(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-PEAPv0-NoISK')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-PWD/connection_test.py b/autotests/testEAP-PWD/connection_test.py
index de3c6122..c7ca89af 100644
--- a/autotests/testEAP-PWD/connection_test.py
+++ b/autotests/testEAP-PWD/connection_test.py
@@ -26,14 +26,6 @@ class Test(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-PWD')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-PWD/frag_test.py b/autotests/testEAP-PWD/frag_test.py
index bb6103bd..668beb4b 100644
--- a/autotests/testEAP-PWD/frag_test.py
+++ b/autotests/testEAP-PWD/frag_test.py
@@ -15,14 +15,6 @@ class Test(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-PWD-frag')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-SIM-ofono/connection_test.py b/autotests/testEAP-SIM-ofono/connection_test.py
index 9f5f2734..b66bc9c7 100644
--- a/autotests/testEAP-SIM-ofono/connection_test.py
+++ b/autotests/testEAP-SIM-ofono/connection_test.py
@@ -23,14 +23,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-SIM')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-TLS-Frag/connection_test.py b/autotests/testEAP-TLS-Frag/connection_test.py
index 3e155eea..d5a5a076 100644
--- a/autotests/testEAP-TLS-Frag/connection_test.py
+++ b/autotests/testEAP-TLS-Frag/connection_test.py
@@ -16,14 +16,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-TLS')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-TLS-embedded-pems/connection_test.py b/autotests/testEAP-TLS-embedded-pems/connection_test.py
index 5d3c0c40..1ca2bed4 100644
--- a/autotests/testEAP-TLS-embedded-pems/connection_test.py
+++ b/autotests/testEAP-TLS-embedded-pems/connection_test.py
@@ -24,16 +24,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        if not device.get_ordered_networks():
-            device.scan()
-            condition = 'obj.scanning'
-            wd.wait_for_object_condition(device, condition)
-            condition = 'not obj.scanning'
-            wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network(ssid)
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-TLS/connection_test.py b/autotests/testEAP-TLS/connection_test.py
index c90b0ceb..ab096e72 100644
--- a/autotests/testEAP-TLS/connection_test.py
+++ b/autotests/testEAP-TLS/connection_test.py
@@ -24,16 +24,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        if not device.get_ordered_networks():
-            device.scan()
-            condition = 'obj.scanning'
-            wd.wait_for_object_condition(device, condition)
-            condition = 'not obj.scanning'
-            wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network(ssid)
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-TLSwithMFPC/connection_test.py b/autotests/testEAP-TLSwithMFPC/connection_test.py
index 3e155eea..d5a5a076 100644
--- a/autotests/testEAP-TLSwithMFPC/connection_test.py
+++ b/autotests/testEAP-TLSwithMFPC/connection_test.py
@@ -16,14 +16,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-TLS')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-TLSwithMFPR/connection_test.py b/autotests/testEAP-TLSwithMFPR/connection_test.py
index 3e155eea..d5a5a076 100644
--- a/autotests/testEAP-TLSwithMFPR/connection_test.py
+++ b/autotests/testEAP-TLSwithMFPR/connection_test.py
@@ -16,14 +16,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-TLS')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-TTLS-CHAP/connection_test.py b/autotests/testEAP-TTLS-CHAP/connection_test.py
index 0d7d87ab..0cbe251f 100644
--- a/autotests/testEAP-TTLS-CHAP/connection_test.py
+++ b/autotests/testEAP-TTLS-CHAP/connection_test.py
@@ -26,14 +26,6 @@ class Test(unittest.TestCase):
 
         device = wd.list_devices(1)[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-TTLS-CHAP')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-TTLS-EAP-MSCHAPV2/connection_test.py b/autotests/testEAP-TTLS-EAP-MSCHAPV2/connection_test.py
index a9832674..fcfdcb86 100644
--- a/autotests/testEAP-TTLS-EAP-MSCHAPV2/connection_test.py
+++ b/autotests/testEAP-TTLS-EAP-MSCHAPV2/connection_test.py
@@ -21,16 +21,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        if not device.get_ordered_networks():
-            device.scan()
-            condition = 'obj.scanning'
-            wd.wait_for_object_condition(device, condition)
-            condition = 'not obj.scanning'
-            wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-TTLS')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-TTLS-Frag/connection_test.py b/autotests/testEAP-TTLS-Frag/connection_test.py
index ef29425d..226e7af5 100644
--- a/autotests/testEAP-TTLS-Frag/connection_test.py
+++ b/autotests/testEAP-TTLS-Frag/connection_test.py
@@ -16,14 +16,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-TTLS')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-TTLS-MSCHAP/connection_test.py b/autotests/testEAP-TTLS-MSCHAP/connection_test.py
index 1e60fd3e..4832eaae 100644
--- a/autotests/testEAP-TTLS-MSCHAP/connection_test.py
+++ b/autotests/testEAP-TTLS-MSCHAP/connection_test.py
@@ -26,14 +26,6 @@ class Test(unittest.TestCase):
 
         device = wd.list_devices(1)[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-TTLS-MSCHAP')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-TTLS-MSCHAPv2/connection_test.py b/autotests/testEAP-TTLS-MSCHAPv2/connection_test.py
index 78a11087..05f6a604 100644
--- a/autotests/testEAP-TTLS-MSCHAPv2/connection_test.py
+++ b/autotests/testEAP-TTLS-MSCHAPv2/connection_test.py
@@ -24,16 +24,7 @@ class Test(unittest.TestCase):
 
         device = wd.list_devices(1)[0];
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        ordered_networks = device.get_ordered_networks()
-        ordered_network = ordered_networks[0]
+        ordered_network = device.get_ordered_network('ssidEAP-TTLS-MSCHAPv2')
 
         self.assertEqual(ordered_network.name, "ssidEAP-TTLS-MSCHAPv2")
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-TTLS-MSCHAPv2/failure_test.py b/autotests/testEAP-TTLS-MSCHAPv2/failure_test.py
index b4c3c003..5fc4e5b9 100644
--- a/autotests/testEAP-TTLS-MSCHAPv2/failure_test.py
+++ b/autotests/testEAP-TTLS-MSCHAPv2/failure_test.py
@@ -24,16 +24,7 @@ class Test(unittest.TestCase):
 
         device = wd.list_devices(1)[0];
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        ordered_networks = device.get_ordered_networks()
-        ordered_network = ordered_networks[0]
+        ordered_network = device.get_ordered_network("ssidEAP-TTLS-MSCHAPv2")
 
         self.assertEqual(ordered_network.name, "ssidEAP-TTLS-MSCHAPv2")
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-TTLS-PAP/connection_test.py b/autotests/testEAP-TTLS-PAP/connection_test.py
index 3e4a238a..91835642 100644
--- a/autotests/testEAP-TTLS-PAP/connection_test.py
+++ b/autotests/testEAP-TTLS-PAP/connection_test.py
@@ -26,14 +26,6 @@ class Test(unittest.TestCase):
 
         device = wd.list_devices(1)[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-TTLS-PAP')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testEAP-TTLS/connection_test.py b/autotests/testEAP-TTLS/connection_test.py
index 81bcdc3f..c9fff4e1 100644
--- a/autotests/testEAP-TTLS/connection_test.py
+++ b/autotests/testEAP-TTLS/connection_test.py
@@ -17,14 +17,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidEAP-TTLS')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testFILS/fils_256_test.py b/autotests/testFILS/fils_256_test.py
index 1bf4dca3..a9ef3663 100644
--- a/autotests/testFILS/fils_256_test.py
+++ b/autotests/testFILS/fils_256_test.py
@@ -25,14 +25,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidFILS-256')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testFILS/fils_384_test.py b/autotests/testFILS/fils_384_test.py
index 9a5cddfd..b1f0e1c5 100644
--- a/autotests/testFILS/fils_384_test.py
+++ b/autotests/testFILS/fils_384_test.py
@@ -25,14 +25,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidFILS-384')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testFT-8021x-roam/connection_test.py b/autotests/testFT-8021x-roam/connection_test.py
index cd6ebbab..e65e4675 100644
--- a/autotests/testFT-8021x-roam/connection_test.py
+++ b/autotests/testFT-8021x-roam/connection_test.py
@@ -15,7 +15,7 @@ class Test(unittest.TestCase):
 
         device = wd.list_devices(1)[0]
 
-        ordered_network = device.get_ordered_network('TestFT', scan_if_needed=True)
+        ordered_network = device.get_ordered_network('TestFT')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
 
diff --git a/autotests/testHT-VHT/connection_test.py b/autotests/testHT-VHT/connection_test.py
index 3ae2942c..3d190509 100644
--- a/autotests/testHT-VHT/connection_test.py
+++ b/autotests/testHT-VHT/connection_test.py
@@ -25,7 +25,11 @@ class Test(unittest.TestCase):
         condition = 'not obj.scanning'
         wd.wait_for_object_condition(device, condition)
 
-        ordered_network = device.get_ordered_network('testSSID')
+        #
+        # Scanning must be explicitly done to get updated RSSI values. Therefore
+        # scan_if_needed is set false because of the previous scan.
+        #
+        ordered_network = device.get_ordered_network('testSSID', scan_if_needed=False)
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
 
diff --git a/autotests/testHiddenNetworks/connect_after_hidden_connect_test.py b/autotests/testHiddenNetworks/connect_after_hidden_connect_test.py
index d9851c6a..cc36771c 100644
--- a/autotests/testHiddenNetworks/connect_after_hidden_connect_test.py
+++ b/autotests/testHiddenNetworks/connect_after_hidden_connect_test.py
@@ -33,8 +33,7 @@ class TestConnectionAfterHiddenNetwork(unittest.TestCase):
         wd.register_psk_agent(psk_agent)
 
         device = wd.list_devices(1)[0]
-        ordered_network = device.get_ordered_network('ssidOpen',
-                                                     scan_if_needed=True)
+        ordered_network = device.get_ordered_network('ssidOpen')
 
         device.connect_hidden_network_async(name='ssidSomeHidden',
                                                   reply_handler = self._success,
diff --git a/autotests/testHotspot/anqp_delay_test.py b/autotests/testHotspot/anqp_delay_test.py
index adfa57fc..d86504dc 100644
--- a/autotests/testHotspot/anqp_delay_test.py
+++ b/autotests/testHotspot/anqp_delay_test.py
@@ -44,7 +44,18 @@ class Test(unittest.TestCase):
         condition = 'not obj.scanning'
         wd.wait_for_object_condition(device, condition)
 
-        ordered_network = device.get_ordered_network('Hotspot')
+        # If no networks were found we likely had a quick scan. Try again to
+        # allow the full autoconnect scan to happen.
+        try:
+            ordered_network = device.get_ordered_network('Hotspot')
+        except:
+            condition = 'obj.scanning'
+            wd.wait_for_object_condition(device, condition)
+
+            condition = 'not obj.scanning'
+            wd.wait_for_object_condition(device, condition)
+
+            ordered_network = device.get_ordered_network('Hotspot')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
 
diff --git a/autotests/testHotspot/hessid_test.py b/autotests/testHotspot/hessid_test.py
index d22c5d61..5d3954b9 100644
--- a/autotests/testHotspot/hessid_test.py
+++ b/autotests/testHotspot/hessid_test.py
@@ -25,14 +25,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('Hotspot')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testHotspot/hotspot_test.py b/autotests/testHotspot/hotspot_test.py
index 4fb6b071..460ff89f 100644
--- a/autotests/testHotspot/hotspot_test.py
+++ b/autotests/testHotspot/hotspot_test.py
@@ -25,14 +25,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('Hotspot')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testHotspot/roaming_test.py b/autotests/testHotspot/roaming_test.py
index 52d89f84..d18864e0 100644
--- a/autotests/testHotspot/roaming_test.py
+++ b/autotests/testHotspot/roaming_test.py
@@ -25,14 +25,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('Hotspot')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
diff --git a/autotests/testKnownNetworks/frequency_test.py b/autotests/testKnownNetworks/frequency_test.py
index 9c523bb2..83e51c06 100644
--- a/autotests/testKnownNetworks/frequency_test.py
+++ b/autotests/testKnownNetworks/frequency_test.py
@@ -38,14 +38,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         #
         # Connect to the PSK network, then Hotspot so IWD creates 2 entries in
         # the known frequency file.
diff --git a/autotests/testKnownNetworks/known_network_test.py b/autotests/testKnownNetworks/known_network_test.py
index 6ac19bc6..2bdcc955 100644
--- a/autotests/testKnownNetworks/known_network_test.py
+++ b/autotests/testKnownNetworks/known_network_test.py
@@ -14,14 +14,6 @@ class Test(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        device.scan()
-
-        condition = 'obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidNew')
 
         condition = 'not obj.connected'
diff --git a/autotests/testMFP-Options/connection_test.py b/autotests/testMFP-Options/connection_test.py
index 0f1ef830..21cd8058 100644
--- a/autotests/testMFP-Options/connection_test.py
+++ b/autotests/testMFP-Options/connection_test.py
@@ -61,14 +61,6 @@ class TestMFP(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         if config_dir == '/tmp/IWD-MFP2':
             self.check_mfp_connection(wd, device, 'ssidMFP0', True)
         else:
diff --git a/autotests/testNetconfig/connection_test.py b/autotests/testNetconfig/connection_test.py
index fad0e82b..43dab243 100644
--- a/autotests/testNetconfig/connection_test.py
+++ b/autotests/testNetconfig/connection_test.py
@@ -24,14 +24,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidTKIP')
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
diff --git a/autotests/testNetconfig/static_test.py b/autotests/testNetconfig/static_test.py
index b304f06d..7d908423 100644
--- a/autotests/testNetconfig/static_test.py
+++ b/autotests/testNetconfig/static_test.py
@@ -30,14 +30,6 @@ class Test(unittest.TestCase):
         dev1 = wd.list_devices(1)[0]
         dev2 = wd_ns0.list_devices(1)[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(dev1, condition)
-
-        dev1.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(dev1, condition)
-
         ordered_network = dev1.get_ordered_network('ssidTKIP')
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
diff --git a/autotests/testOWE/connection_test.py b/autotests/testOWE/connection_test.py
index 0be09263..baef4d49 100644
--- a/autotests/testOWE/connection_test.py
+++ b/autotests/testOWE/connection_test.py
@@ -20,7 +20,7 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        device.get_ordered_network('ssidOWE', scan_if_needed=True)
+        device.get_ordered_network('ssidOWE')
 
         device.connect_bssid(hapd.bssid)
 
@@ -41,7 +41,7 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        device.get_ordered_network('ssidOWE', scan_if_needed=True)
+        device.get_ordered_network('ssidOWE')
 
         device.connect_bssid(hapd0.bssid)
 
diff --git a/autotests/testOWE/timeout_test.py b/autotests/testOWE/timeout_test.py
index d75bc8b9..fbf79f4c 100644
--- a/autotests/testOWE/timeout_test.py
+++ b/autotests/testOWE/timeout_test.py
@@ -27,17 +27,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidOWE')
 
         self.assertEqual(ordered_network.type, NetworkType.open)
diff --git a/autotests/testOpen/connection_test.py b/autotests/testOpen/connection_test.py
index 48417ef3..7289ae80 100644
--- a/autotests/testOpen/connection_test.py
+++ b/autotests/testOpen/connection_test.py
@@ -17,14 +17,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidOpen')
 
         self.assertEqual(ordered_network.type, NetworkType.open)
diff --git a/autotests/testPreauth-roam/connection_test.py b/autotests/testPreauth-roam/connection_test.py
index 545d4cba..63b73b54 100644
--- a/autotests/testPreauth-roam/connection_test.py
+++ b/autotests/testPreauth-roam/connection_test.py
@@ -34,7 +34,7 @@ class Test(unittest.TestCase):
 
         device = wd.list_devices(1)[0]
 
-        ordered_network = device.get_ordered_network('TestPreauth', scan_if_needed=True)
+        ordered_network = device.get_ordered_network('TestPreauth')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
 
diff --git a/autotests/testRRM/connection_test.py b/autotests/testRRM/connection_test.py
index e1c077c9..278c69ce 100644
--- a/autotests/testRRM/connection_test.py
+++ b/autotests/testRRM/connection_test.py
@@ -36,14 +36,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidRRM')
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
diff --git a/autotests/testRoamRetry/fast_retry_test.py b/autotests/testRoamRetry/fast_retry_test.py
index ce2c5603..d6324c31 100644
--- a/autotests/testRoamRetry/fast_retry_test.py
+++ b/autotests/testRoamRetry/fast_retry_test.py
@@ -61,14 +61,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('TestRoamRetry')
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
diff --git a/autotests/testRoamRetry/stop_retry_test.py b/autotests/testRoamRetry/stop_retry_test.py
index 38f58398..be9776a5 100644
--- a/autotests/testRoamRetry/stop_retry_test.py
+++ b/autotests/testRoamRetry/stop_retry_test.py
@@ -60,14 +60,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('TestRoamRetry')
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
diff --git a/autotests/testSAE/connection_test.py b/autotests/testSAE/connection_test.py
index 64c53001..f3e865e1 100644
--- a/autotests/testSAE/connection_test.py
+++ b/autotests/testSAE/connection_test.py
@@ -30,7 +30,12 @@ class Test(unittest.TestCase):
         wd.wait_for_object_condition(device, 'obj.scanning')
         wd.wait_for_object_condition(device, 'not obj.scanning')
 
-        network = device.get_ordered_network('ssidSAE')
+        #
+        # An explicit scan was done prior due to hostapd options changing.
+        # Because of this scan_if_needed is set to False to avoid a redundant
+        # scan
+        #
+        network = device.get_ordered_network('ssidSAE', scan_if_needed=False)
 
         self.assertEqual(network.type, NetworkType.psk)
 
diff --git a/autotests/testSAE/failure_test.py b/autotests/testSAE/failure_test.py
index 18c0e747..95872413 100644
--- a/autotests/testSAE/failure_test.py
+++ b/autotests/testSAE/failure_test.py
@@ -19,14 +19,6 @@ class Test(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         network = device.get_ordered_network('ssidSAE')
 
         self.assertEqual(network.type, NetworkType.psk)
diff --git a/autotests/testSAE/timeout_test.py b/autotests/testSAE/timeout_test.py
index 534e1ae8..28ff288c 100644
--- a/autotests/testSAE/timeout_test.py
+++ b/autotests/testSAE/timeout_test.py
@@ -23,14 +23,6 @@ class Test(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         network = device.get_ordered_network('ssidSAE')
 
         self.assertEqual(network.type, NetworkType.psk)
diff --git a/autotests/testSAQuery-spoofing/connection_test.py b/autotests/testSAQuery-spoofing/connection_test.py
index a1e84de6..c4c4e923 100644
--- a/autotests/testSAQuery-spoofing/connection_test.py
+++ b/autotests/testSAQuery-spoofing/connection_test.py
@@ -29,10 +29,7 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        ordered_network = device.get_ordered_network('ssidCCMP', scan_if_needed=True)
+        ordered_network = device.get_ordered_network('ssidCCMP')
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
 
diff --git a/autotests/testSAQuery/connection_test.py b/autotests/testSAQuery/connection_test.py
index 571e6e9f..3a66d118 100644
--- a/autotests/testSAQuery/connection_test.py
+++ b/autotests/testSAQuery/connection_test.py
@@ -23,14 +23,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidCCMP')
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
diff --git a/autotests/testWPA/connection_test.py b/autotests/testWPA/connection_test.py
index 3962c807..7c1a03bd 100644
--- a/autotests/testWPA/connection_test.py
+++ b/autotests/testWPA/connection_test.py
@@ -21,14 +21,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidTKIP')
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
diff --git a/autotests/testWPA2-SHA256/connection_test.py b/autotests/testWPA2-SHA256/connection_test.py
index 70c708da..982b69e2 100644
--- a/autotests/testWPA2-SHA256/connection_test.py
+++ b/autotests/testWPA2-SHA256/connection_test.py
@@ -20,14 +20,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidCCMP')
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
diff --git a/autotests/testWPA2-no-CCMP/connection_test.py b/autotests/testWPA2-no-CCMP/connection_test.py
index c2923dd5..31b1c60f 100644
--- a/autotests/testWPA2-no-CCMP/connection_test.py
+++ b/autotests/testWPA2-no-CCMP/connection_test.py
@@ -21,14 +21,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidCCMP')
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
diff --git a/autotests/testWPA2/connection_test.py b/autotests/testWPA2/connection_test.py
index 3ff9b50f..bf8831ea 100644
--- a/autotests/testWPA2/connection_test.py
+++ b/autotests/testWPA2/connection_test.py
@@ -21,14 +21,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidCCMP')
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
diff --git a/autotests/testWPA2/failure_test.py b/autotests/testWPA2/failure_test.py
index 55016a92..605ee5dd 100644
--- a/autotests/testWPA2/failure_test.py
+++ b/autotests/testWPA2/failure_test.py
@@ -22,14 +22,6 @@ class Test(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidCCMP')
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
diff --git a/autotests/testWPA2/password_test.py b/autotests/testWPA2/password_test.py
index 3c6ed407..d937d5c0 100644
--- a/autotests/testWPA2/password_test.py
+++ b/autotests/testWPA2/password_test.py
@@ -22,16 +22,6 @@ class Test(unittest.TestCase):
         condition = 'obj.state == DeviceState.disconnected'
         wd.wait_for_object_condition(device, condition)
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        if not device.get_ordered_networks():
-            device.scan()
-            condition = 'obj.scanning'
-            wd.wait_for_object_condition(device, condition)
-            condition = 'not obj.scanning'
-            wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network("ssidCCMP")
         self.assertEqual(ordered_network.type, NetworkType.psk)
         network = ordered_network.network_object
diff --git a/autotests/testWPA2withMFP/connection_test.py b/autotests/testWPA2withMFP/connection_test.py
index 70c708da..982b69e2 100644
--- a/autotests/testWPA2withMFP/connection_test.py
+++ b/autotests/testWPA2withMFP/connection_test.py
@@ -20,14 +20,6 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         device = devices[0]
 
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         ordered_network = device.get_ordered_network('ssidCCMP')
 
         self.assertEqual(ordered_network.type, NetworkType.psk)
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 7/7] auto-t: set autoconnect=True for tests that need it
  2021-08-12 20:38 [PATCH 1/7] station: make autoconnect settable via debug interface James Prestwood
                   ` (4 preceding siblings ...)
  2021-08-12 20:38 ` [PATCH 6/7] auto-t: update all tests to remove bad scanning logic James Prestwood
@ 2021-08-12 20:38 ` James Prestwood
  2021-08-12 21:59 ` [PATCH 1/7] station: make autoconnect settable via debug interface Denis Kenzior
  6 siblings, 0 replies; 8+ messages in thread
From: James Prestwood @ 2021-08-12 20:38 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 6126 bytes --]

After the default behavior was changed to disable autoconnect there
were several tests which still needed it to be turned on.
---
 autotests/testBSSBlacklist/connection_test.py   | 6 ++----
 autotests/testConnectAutoconnect/validation.py  | 2 ++
 autotests/testHiddenNetworks/validation.py      | 2 ++
 autotests/testHotspot/anqp_delay_test.py        | 1 +
 autotests/testHotspot/autoconnect_test.py       | 1 +
 autotests/testSAE/autoconnect_test.py           | 1 +
 autotests/testScan/periodic_scan_test.py        | 1 +
 autotests/testScan/requested_scan_test.py       | 1 +
 autotests/testScanKnownFreqs/quick_scan_test.py | 1 +
 9 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/autotests/testBSSBlacklist/connection_test.py b/autotests/testBSSBlacklist/connection_test.py
index 23b56b57..407ee06a 100644
--- a/autotests/testBSSBlacklist/connection_test.py
+++ b/autotests/testBSSBlacklist/connection_test.py
@@ -81,10 +81,8 @@ class Test(unittest.TestCase):
 
         rule0.drop = False
 
-        # Next try autoconnecting to a network with a blacklisted BSS. Since an
-        # explicit disconnect call would disable autoconnect we reset
-        # hostapd which will disconnect IWD.
-        bss_hostapd[1].reload()
+        device.disconnect()
+        device.autoconnect = True
 
         condition = 'not obj.connected'
         wd.wait_for_object_condition(ordered_network.network_object, condition)
diff --git a/autotests/testConnectAutoconnect/validation.py b/autotests/testConnectAutoconnect/validation.py
index b240d25d..4e246712 100644
--- a/autotests/testConnectAutoconnect/validation.py
+++ b/autotests/testConnectAutoconnect/validation.py
@@ -28,6 +28,8 @@ class TestConnectAutoConnect(unittest.TestCase):
         wd.wait_for_object_condition(device, condition)
 
     def check_autoconnect(self, wd, device, ssid, throws):
+        device.autoconnect = True
+
         if throws is None:
             condition = 'obj.state == DeviceState.connected'
             wd.wait_for_object_condition(device, condition)
diff --git a/autotests/testHiddenNetworks/validation.py b/autotests/testHiddenNetworks/validation.py
index 7ff7075a..793b459f 100644
--- a/autotests/testHiddenNetworks/validation.py
+++ b/autotests/testHiddenNetworks/validation.py
@@ -48,11 +48,13 @@ class TestConnectAutoConnect(unittest.TestCase):
         devices = wd.list_devices(1)
         self.assertIsNotNone(devices)
         device = devices[0]
+        device.autoconnect = autoconnect
 
         if autoconnect:
             self.check_autoconnect_hidden_network(wd, device, ssid, throws)
         else:
             if wait_periodic_scan:
+                device.autoconnect = True
                 condition = 'obj.scanning'
                 wd.wait_for_object_condition(device, condition)
                 condition = 'not obj.scanning'
diff --git a/autotests/testHotspot/anqp_delay_test.py b/autotests/testHotspot/anqp_delay_test.py
index d86504dc..67c12025 100644
--- a/autotests/testHotspot/anqp_delay_test.py
+++ b/autotests/testHotspot/anqp_delay_test.py
@@ -33,6 +33,7 @@ class Test(unittest.TestCase):
 
         devices = wd.list_devices(1)
         device = devices[0]
+        device.autoconnect = True
 
         # We are dependent on a periodic scan here. We want to wait for this
         # because this is the first opportunity IWD has to do ANQP. Once ANQP
diff --git a/autotests/testHotspot/autoconnect_test.py b/autotests/testHotspot/autoconnect_test.py
index b8caa7fb..354bf61b 100644
--- a/autotests/testHotspot/autoconnect_test.py
+++ b/autotests/testHotspot/autoconnect_test.py
@@ -23,6 +23,7 @@ class Test(unittest.TestCase):
 
         devices = wd.list_devices(1)
         device = devices[0]
+        device.autoconnect = True
 
         condition = 'obj.scanning'
         wd.wait_for_object_condition(device, condition)
diff --git a/autotests/testSAE/autoconnect_test.py b/autotests/testSAE/autoconnect_test.py
index 16fcd1e0..9095b7e9 100644
--- a/autotests/testSAE/autoconnect_test.py
+++ b/autotests/testSAE/autoconnect_test.py
@@ -17,6 +17,7 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         self.assertIsNotNone(devices)
         device = devices[0]
+        device.autoconnect = True
 
         condition = 'obj.state == DeviceState.connected'
         wd.wait_for_object_condition(device, condition)
diff --git a/autotests/testScan/periodic_scan_test.py b/autotests/testScan/periodic_scan_test.py
index 439b844d..77dac373 100644
--- a/autotests/testScan/periodic_scan_test.py
+++ b/autotests/testScan/periodic_scan_test.py
@@ -28,6 +28,7 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         self.assertIsNotNone(devices)
         device = devices[0]
+        device.autoconnect = True
 
         # Device initiates a passive periodic scan.
         condition = 'obj.scanning'
diff --git a/autotests/testScan/requested_scan_test.py b/autotests/testScan/requested_scan_test.py
index 69297f27..26e44ddd 100644
--- a/autotests/testScan/requested_scan_test.py
+++ b/autotests/testScan/requested_scan_test.py
@@ -30,6 +30,7 @@ class Test(unittest.TestCase):
         devices = wd.list_devices(1)
         self.assertIsNotNone(devices)
         device = devices[0]
+        device.autoconnect = True
 
         condition = 'obj.scanning'
         wd.wait_for_object_condition(device, condition)
diff --git a/autotests/testScanKnownFreqs/quick_scan_test.py b/autotests/testScanKnownFreqs/quick_scan_test.py
index 35f71457..5a37e6c3 100644
--- a/autotests/testScanKnownFreqs/quick_scan_test.py
+++ b/autotests/testScanKnownFreqs/quick_scan_test.py
@@ -24,6 +24,7 @@ class Test(unittest.TestCase):
     def validate_quick_scan(self, wd):
         devices = wd.list_devices(1)
         device = devices[0]
+        device.autoconnect = True
 
         # Device initiates a passive quick scan and scans only for the known
         # frequencies (listed in .known_network.freq file).
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/7] station: make autoconnect settable via debug interface
  2021-08-12 20:38 [PATCH 1/7] station: make autoconnect settable via debug interface James Prestwood
                   ` (5 preceding siblings ...)
  2021-08-12 20:38 ` [PATCH 7/7] auto-t: set autoconnect=True for tests that need it James Prestwood
@ 2021-08-12 21:59 ` Denis Kenzior
  6 siblings, 0 replies; 8+ messages in thread
From: Denis Kenzior @ 2021-08-12 21:59 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

Hi James,

On 8/12/21 3:38 PM, James Prestwood wrote:
> This adds the property "AutoConnect" to the station debug interface
> which can be read/written to disable or enable autoconnect globally.
> As one would expect this property is only going to be used for testing
> hence why it was put on the debug interface. Mosts tests disable
> autoconnect (or they should) because it leads to unexpected connections.
> ---
>   src/station.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 44 insertions(+)
> 

All applied, thanks.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-08-12 21:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 20:38 [PATCH 1/7] station: make autoconnect settable via debug interface James Prestwood
2021-08-12 20:38 ` [PATCH 2/7] station: disable autoconnect when in developer mode James Prestwood
2021-08-12 20:38 ` [PATCH 3/7] auto-t: iwd.py: add autoconnect property/StationDebug James Prestwood
2021-08-12 20:38 ` [PATCH 4/7] auto-t: iwd.py: make scan_if_needed True by default James Prestwood
2021-08-12 20:38 ` [PATCH 5/7] auto-t: make hwsim registration off " James Prestwood
2021-08-12 20:38 ` [PATCH 6/7] auto-t: update all tests to remove bad scanning logic James Prestwood
2021-08-12 20:38 ` [PATCH 7/7] auto-t: set autoconnect=True for tests that need it James Prestwood
2021-08-12 21:59 ` [PATCH 1/7] station: make autoconnect settable via debug interface Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.