commit:     aa299d2ac9ecfcaa3967ca8b8f881468673ed248
Author:     Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Thu Feb 20 23:26:58 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb 20 23:57:25 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa299d2a

net-analyzer/wireshark: add fix to make testsuite pass on big-endian systems

Bug: https://bugs.gentoo.org/835963
Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...fix-skipping-rawshark-tests-on-big-endian.patch | 40 ++++++++++++++++++++++
 net-analyzer/wireshark/wireshark-4.4.4.ebuild      |  2 ++
 2 files changed, 42 insertions(+)

diff --git 
a/net-analyzer/wireshark/files/4.4.4-fix-skipping-rawshark-tests-on-big-endian.patch
 
b/net-analyzer/wireshark/files/4.4.4-fix-skipping-rawshark-tests-on-big-endian.patch
new file mode 100644
index 000000000000..e1350e5ec7ca
--- /dev/null
+++ 
b/net-analyzer/wireshark/files/4.4.4-fix-skipping-rawshark-tests-on-big-endian.patch
@@ -0,0 +1,40 @@
+
+Patch from:
+https://gitlab.com/wireshark/wireshark/-/commit/91cfd6d16d6f57c765d6708808673a2ac16eaa9d
+
+From 91cfd6d16d6f57c765d6708808673a2ac16eaa9d Mon Sep 17 00:00:00 2001
+From: John Thacker <[email protected]>
+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)
+ 
+ 
[email protected](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
+

diff --git a/net-analyzer/wireshark/wireshark-4.4.4.ebuild 
b/net-analyzer/wireshark/wireshark-4.4.4.ebuild
index fe82c41cb805..99707f3406ef 100644
--- a/net-analyzer/wireshark/wireshark-4.4.4.ebuild
+++ b/net-analyzer/wireshark/wireshark-4.4.4.ebuild
@@ -119,6 +119,8 @@ if [[ ${PV} != *9999* ]] ; then
        BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-wireshark )"
 fi
 
+PATCHES=( "${FILESDIR}/4.4.4-fix-skipping-rawshark-tests-on-big-endian.patch" )
+
 python_check_deps() {
        use test || return 0
 

Reply via email to