libarchive / libarchive

Multi-format archive and compression library

Home Page:http://www.libarchive.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

test_write_filter_zstd still fails on armv7

lorinder opened this issue · comments

I see a test failure of test_write_filter_zstd on armv7 (git HEAD). The fix for issue 1968 is applied in my tree, but I still get the out-of-memory problems. A further reduction of the search distance, as follows, solves the problem for me:

commit 089cf8e246ddafd0db5cf9f5d61f18c57229c70d
Author: Lorenz Minder <lminder@gmx.net>
Date:   Thu Feb 29 15:43:46 2024 +0000

    zstd test:  Reduce memory usage.

diff --git a/libarchive/test/test_write_filter_zstd.c b/libarchive/test/test_write_filter_zstd.c
index 04c0baa8..de7d60a3 100644
--- a/libarchive/test/test_write_filter_zstd.c
+++ b/libarchive/test/test_write_filter_zstd.c
@@ -162,7 +162,7 @@ DEFINE_TEST(test_write_filter_zstd)
 #if ZSTD_VERSION_NUMBER >= MINVER_LONG
        if ((int)(sizeof(size_t) == 4))
                assertEqualIntA(a, ARCHIVE_OK,
-                   archive_write_set_filter_option(a, NULL, "long", "26"));
+                   archive_write_set_filter_option(a, NULL, "long", "25"));
        else
                assertEqualIntA(a, ARCHIVE_OK,
                    archive_write_set_filter_option(a, NULL, "long", "27"));

The machine I was trying this on is a Raspberry Pi 3B, which has only 1GB of RAM. I would not expect this to be a problem though, as it has 6GB of swap space. It seems more likely that it's running out of address space, rather than memory itself.

$ free -h
               total        used        free      shared  buff/cache   available
Mem:           930Mi       118Mi       126Mi       320Ki       701Mi       811Mi
Swap:          5.8Gi       768Ki       5.8Gi

I forgot to attach the error log. Here it is:

test_write_filter_zstd.log