The following tests from the 'lib/libarchive/functional_test' testsuite are failing in CI: test_archive_string_conversion_fail_c test_archive_string_conversion_fail_latin1 test_write_disk For example: lib/libarchive/functional_test:test_write_disk Result: failed: atf-check failed; see the output of the test for details Original stderr --------------- Fail: program did not exit cleanly stdout: If tests fail or crash, details will be in: /tmp/kyua.JOFkWP/2028/work/libarchive_test.2026-04-13T16.28.42-000 Reference files will be read from: /usr/tests/lib/libarchive Exercising: libarchive 3.8.7 zlib/1.3.2 liblzma/5.8.3 libzstd/1.5.7 openssl/3.5.6 libb2/bundled 548: test_write_disk /usr/src/contrib/libarchive/libarchive/test/test_write_disk.c:246: ARCHIVE_FAILED != archive_write_header(ad, ae) Description: Test failing to create parent directory with /../ stderr: *** forcing core dump so failure can be debugged *** This is reproducible with Bricoler (master-python branch) with this command: bricoler freebsd-regression-test-suite --freebsd-src-git-checkout/url=/usr/src --freebsd-src-git-checkout/branch= --freebsd-regression-test-suite/memory=3072 --freebsd-regression-test-suite/ncpus=2 --freebsd-regression-test-suite/parallelism=1 --freebsd-regression-test-suite/tests='lib/libarchive/functional_test' mm@, these tests are failing since your commit https://cgit.freebsd.org/src/commit/?id=f2cd95a372000681bafe284df6ba857d5c2541c2 (Update vendor/libarchive to 3.8.7). Please triage as necessary.
548: test_write_disk /usr/src/contrib/libarchive/libarchive/test/test_write_disk.c:246: ARCHIVE_FAILED != archive_write_header(ad, ae) Description: Test failing to create parent directory with /../ This is expected if the test case runs as root. The pull request that introduced this test case also added code to make tests run as an unprivileged user, but that code is not enabled on FreeBSD because lib/libarchive/config_freebsd.h has not been updated in a very long time.
https://reviews.freebsd.org/D56468 should fix the test_write_disk issue, I have no idea what's causing the string conversion issues though.
Submitted upstream weeks ago... https://github.com/libarchive/libarchive/issues/2902
(In reply to Daniel Engberg from comment #3) Opening an issue upstream is not going to help. They already test (and in part develop) on FreeBSD, and these tests don't fail, even on FreeBSD, when libarchive is built independently. The problem is in our integration.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=05bbe5e3883492dd2afa52039da1fac45c5059a0 commit 05bbe5e3883492dd2afa52039da1fac45c5059a0 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2026-04-18 08:25:31 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2026-04-18 08:25:31 +0000 libarchive: Update configuration PR: 294577 MFC after: 1 week Reviewed by: mm Differential Revision: https://reviews.freebsd.org/D56468 lib/libarchive/config_freebsd.h | 126 ++++++++++++++++++++++++++++------------ 1 file changed, 89 insertions(+), 37 deletions(-)
Digging into this a bit more show that it's happy with GNU libiconv
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=b9e19901eedfdde9b7092b3338e6c1b8737aa41e commit b9e19901eedfdde9b7092b3338e6c1b8737aa41e Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2026-04-18 08:25:31 +0000 Commit: Martin Matuska <mm@FreeBSD.org> CommitDate: 2026-04-22 13:43:33 +0000 libarchive: Update configuration PR: 294577 MFC after: 1 week Reviewed by: mm Differential Revision: https://reviews.freebsd.org/D56468 (cherry picked from commit 05bbe5e3883492dd2afa52039da1fac45c5059a0) lib/libarchive/config_freebsd.h | 126 ++++++++++++++++++++++++++++------------ 1 file changed, 89 insertions(+), 37 deletions(-)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=d763fce2ec97c1654d38fe9ea5e718030cc1fbc0 commit d763fce2ec97c1654d38fe9ea5e718030cc1fbc0 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2026-04-18 08:25:31 +0000 Commit: Martin Matuska <mm@FreeBSD.org> CommitDate: 2026-04-23 09:44:14 +0000 libarchive: Update configuration PR: 294577 MFC after: 1 week Reviewed by: mm Differential Revision: https://reviews.freebsd.org/D56468 (cherry picked from commit 05bbe5e3883492dd2afa52039da1fac45c5059a0) lib/libarchive/config_freebsd.h | 126 ++++++++++++++++++++++++++++------------ 1 file changed, 89 insertions(+), 37 deletions(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=170f7d2168a227ea1fb58f20fe543ac22d4635f2 commit 170f7d2168a227ea1fb58f20fe543ac22d4635f2 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2026-04-18 08:25:31 +0000 Commit: Martin Matuska <mm@FreeBSD.org> CommitDate: 2026-04-23 09:45:52 +0000 libarchive: Update configuration PR: 294577 MFC after: 1 week Reviewed by: mm Differential Revision: https://reviews.freebsd.org/D56468 (cherry picked from commit 05bbe5e3883492dd2afa52039da1fac45c5059a0) lib/libarchive/config_freebsd.h | 124 ++++++++++++++++++++++++++++------------ 1 file changed, 89 insertions(+), 35 deletions(-)
The test case effectively boils down to BSD iconv(3) not returning an error when converting the string "при" from UTF-8 to US-ASCII.
(In reply to Mark Johnston from comment #10) If this is the only remaining failure mode, I will take this (patch incoming).
The stack ending at https://reviews.freebsd.org/D56758 should address this, but I haven't done any test qualification at the moment -- we have enough of our iconv use that we should probably do a full test run with this default switch.
(In reply to Kyle Evans from comment #12) It fixes the libarchive failures, thanks. I ran the full test suite and don't see any new failures.
Review appreciated: https://github.com/libarchive/libarchive/pull/3056
(In reply to Mark Johnston from comment #14) The change was accepted upstream and can be merged back into :main.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=bd15d6ef126ee4c0eac931117f6bbbf6f9a3fc72 commit bd15d6ef126ee4c0eac931117f6bbbf6f9a3fc72 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2026-05-20 16:39:40 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2026-05-27 13:10:57 +0000 libarchive: Force GNU iconv compatibility on FreeBSD When libarchive is compiled with FreeBSD's native iconv instead of libiconv, as happens with libarchive in the base system, we need to configure iconv(3) to handle invalid sequences by returning -1, as iconv_strncat_in_locale() assumes GNU iconv semantics. This corresponds to upstream PR 3056. PR: 294577 MFC after: 1 week contrib/libarchive/libarchive/archive_string.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e6470ed3d59b5c36262a9cdb76b71a7ad25d173b commit e6470ed3d59b5c36262a9cdb76b71a7ad25d173b Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2026-05-20 16:39:40 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2026-06-02 16:41:37 +0000 libarchive: Force GNU iconv compatibility on FreeBSD When libarchive is compiled with FreeBSD's native iconv instead of libiconv, as happens with libarchive in the base system, we need to configure iconv(3) to handle invalid sequences by returning -1, as iconv_strncat_in_locale() assumes GNU iconv semantics. This corresponds to upstream PR 3056. PR: 294577 MFC after: 1 week (cherry picked from commit bd15d6ef126ee4c0eac931117f6bbbf6f9a3fc72) contrib/libarchive/libarchive/archive_string.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=5fd06985f8f0b8591866498dc59cdfa3d82c6e78 commit 5fd06985f8f0b8591866498dc59cdfa3d82c6e78 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2026-05-20 16:39:40 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2026-06-02 16:42:02 +0000 libarchive: Force GNU iconv compatibility on FreeBSD When libarchive is compiled with FreeBSD's native iconv instead of libiconv, as happens with libarchive in the base system, we need to configure iconv(3) to handle invalid sequences by returning -1, as iconv_strncat_in_locale() assumes GNU iconv semantics. This corresponds to upstream PR 3056. PR: 294577 MFC after: 1 week (cherry picked from commit bd15d6ef126ee4c0eac931117f6bbbf6f9a3fc72) contrib/libarchive/libarchive/archive_string.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)