
Patch from:
https://gitlab.com/wireshark/wireshark/-/commit/91cfd6d16d6f57c765d6708808673a2ac16eaa9d

From 91cfd6d16d6f57c765d6708808673a2ac16eaa9d Mon Sep 17 00:00:00 2001
From: John Thacker <johnthacker@gmail.com>
Date: Fri, 24 Jan 2025 18:38:23 -0500
Subject: [PATCH] test: Fix skipping Rawshark tests on Big Endian

pytest.skip can't be used at the class scope, only inside a test.
At the class level the decorator should be used instead.
See the warning in the Debian s390x builds:
https://buildd.debian.org/status/fetch.php?pkg=wireshark&arch=s390x&ver=4.4.3-1&stamp=1736436117&raw=0

None of Rawshark is going to work on Big Endian, so change it to
a decorator for the class instead of moving it inside the test.

Ping #19965
---
 test/suite_io.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/test/suite_io.py b/test/suite_io.py
index 4376d1b1fb9..e7b8cec4858 100644
--- a/test/suite_io.py
+++ b/test/suite_io.py
@@ -68,9 +68,8 @@ class TestTsharkIO:
         check_io_4_packets(capture_file, result_file, cmd_tshark, cmd_capinfos, env=test_env)
 
 
+@pytest.mark.skipif(sys.byteorder != 'little', reason='Requires a little endian system')
 class TestRawsharkIO:
-    if sys.byteorder != 'little':
-        pytest.skip('Requires a little endian system')
     def test_rawshark_io_stdin(self, cmd_rawshark, capture_file, result_file, io_baseline_str, test_env):
         '''Read from stdin using Rawshark'''
         # tail -c +25 "${CAPTURE_DIR}dhcp.pcap" | $RAWSHARK -dencap:1 -R "udp.port==68" -nr - > $IO_RAWSHARK_DHCP_PCAP_TESTOUT 2> /dev/null
-- 
GitLab

