]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Clean up frequency list in scan_dfs
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 26 Nov 2015 21:42:30 +0000 (23:42 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 26 Nov 2015 21:42:30 +0000 (23:42 +0200)
This makes the test log more readable by converting the values to
integers and sorting the array.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_scan.py

index bb96033ae05013701feba6ab506dbcdfa1abbfd1..ff7e69c1966b80f9e1f5fe39fdb0f328b14a061d 100644 (file)
@@ -940,10 +940,11 @@ def _test_scan_dfs(dev, apdev, params):
                      "wlan.fc.type_subtype == 4", [ "radiotap.channel.freq" ])
     if out is not None:
         freq = out.splitlines()
+        freq = [int(f) for f in freq]
         freq = list(set(freq))
+        freq.sort()
         logger.info("Active scan seen on channels: " + str(freq))
-        for ff in freq:
-            f = int(ff)
+        for f in freq:
             if (f >= 5260 and f <= 5320) or (f >= 5500 and f <= 5700):
                 raise Exception("Active scan on DFS channel: %d" % f)