]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
tests: reduce zstd long option to 23 (#2305)
authorEmil Velikov <emil.l.velikov@gmail.com>
Sun, 1 Sep 2024 03:28:57 +0000 (04:28 +0100)
committerGitHub <noreply@github.com>
Sun, 1 Sep 2024 03:28:57 +0000 (20:28 -0700)
With 26 and 27, the sub-test is pushing 2G and 4G memory respectively.

There is no particular reason why we need to push for higher limits
here, so let's pick 23 with weights around 0.25G. The test suite overall
is in the 0.25 - 0.5G range and this fits perfectly.

Closes: https://github.com/libarchive/libarchive/issues/2080
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
libarchive/test/test_write_filter_zstd.c

index da711f9e4bf9ab430e15b1b4804b8a074577d31d..07fbaa8ea633ece9d76a30011002382b4f372ebf 100644 (file)
@@ -230,12 +230,8 @@ DEFINE_TEST(test_write_filter_zstd)
            archive_write_set_filter_option(a, NULL, "max-frame-out", "1GB"));
 #endif
 #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"));
-       else
-               assertEqualIntA(a, ARCHIVE_OK,
-                   archive_write_set_filter_option(a, NULL, "long", "27"));
+       assertEqualIntA(a, ARCHIVE_OK,
+           archive_write_set_filter_option(a, NULL, "long", "23"));
        assertEqualIntA(a, ARCHIVE_FAILED,
            archive_write_set_filter_option(a, NULL, "long", "-1")); /* negative */
 #endif