diff options
3 files changed, 52 insertions, 1 deletions
diff --git a/meta-networking/recipes-devtools/python/python3-scapy/0001-python3-scapy-skip-ICMP-regression-tests-in-ptest.patch b/meta-networking/recipes-devtools/python/python3-scapy/0001-python3-scapy-skip-ICMP-regression-tests-in-ptest.patch new file mode 100644 index 0000000000..68e5cf5b45 --- /dev/null +++ b/meta-networking/recipes-devtools/python/python3-scapy/0001-python3-scapy-skip-ICMP-regression-tests-in-ptest.patch | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | From 511d965d6dd440fc0ae6b702feff06cb6718140e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 20 Nov 2025 00:05:55 -0800 | ||
| 4 | Subject: [PATCH] python3-scapy: skip ICMP regression tests in ptest | ||
| 5 | |||
| 6 | The UTScapy regression campaign contains two ICMP-based tests: | ||
| 7 | |||
| 8 | - "Latency check: localhost ICMP" | ||
| 9 | - "Sending and receiving an ICMPv6EchoRequest" | ||
| 10 | |||
| 11 | Both rely on raw ICMP sockets and/or external IPv6 connectivity | ||
| 12 | (www.google.com), which are not guaranteed to be available in the | ||
| 13 | ptest environment. As a result they systematically fail and cause | ||
| 14 | the whole ptest run to be reported as failed. | ||
| 15 | |||
| 16 | Tag these tests with the "skipped_ptest" keyword so they can be | ||
| 17 | filtered out by the ptest runner via `-K skipped_ptest`. Additionally, | ||
| 18 | mark the ICMPv6 test with `@pytest.mark.skip` to avoid running it | ||
| 19 | under pytest-based harnesses that import regression.uts. | ||
| 20 | |||
| 21 | This keeps ptest results stable while still allowing developers to | ||
| 22 | run these tests manually in a properly networked environment. | ||
| 23 | |||
| 24 | Upstream-Status: Inappropriate [OE-specific] | ||
| 25 | |||
| 26 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 27 | --- | ||
| 28 | test/regression.uts | 5 +++-- | ||
| 29 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
| 30 | |||
| 31 | --- a/test/regression.uts | ||
| 32 | +++ b/test/regression.uts | ||
| 33 | @@ -1732,7 +1732,7 @@ def _test(): | ||
| 34 | retry_test(_test) | ||
| 35 | |||
| 36 | = Latency check: localhost ICMP | ||
| 37 | -~ netaccess needs_root linux latency | ||
| 38 | +~ netaccess needs_root linux latency skipped_ptest | ||
| 39 | |||
| 40 | # Note: still needs to enforce L3RawSocket as this won't work otherwise with libpcap | ||
| 41 | sock = conf.L3socket | ||
| 42 | @@ -1840,7 +1840,7 @@ finally: | ||
| 43 | sck.close() | ||
| 44 | |||
| 45 | = Sending and receiving an ICMPv6EchoRequest | ||
| 46 | -~ netaccess ipv6 | ||
| 47 | +~ netaccess ipv6 skipped_ptest | ||
| 48 | def _test(): | ||
| 49 | with no_debug_dissector(): | ||
| 50 | x = sr1(IPv6(dst="www.google.com")/ICMPv6EchoRequest(),timeout=3) | ||
diff --git a/meta-networking/recipes-devtools/python/python3-scapy/run-ptest b/meta-networking/recipes-devtools/python/python3-scapy/run-ptest index 5c166b7ba0..79e435a5ac 100644 --- a/meta-networking/recipes-devtools/python/python3-scapy/run-ptest +++ b/meta-networking/recipes-devtools/python/python3-scapy/run-ptest | |||
| @@ -6,6 +6,6 @@ if ! nslookup example.com; then | |||
| 6 | trap "mv /etc/resolv.conf.bak /etc/resolv.conf" INT EXIT | 6 | trap "mv /etc/resolv.conf.bak /etc/resolv.conf" INT EXIT |
| 7 | fi | 7 | fi |
| 8 | 8 | ||
| 9 | python3 UTscapy.py -t regression.uts -f text -l -C \ | 9 | python3 UTscapy.py -t regression.uts -f text -l -C -K skipped_ptest \ |
| 10 | -o @PTEST_PATH@/scapy_ptest_$(date +%Y%m%d-%H%M%S).log \ | 10 | -o @PTEST_PATH@/scapy_ptest_$(date +%Y%m%d-%H%M%S).log \ |
| 11 | 2>&1 | sed -e 's/^passed None/PASS:/' -e 's/^failed None/FAIL:/' | 11 | 2>&1 | sed -e 's/^passed None/PASS:/' -e 's/^failed None/FAIL:/' |
diff --git a/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb b/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb index 5f09fd852a..faafeecfaf 100644 --- a/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb +++ b/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb | |||
| @@ -18,6 +18,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" | |||
| 18 | # | 18 | # |
| 19 | SRCREV = "8e08cbf759de6709a5b4af6bea3655d293129bb4" | 19 | SRCREV = "8e08cbf759de6709a5b4af6bea3655d293129bb4" |
| 20 | SRC_URI = "git://github.com/secdev/scapy.git;branch=master;protocol=https;tag=v${PV} \ | 20 | SRC_URI = "git://github.com/secdev/scapy.git;branch=master;protocol=https;tag=v${PV} \ |
| 21 | file://0001-python3-scapy-skip-ICMP-regression-tests-in-ptest.patch \ | ||
| 21 | file://run-ptest" | 22 | file://run-ptest" |
| 22 | 23 | ||
| 23 | UPSTREAM_CHECK_COMMITS = "1" | 24 | UPSTREAM_CHECK_COMMITS = "1" |
