UTscapy writes its detailed report, including the traceback of every
failing test, to a file under ${PTEST_PATH}. Under testimage that path
only exists inside the ephemeral image, which is discarded as soon as the
run finishes, so a failure left nothing behind but a bare
FAIL: 000.01s Emulate interact()
line and diagnosing it required rebuilding the image by hand.
Pass -F so the report expands only the failed tests, and cat it to stdout
when there is one, where ptest-runner records it. A clean run is
unaffected.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
The "Emulate interact()" UTScapy regression test failed:
IPython requested but not found !
Using the default Python shell: History is disabled.
Traceback (most recent call last):
File "/usr/lib/python3.14/site-packages/scapy/main.py", line 857, in interact
banner += "\n"
UnboundLocalError: cannot access local variable banner where it is
not associated with a value
scapy.main.interact() only binds "banner" in the branches handling the
ipython, ptipython, ptpython and bpython shells. The test asks for
ipython, which is not in the image, so scapy falls back to the plain
Python shell and leaves "banner" unbound while still running the
unconditional "banner += \n" for the caller-supplied mybanner.
The test is correct and the bug is in scapy, which still has it in
master, so carry a patch initializing banner from banner_text before the
shell-specific chain.
meta-networking-image-ptest-python3-scapy now reports PASSED=319
FAILED=0, up from PASSED=318 FAILED=1.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
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>
1. Install missing test files
2. Enable network access by setting a nameserver in resolv.conf
because some tests require this
3. One test tries to ping Google through IPv6 - this test requires
ipv6 DISTRO_FEATURE. In case ipv6 is not enabled, skip this test
from the run-ptest script.
NB: the last mentioned test to work also requires IPv6 support from
your ISP. My ISP is IPv4-only, and I couldn't try it out. The above
comes from my reading of the testcode.
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>