All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 04/13] auto-t: iwd.py: fix full_scan argument
@ 2022-03-28 17:28 James Prestwood
  0 siblings, 0 replies; only message in thread
From: James Prestwood @ 2022-03-28 17:28 UTC (permalink / raw)
  To: iwd

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

This was not being properly honored when existing networks were
already populated. This poses an issue for any test which uses
full_scan after setting radio values such as signal strength.
---
 autotests/util/iwd.py | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py
index d6620da5..253fe25e 100755
--- a/autotests/util/iwd.py
+++ b/autotests/util/iwd.py
@@ -492,17 +492,18 @@ class Device(IWDDBusAbstract):
            main sorting factor.
         '''
         ordered_networks = []
-        for bus_obj in self._station.GetOrderedNetworks():
-            ordered_network = OrderedNetwork(bus_obj, self._bus, self._namespace)
-            ordered_networks.append(ordered_network)
-
-        names = [x.name for x in ordered_networks]
-
-        # all() will always return true if 'list' is empty
-        if all(x in names for x in list) and len(names) > 0:
-            return ordered_networks
-        elif not scan_if_needed:
-            return None
+        if not full_scan:
+            for bus_obj in self._station.GetOrderedNetworks():
+                ordered_network = OrderedNetwork(bus_obj, self._bus, self._namespace)
+                ordered_networks.append(ordered_network)
+
+            names = [x.name for x in ordered_networks]
+
+            # all() will always return true if 'list' is empty
+            if all(x in names for x in list) and len(names) > 0:
+                return ordered_networks
+            elif not scan_if_needed:
+                return None
 
         condition = 'not obj.scanning'
         IWD._wait_for_object_condition(self, condition)
-- 
2.34.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-28 17:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-28 17:28 [PATCH v4 04/13] auto-t: iwd.py: fix full_scan argument James Prestwood

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.