From: Pratik Farkase <pratik.farkase@est.tech>
To: openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com, steve@sakoman.com,
Pratik Farkase <pratik.farkase@est.tech>
Subject: [OE-core][scarthgap][PATCH v1] libarchive: adapt ptest support from master to scarthgap
Date: Fri, 20 Feb 2026 09:39:12 +0100 [thread overview]
Message-ID: <20260220083912.8864-1-pratik.farkase@est.tech> (raw)
Backport ptest implementation from master branch to enable comprehensive
testing of libarchive functionality in the scarthgap release.
Changes include:
- Inherit ptest class and add ptest support infrastructure
- Add run-ptest script to execute all 5 test suites:
* libarchive_test (698 tests)
* bsdtar_test (74 tests)
* bsdcpio_test (49 tests)
* bsdcat_test (18 tests)
* bsdunzip_test (24 tests)
- Install test binaries, test data files, and reference files
- Add bash and locale-base-en-us to RDEPENDS for ptest execution
- Enable nettle in PACKAGECONFIG for ZIP encryption/decryption support
The nettle addition is critical for test compatibility - without it,
the test_P_encryption test fails with "Decryption is unsupported due
to lack of crypto library". With nettle enabled, all 840+ tests pass
successfully.
Testing on qemux86-64:
- All test suites: PASS
This backport ensures the scarthgap branch has the same comprehensive
test coverage as master, improving quality assurance and catching
regressions early.
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
.../distro/include/ptest-packagelists.inc | 1 +
.../libarchive/libarchive/run-ptest | 10 +++++++
.../libarchive/libarchive_3.7.9.bb | 29 +++++++++++++++++--
3 files changed, 38 insertions(+), 2 deletions(-)
create mode 100755 meta/recipes-extended/libarchive/libarchive/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 9950e46776..a5af7dc079 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -27,6 +27,7 @@ PTESTS_FAST = "\
gzip \
json-c \
json-glib \
+ libarchive \
libconvert-asn1-perl \
libgpg-error\
libnl \
diff --git a/meta/recipes-extended/libarchive/libarchive/run-ptest b/meta/recipes-extended/libarchive/libarchive/run-ptest
new file mode 100755
index 0000000000..36d982917c
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/run-ptest
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+for t in libarchive_test bsdtar_test bsdcpio_test bsdcat_test bsdunzip_test; do
+ ./$t
+ if [ $? -eq 0 ]; then
+ echo "PASS: $t"
+ else
+ echo "FAIL: $t"
+ fi
+done
diff --git a/meta/recipes-extended/libarchive/libarchive_3.7.9.bb b/meta/recipes-extended/libarchive/libarchive_3.7.9.bb
index b62c3d69b9..6710a0a875 100644
--- a/meta/recipes-extended/libarchive/libarchive_3.7.9.bb
+++ b/meta/recipes-extended/libarchive/libarchive_3.7.9.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d499814247adaee08d88080841cb5665"
DEPENDS = "e2fsprogs-native"
-PACKAGECONFIG ?= "zlib bz2 xz zstd ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)}"
+PACKAGECONFIG ?= "zlib bz2 xz nettle zstd ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)}"
DEPENDS_BZIP2 = "bzip2-replacement-native"
DEPENDS_BZIP2:class-target = "bzip2"
@@ -44,12 +44,13 @@ SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \
file://0001-Merge-pull-request-2768-from-Commandoss-master.patch \
file://CVE-2025-60753-01.patch \
file://CVE-2025-60753-02.patch \
+ file://run-ptest \
"
UPSTREAM_CHECK_URI = "http://libarchive.org/"
SRC_URI[sha256sum] = "aa90732c5a6bdda52fda2ad468ac98d75be981c15dde263d7b5cf6af66fd009f"
-inherit autotools update-alternatives pkgconfig
+inherit autotools update-alternatives pkgconfig ptest
CPPFLAGS += "-I${WORKDIR}/extra-includes"
@@ -77,3 +78,27 @@ ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
ALTERNATIVE_TARGET[cpio] = "${bindir}/bsdcpio"
BBCLASSEXTEND = "native nativesdk"
+
+do_compile_ptest() {
+ oe_runmake check TESTS=
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}
+
+ for test in libarchive_test bsdtar_test bsdcpio_test bsdcat_test bsdunzip_test; do
+ ${B}/libtool --mode=install install -m 0755 ${B}/$test ${D}${PTEST_PATH}/$test
+ done
+
+ for dir in libarchive tar cpio cat unzip; do
+ install -d ${D}${PTEST_PATH}/$dir/test
+ cp -r ${S}/$dir/test/* ${D}${PTEST_PATH}/$dir/test/
+ done
+
+ ln -sf ${bindir}/bsdtar ${D}${PTEST_PATH}/bsdtar
+ ln -sf ${bindir}/bsdcpio ${D}${PTEST_PATH}/bsdcpio
+ ln -sf ${bindir}/bsdcat ${D}${PTEST_PATH}/bsdcat
+ ln -sf ${bindir}/bsdunzip ${D}${PTEST_PATH}/bsdunzip
+}
+
+RDEPENDS:${PN}-ptest += "bsdtar bsdcpio locale-base-en-us"
--
2.43.0
next reply other threads:[~2026-02-20 8:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 8:39 Pratik Farkase [this message]
2026-03-06 18:54 ` [OE-core][scarthgap][PATCH v1] libarchive: adapt ptest support from master to scarthgap Yoann Congal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260220083912.8864-1-pratik.farkase@est.tech \
--to=pratik.farkase@est.tech \
--cc=openembedded-core@lists.openembedded.org \
--cc=pratik.farkase@ericsson.com \
--cc=steve@sakoman.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox