Bug 16377 - AB-INT PTEST: libarchive ptest failure in libarchive_test (test_read_append_rpm_filter)
Summary: AB-INT PTEST: libarchive ptest failure in libarchive_test (test_read_append_r...
Status: IN PROGRESS REVIEW
Alias: None
Product: Package Testing (ptest)
Classification: QA/Testing
Component: ptest (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 6.1 M3
Assignee: Himani Barde
QA Contact:
URL:
Whiteboard: AB-INT
Depends on:
Blocks:
 
Reported: 2026-07-29 14:25 UTC by João Marcos Costa
Modified: 2026-09-02 04:24 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description João Marcos Costa 2026-07-29 14:25:00 UTC
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/2008/steps/13/logs/stdio

Failed ptests:
{'libarchive': ['libarchive_test']}

qemuriscv64-ptest fedora44-vk-1

---
Totals:
  Tests run:              797
  Tests failed:             1
  Assertions checked:28458500
  Assertions failed:        1
  Skips reported:         237

Failing tests:
  229: test_read_append_rpm_filter (1 failures)

Details for failing tests: /tmp/libarchive_test.2026-07-28T11.50.40-000

FAIL: libarchive_test
---

Full logs at: https://valkyrie.yocto.io/pub/non-release/20260728-69/testresults/qemuriscv64-ptest/libarchive.log
Comment 1 João Marcos Costa 2026-07-31 08:38:30 UTC
https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/4145/steps/13/logs/stdio

Failed ptests:
{'libarchive': ['libarchive_test']}

qemuarm64-ptest stream10-vk-arm1
Comment 2 João Marcos Costa 2026-07-31 08:39:23 UTC
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/2031/steps/13/logs/stdio

Failed ptests:
{'libarchive': ['libarchive_test']}

qemuriscv64-ptest debian12-vk-9
Comment 3 Himani Barde 2026-08-06 08:47:30 UTC
Root cause identified:
archive_read_append_filter() in libarchive 3.8.8 uses a name-based bidder lookup loop that can fail to locate the correct bidder due to a desync between the loop index and the bidder array. This causes test_read_append_rpm_filter to receive ARCHIVE_FATAL instead of ARCHIVE_OK.

Upstream fix: https://github.com/libarchive/libarchive/commit/50b585bb55484cdc70bd92852a477178dc43485c "append_filter: Use last bidder for filter" - Tobias Stoeckmann, 2026-08-02

The fix replaces the fragile name-based bidder lookup with a simple get_last_bidder() function that returns the most recently registered bidder.

Verified: Backported this patch to libarchive 3.8.9 recipe in OE-core. Patch applies cleanly and builds successfully for qemuarm64. The fixed code (get_last_bidder) is confirmed present in the compiled output.

Recommendation: Backport upstream commit 50b585bb to the libarchive recipe.
Comment 4 Himani Barde 2026-09-02 04:24:36 UTC
Patch submitted to the openembedded-core mailing list: https://lore.kernel.org/openembedded-core/?q=libarchive%3A%20backport

Subject: [PATCH] libarchive: backport fix for archive_read_append_filter test failure

The patch backports upstream commit 50b585bb ("append_filter: Use last bidder for filter") to the libarchive 3.8.9 recipe.

Awaiting review and merge into oe-core master.