From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
To: openembedded-core@lists.openembedded.org
Cc: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
Subject: [PATCH 2/2] libarchive: fix ptest failure when built without crypto library
Date: Wed, 29 Jul 2026 19:31:57 +0200 [thread overview]
Message-ID: <20260729173157.71731-3-jaipaul.cheernam@est.tech> (raw)
In-Reply-To: <20260729173157.71731-1-jaipaul.cheernam@est.tech>
test_read_format_zip_ppmd8_aes256_streaming (added in 3.8.9) fails
with 6 assertion failures because it attempts to decrypt an AES256
encrypted zipx file without first checking if a crypto library is
available. The default PACKAGECONFIG does not include openssl/nettle/mbedtls.
Add a patch to skip the test when no crypto library is present, using
the same guard as other encrypted zip tests in the same file.
Upstream: https://github.com/libarchive/libarchive/pull/3335
ptest results (qemux86-64):
3.8.8 3.8.9 diff
Tests run: 797 847 +50
Tests failed: 0 0 0
Assertions checked:32184686 32472682 +287996
Assertions failed: 0 0 0
Skips reported: 237 244 +7
Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
---
...aes256-streaming-test-when-no-crypto.patch | 46 +++++++++++++++++++
.../libarchive/libarchive_3.8.9.bb | 1 +
2 files changed, 47 insertions(+)
create mode 100644 meta/recipes-extended/libarchive/libarchive/0001-test-skip-ppmd8-aes256-streaming-test-when-no-crypto.patch
diff --git a/meta/recipes-extended/libarchive/libarchive/0001-test-skip-ppmd8-aes256-streaming-test-when-no-crypto.patch b/meta/recipes-extended/libarchive/libarchive/0001-test-skip-ppmd8-aes256-streaming-test-when-no-crypto.patch
new file mode 100644
index 0000000000..fc96225141
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0001-test-skip-ppmd8-aes256-streaming-test-when-no-crypto.patch
@@ -0,0 +1,46 @@
+From c2b00a5fff659bbe8d70b5e00cb6abb831170aeb Mon Sep 17 00:00:00 2001
+From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+Date: Wed, 29 Jul 2026 13:33:10 +0000
+Subject: [PATCH] test: skip ppmd8 aes256 streaming test when no crypto library
+ is present
+
+test_read_format_zip_ppmd8_aes256_streaming fails with 6 assertion
+failures on systems without a crypto library (openssl/nettle/mbedtls)
+because it tries to decrypt a pre-built encrypted zipx file without
+checking crypto availability first.
+
+Add the same guard used by the other encrypted zip tests in this file.
+
+Upstream-Status: Submitted [https://github.com/libarchive/libarchive/pull/3335]
+Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+---
+ .../test/test_read_format_zip_zipx_encrypted.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/libarchive/test/test_read_format_zip_zipx_encrypted.c b/libarchive/test/test_read_format_zip_zipx_encrypted.c
+index f07e1e5c..a0a431fb 100644
+--- a/libarchive/test/test_read_format_zip_zipx_encrypted.c
++++ b/libarchive/test/test_read_format_zip_zipx_encrypted.c
+@@ -257,8 +257,22 @@ DEFINE_TEST(test_read_format_zip_zipx_zstd_encrypted_streaming)
+ DEFINE_TEST(test_read_format_zip_ppmd8_aes256_streaming)
+ {
+ const char *refname = "test_read_format_zip_ppmd8_aes256_streaming.zipx";
++ struct archive *a;
+ size_t used;
+ char buff[600];
++
++ /* Check if running system has cryptographic functionality. */
++ assert((a = archive_write_new()) != NULL);
++ assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_zip(a));
++ assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a));
++ if (ARCHIVE_OK != archive_write_set_options(a,
++ "zip:encryption=aes256")) {
++ skipping("This system does not have cryptographic library");
++ archive_write_free(a);
++ return;
++ }
++ archive_write_free(a);
++
+ extract_reference_file(refname);
+ FILE *f = fopen(refname, "rb");
+ used = fread(buff, 1, sizeof(buff), f);
diff --git a/meta/recipes-extended/libarchive/libarchive_3.8.9.bb b/meta/recipes-extended/libarchive/libarchive_3.8.9.bb
index da792374cf..63c66eea81 100644
--- a/meta/recipes-extended/libarchive/libarchive_3.8.9.bb
+++ b/meta/recipes-extended/libarchive/libarchive_3.8.9.bb
@@ -31,6 +31,7 @@ EXTRA_OECONF += "--enable-largefile --without-iconv"
SRC_URI = "https://libarchive.org/downloads/libarchive-${PV}.tar.gz \
file://run-ptest \
+ file://0001-test-skip-ppmd8-aes256-streaming-test-when-no-crypto.patch \
"
UPSTREAM_CHECK_URI = "https://www.libarchive.org/"
prev parent reply other threads:[~2026-07-29 17:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 17:31 [PATCH 0/2] libarchive: upgrade 3.8.8 -> 3.8.9 Jaipaul Cheernam
2026-07-29 17:31 ` [PATCH 1/2] " Jaipaul Cheernam
2026-07-29 17:31 ` Jaipaul Cheernam [this message]
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=20260729173157.71731-3-jaipaul.cheernam@est.tech \
--to=jaipaul.cheernam@est.tech \
--cc=openembedded-core@lists.openembedded.org \
/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;
as well as URLs for NNTP newsgroup(s).