Skip to contentSkip to conversation

libxml-libxml-perl: fix ptests

PATCH New Gyorgy Sarvari 1 participant 5 messages Oct 27, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 libxml-libxml-perl: fix ptests

Add missing dependencies.

---
 meta-perl/recipes-perl/libxml/libxml-libxml-perl_2.0134.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-perl/recipes-perl/libxml/libxml-libxml-perl_2.0134.bb +2 -0
index c2ea47ae5b..60352bc648 100644
@@ -47,6 +47,8 @@ BUILD_CFLAGS += " -D_GNU_SOURCE "
 FILES:${PN}-dbg =+ "${libdir}/perl/vendor_perl/*/auto/XML/LibXML/.debug/"
 
 RDEPENDS:${PN}-ptest += " \
+    glibc-gconv-iso8859-2 \
+    glibc-charmap-iso-8859-2 \
     liburi-perl \
     perl-module-encode-byte \
     perl-module-encode-unicode \
#1 lore raw

PATCH 2/5 libunix-statgrab: fix ptests

Add missing argument to perl in run-ptest script - one of the tests require it.

---
 meta-perl/recipes-perl/libstatgrab/libunix-statgrab_0.112.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta-perl/recipes-perl/libstatgrab/libunix-statgrab_0.112.bb +4 -0
index 01261d547a..e533eb8c8a 100644
@@ -35,4 +35,8 @@ S = "${WORKDIR}/Unix-Statgrab-${PV}"
 
 export LD = "${CCLD}"
 
+do_install_ptest_perl:append(){
+    sed -i 's/perl -I/perl -TI/g' ${D}${PTEST_PATH}/run-ptest
+}
+
 inherit cpan pkgconfig ptest-perl
#2 lore raw

PATCH 3/5 libtest-harness-perl: fix ptests

In reply to Gyorgy Sarvari

Add missing dependencies.

---
 .../libtest/libtest-harness-perl_3.44.bb             | 12 ++++++++++++
 1 file changed, 12 insertions(+)
meta-perl/recipes-perl/libtest/libtest-harness-perl_3.44.bb +12 -0
index 58ca70b9e1..6b5fe43e57 100644
@@ -38,6 +38,18 @@ RDEPENDS:${PN} += "\
     perl-module-benchmark \
 "
 
+RDEPENDS:${PN}-ptest += "\
+    perl-module-carp \
+    perl-module-file-find \
+    perl-module-file-glob \
+    perl-module-file-spec-functions \
+    perl-module-getopt-long \
+    perl-module-io-select \
+    perl-module-ipc-open3 \
+    perl-module-lib \
+    perl-module-test-more \
+    perl-module-text-parsewords"
+
 RPROVIDES:${PN} += "libapp-prove-perl \
                     libapp-prove-state-perl \
                     libapp-prove-state-result-perl \
#3 lore raw

PATCH 4/5 python3-scapy: fix ptests

In reply to Gyorgy Sarvari

1. Enable network access during tests by setting a nameserver
2. Add missing tshark dependency
3. Install missing test files

---
 .../recipes-devtools/python/python3-scapy/run-ptest |  7 +++++++
 .../recipes-devtools/python/python3-scapy_2.4.5.bb  | 13 +++++++++++++
 2 files changed, 20 insertions(+)
meta-networking/recipes-devtools/python/python3-scapy/run-ptest +7 -0
index 797d8ecf78..847b69af94 100644
@@ -1,4 +1,11 @@
 #!/bin/sh
+
+if ! nslookup example.com; then
+    mv /etc/resolv.conf /etc/resolv.conf.bak
+    echo "nameserver 8.8.8.8" > /etc/resolv.conf
+    trap "mv /etc/resolv.conf.bak /etc/resolv.conf" INT EXIT
+fi
+
 UTscapy3 -t regression.uts -f text -l -C \
     -o @PTEST_PATH@/scapy_ptest_$(date +%Y%m%d-%H%M%S).log \
     2>&1 | sed -e 's/^passed None/PASS:/' -e 's/^failed None/FAIL:/'
meta-networking/recipes-devtools/python/python3-scapy_2.4.5.bb +13 -0
index 0f66dfd784..83f6a6026a 100644
@@ -34,8 +34,21 @@ do_install:append() {
 do_install_ptest() {
     install -m 0644 ${S}/test/regression.uts ${D}${PTEST_PATH}
     sed -i 's,@PTEST_PATH@,${PTEST_PATH},' ${D}${PTEST_PATH}/run-ptest
+    install -D -m 0644 ${S}/test/pcaps/bad_rsn_parsing_overrides_ssid.pcap ${D}${PYTHON_SITEPACKAGES_DIR}/test/pcaps/bad_rsn_parsing_overrides_ssid.pcap
+    install -m 0644 ${S}/test/pcaps/macos.pcapng.gz ${D}${PYTHON_SITEPACKAGES_DIR}/test/pcaps/
+
+    # note1: if ipv6 isn't enabled, skip the related test (add '-K ipv6' argument)
+    # note2: to make this test work, your ISP also must support ipv6 - the test is trying
+    #        to ping google.com through ipv6.
+    if [ "${@oe.utils.all_distro_features(d, 'ipv6', 'true', 'false')}" = "false" ]; then
+        sed -i 's/UTscapy3/UTscapy3 -K ipv6/g' ${D}${PTEST_PATH}/run-ptest
+    fi
 }
 
 RDEPENDS:${PN} = "tcpdump ${PYTHON_PN}-compression ${PYTHON_PN}-cryptography ${PYTHON_PN}-netclient  \
                   ${PYTHON_PN}-netserver ${PYTHON_PN}-pydoc ${PYTHON_PN}-pkgutil ${PYTHON_PN}-shell \
                   ${PYTHON_PN}-threading ${PYTHON_PN}-numbers"
+
+RDEPENDS:${PN}-ptest += "tshark"
+
+FILES:${PN}-ptest += "${PYTHON_SITEPACKAGES_DIR}/test/pcaps"
#4 lore raw

PATCH 5/5 freediameter: fix run-ptest reporting

In reply to Gyorgy Sarvari

Add PASS/FAIL printout at the end of the execution.

---
 meta-networking/recipes-protocols/freediameter/files/run-ptest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-protocols/freediameter/files/run-ptest +1 -1
index d0ca8d9621..926a6869cf 100644
@@ -8,4 +8,4 @@ fi
 
 export EXTENSIONS_DIR=$EXTENSIONS_DIR
 cmake  -E cmake_echo_color --cyan "Running tests..."
-ctest --force-new-ctest-process
+ctest --force-new-ctest-process && echo PASS: freediameter || echo FAIL: freediameter