]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix mesh_open_vht_160 skipping
authorJouni Malinen <j@w1.fi>
Sat, 24 Dec 2016 22:47:01 +0000 (00:47 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 24 Dec 2016 22:47:01 +0000 (00:47 +0200)
It is possible for wireless-regdb to include a 160 MHz channel, but with
DFS required. This test case need the regulatory information to allow
160 MHz channel without DFS. Fix false failures by skipping the test if
this exact combination is not found.

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

index 0bf5b51aa364344f7ae0ef6209e9aedcad44c7da..6ea79fceb4d1bd7d0710145987093ad37b1c5d93 100644 (file)
@@ -890,8 +890,13 @@ def _test_mesh_open_vht_160(dev, apdev):
 
         cmd = subprocess.Popen(["iw", "reg", "get"], stdout=subprocess.PIPE)
         reg = cmd.stdout.read()
-        if "@ 160)" not in reg:
-            raise HwsimSkip("160 MHz channel not supported in regulatory information")
+        found = False
+        for entry in reg.splitlines():
+            if "@ 160)" in entry and "DFS" not in entry:
+                found = True
+                break
+        if not found:
+            raise HwsimSkip("160 MHz channel without DFS not supported in regulatory information")
 
         add_open_mesh_network(dev[i], freq="5520", chwidth=2)