commit:     a90ce0faabc59915fa897150951467e4933ea1f1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  1 01:27:07 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun  1 01:27:07 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a90ce0fa

net-analyzer/wireshark: fix tests w/ USE=-http2

Closes: https://bugs.gentoo.org/933290
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/wireshark-4.2.5-http2-test.patch         | 31 ++++++++++++++++++++++
 net-analyzer/wireshark/wireshark-4.2.5.ebuild      |  7 +----
 net-analyzer/wireshark/wireshark-9999.ebuild       |  7 +----
 3 files changed, 33 insertions(+), 12 deletions(-)

diff --git a/net-analyzer/wireshark/files/wireshark-4.2.5-http2-test.patch 
b/net-analyzer/wireshark/files/wireshark-4.2.5-http2-test.patch
new file mode 100644
index 000000000000..f32109237d6d
--- /dev/null
+++ b/net-analyzer/wireshark/files/wireshark-4.2.5-http2-test.patch
@@ -0,0 +1,31 @@
+https://gitlab.com/wireshark/wireshark/-/merge_requests/15824
+
+From cc8264d68f638c72ada1e94a9913902462c1a25a Mon Sep 17 00:00:00 2001
+From: Sam James <s...@gentoo.org>
+Date: Sat, 1 Jun 2024 02:25:05 +0100
+Subject: [PATCH] test: skip test_sharkd_req_follow_http2 test if no http2
+ support
+
+Originally reported downstream in Gentoo at https://bugs.gentoo.org/933290.
+
+This is the same kind of thing as 
https://gitlab.com/wireshark/wireshark/-/merge_requests/9029.
+--- a/test/suite_sharkd.py
++++ b/test/suite_sharkd.py
+@@ -1174,7 +1174,13 @@ class TestSharkd:
+             },
+         ))
+ 
+-    def test_sharkd_req_follow_http2(self, check_sharkd_session, 
capture_file):
++    def test_sharkd_req_follow_http2(self, check_sharkd_session, 
capture_file, features):
++        # If we don't have nghttp2, we output the compressed headers.
++        # We could test against the expected output in that case, but
++        # just skip for now.
++        if not features.have_nghttp2:
++            pytest.skip('Requires nghttp2.')
++
+         check_sharkd_session((
+             {"jsonrpc":"2.0", "id":1, "method":"load",
+              "params":{"file": capture_file('quic-with-secrets.pcapng')}
+-- 
+2.45.1
+

diff --git a/net-analyzer/wireshark/wireshark-4.2.5.ebuild 
b/net-analyzer/wireshark/wireshark-4.2.5.ebuild
index c7145d15489e..44fe8772760b 100644
--- a/net-analyzer/wireshark/wireshark-4.2.5.ebuild
+++ b/net-analyzer/wireshark/wireshark-4.2.5.ebuild
@@ -141,6 +141,7 @@ fi
 
 PATCHES=(
        "${FILESDIR}"/${PN}-2.6.0-redhat.patch
+       "${FILESDIR}"/${PN}-4.2.5-http2-test.patch
 )
 
 python_check_deps() {
@@ -269,12 +270,6 @@ src_configure() {
 src_test() {
        cmake_build test-programs
 
-       EPYTEST_DESELECT=(
-               # TODO: investigate
-               
suite_follow_multistream.py::case_follow_multistream::test_follow_http2_multistream
-               suite_sharkd.py::TestSharkd::test_sharkd_req_follow_http2
-       )
-
        # https://www.wireshark.org/docs/wsdg_html_chunked/ChTestsRunPytest.html
        epytest \
                --disable-capture \

diff --git a/net-analyzer/wireshark/wireshark-9999.ebuild 
b/net-analyzer/wireshark/wireshark-9999.ebuild
index c7145d15489e..44fe8772760b 100644
--- a/net-analyzer/wireshark/wireshark-9999.ebuild
+++ b/net-analyzer/wireshark/wireshark-9999.ebuild
@@ -141,6 +141,7 @@ fi
 
 PATCHES=(
        "${FILESDIR}"/${PN}-2.6.0-redhat.patch
+       "${FILESDIR}"/${PN}-4.2.5-http2-test.patch
 )
 
 python_check_deps() {
@@ -269,12 +270,6 @@ src_configure() {
 src_test() {
        cmake_build test-programs
 
-       EPYTEST_DESELECT=(
-               # TODO: investigate
-               
suite_follow_multistream.py::case_follow_multistream::test_follow_http2_multistream
-               suite_sharkd.py::TestSharkd::test_sharkd_req_follow_http2
-       )
-
        # https://www.wireshark.org/docs/wsdg_html_chunked/ChTestsRunPytest.html
        epytest \
                --disable-capture \

Reply via email to