Files
meta-openembedded/meta-networking/recipes-devtools/python/python3-scapy/0001-python3-scapy-skip-ICMP-regression-tests-in-ptest.patch
T
Khem Raj 951255b0da python3-scapy: upgrade 2.6.1 -> 2.7.0
Bump to the v2.7.0 tag. Rebase the ptest ICMPv6 skip patch: upstream
added a "needs_root" tag to the "Sending and receiving an
ICMPv6EchoRequest" test's tag line in test/regression.uts, so the
"skipped_ptest" tag now needs to be appended after "needs_root"
rather than replacing the whole line. With this rebase both hunks
apply with offset only (no fuzz).

Build-verified: python3-scapy builds and packages (including
-ptest) successfully.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-08-14 09:06:32 -07:00

51 lines
1.8 KiB
Diff

From 511d965d6dd440fc0ae6b702feff06cb6718140e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 20 Nov 2025 00:05:55 -0800
Subject: [PATCH] python3-scapy: skip ICMP regression tests in ptest
The UTScapy regression campaign contains two ICMP-based tests:
- "Latency check: localhost ICMP"
- "Sending and receiving an ICMPv6EchoRequest"
Both rely on raw ICMP sockets and/or external IPv6 connectivity
(www.google.com), which are not guaranteed to be available in the
ptest environment. As a result they systematically fail and cause
the whole ptest run to be reported as failed.
Tag these tests with the "skipped_ptest" keyword so they can be
filtered out by the ptest runner via `-K skipped_ptest`. Additionally,
mark the ICMPv6 test with `@pytest.mark.skip` to avoid running it
under pytest-based harnesses that import regression.uts.
This keeps ptest results stable while still allowing developers to
run these tests manually in a properly networked environment.
Upstream-Status: Inappropriate [OE-specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
test/regression.uts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/test/regression.uts
+++ b/test/regression.uts
@@ -1732,7 +1732,7 @@ def _test():
retry_test(_test)
= Latency check: localhost ICMP
-~ netaccess needs_root linux latency
+~ netaccess needs_root linux latency skipped_ptest
# Note: still needs to enforce L3RawSocket as this won't work otherwise with libpcap
sock = conf.L3socket
@@ -1840,7 +1840,7 @@ finally:
sck.close()
= Sending and receiving an ICMPv6EchoRequest
-~ netaccess ipv6 needs_root
+~ netaccess ipv6 needs_root skipped_ptest
def _test():
with no_debug_dissector():
x = sr1(IPv6(dst="www.google.com")/ICMPv6EchoRequest(),timeout=3)