]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Handle newer tshark version returning boolean values
authorJouni Malinen <j@w1.fi>
Sat, 14 Dec 2024 10:34:20 +0000 (12:34 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 14 Dec 2024 10:34:20 +0000 (12:34 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_open.py
tests/hwsim/test_ap_vlan.py

index 00801b313bfb369b44347cfad89ccac53ff69433..ceba146a03268e58e463c3410e242aaa5a119e50 100644 (file)
@@ -555,7 +555,12 @@ def test_ap_open_ps_mc_buf(dev, apdev, params):
                              "wlan.fc.type_subtype == 0x0008",
                              ["wlan.tim.bmapctl.multicast"])
             for line in out.splitlines():
-                buffered_mcast = int(line)
+                if line == "True":
+                    buffered_mcast = 1
+                elif line == "False":
+                    buffered_mcast = 0
+                else:
+                    buffered_mcast = int(line)
                 if buffered_mcast == 1:
                     break
             if buffered_mcast == 1:
index 76c3ce93b9b3cc2ffa39d4cc8aed87d4c2ac0291..f4001bbefa95cc58246178f2cb8ca22df4f26f95 100644 (file)
@@ -644,7 +644,12 @@ def test_ap_vlan_without_station(dev, apdev, p):
                 raise Exception("second frame not observed")
             state = 1
             for l in lines:
-                is_protected = int(l, 16)
+                if l == "True":
+                    is_protected = 1
+                elif l == "False":
+                    is_protected = 0
+                else:
+                    is_protected = int(l, 16)
                 if is_protected != 1:
                     state = 0
             if state != 1: