diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-10-26 21:51:17 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-10-28 23:31:28 -0700 |
| commit | 237efae216de651f9b6d143b138f9b16be042ccd (patch) | |
| tree | a22b7b0a939937ea03603d63bf0d7cadae8bd267 /meta-networking/recipes-devtools/python/python3-scapy | |
| parent | 020d38d39a771ef618724d5cea37299ddd1e6729 (diff) | |
| download | meta-openembedded-237efae216de651f9b6d143b138f9b16be042ccd.tar.gz | |
python3-scapy: fix ptests
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>
Diffstat (limited to 'meta-networking/recipes-devtools/python/python3-scapy')
| -rw-r--r-- | meta-networking/recipes-devtools/python/python3-scapy/run-ptest | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta-networking/recipes-devtools/python/python3-scapy/run-ptest b/meta-networking/recipes-devtools/python/python3-scapy/run-ptest index 417e21053c..5c166b7ba0 100644 --- a/meta-networking/recipes-devtools/python/python3-scapy/run-ptest +++ b/meta-networking/recipes-devtools/python/python3-scapy/run-ptest | |||
| @@ -1,4 +1,11 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | |||
| 3 | if ! nslookup example.com; then | ||
| 4 | mv /etc/resolv.conf /etc/resolv.conf.bak | ||
| 5 | echo "nameserver 8.8.8.8" > /etc/resolv.conf | ||
| 6 | trap "mv /etc/resolv.conf.bak /etc/resolv.conf" INT EXIT | ||
| 7 | fi | ||
| 8 | |||
| 2 | python3 UTscapy.py -t regression.uts -f text -l -C \ | 9 | python3 UTscapy.py -t regression.uts -f text -l -C \ |
| 3 | -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 \ |
| 4 | 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:/' |
