[PATCH 3/3] tests: try next tshark filter for UnknownFieldsException

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Benjamin Berg <benjamin.berg@xxxxxxxxx>

The intention in commit cc35ed3e257a ("tests: Permit passing multiple
valid tshark filters") was to permit passing multiple filters in order
to permit compatibility with older tshark versions. However, this did
not work as expected for the UnknownFieldsException.

Fix that by storing it in last_exception as for other errors. This fixes
running some EHT tests with older tshark versions.

Signed-off-by: Benjamin Berg <benjamin.berg@xxxxxxxxx>
---
 tests/hwsim/tshark.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/hwsim/tshark.py b/tests/hwsim/tshark.py
index 73e54b6dfe..89ccb6104e 100644
--- a/tests/hwsim/tshark.py
+++ b/tests/hwsim/tshark.py
@@ -111,8 +111,12 @@ def run_tshark(filename, filters, display=None, wait=True):
                     all_wlan_mgt = False
                     break
             if not all_wlan_mgt:
-                raise
-            return _run_tshark(filename, filter, display, wait)
+                last_exception = e
+                continue
+            try:
+                return _run_tshark(filename, filter, display, wait)
+            except Exception as e:
+                last_exception = e
 
         except AssertionError as e:
             # Catch the error (and try the next provided filter)
-- 
2.49.0


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux