From: Jouni Malinen Date: Sat, 14 Dec 2024 10:34:20 +0000 (+0200) Subject: tests: Handle newer tshark version returning boolean values X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf67d09e587a6ee1add9b10fb59b5c1cbcabba14;p=thirdparty%2Fhostap.git tests: Handle newer tshark version returning boolean values Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_open.py b/tests/hwsim/test_ap_open.py index 00801b313..ceba146a0 100644 --- a/tests/hwsim/test_ap_open.py +++ b/tests/hwsim/test_ap_open.py @@ -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: diff --git a/tests/hwsim/test_ap_vlan.py b/tests/hwsim/test_ap_vlan.py index 76c3ce93b..f4001bbef 100644 --- a/tests/hwsim/test_ap_vlan.py +++ b/tests/hwsim/test_ap_vlan.py @@ -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: