]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Reduce test_write_format_7zip_large_lzma1 buffer size 1448/head
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Mon, 19 Oct 2020 10:16:04 +0000 (11:16 +0100)
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Wed, 3 Mar 2021 10:01:56 +0000 (10:01 +0000)
Some of the test_write_format_7zip_large take longer than 10 minutes to
run on QEMU-RISC-V and therefore time out when run as part of the FreeBSD
test suite. This is even more noticeable when running on a CHERI-enabled
QEMU since the emulation of tagged memory makes it run slower.

On my local machine the impact is not as extreme, but
test_write_format_7zip_large_lzma1 takes 375ms when TEST_SLOW_HOST is set
and 8.2 seconds normally (i.e. 22 times slower).

The other alternative would be to skip these tests when not running on
real hardware, but it seems to me that compressing a smaller amount of
random data is preferable.

libarchive/test/test_write_format_7zip_large.c

index 5c49f59a1d4d88e87cc98760e7cd8a418cc012e9..eb01b3092b6f46a9dff332044de758d38bf212f6 100644 (file)
@@ -27,7 +27,7 @@
 #include "test.h"
 __FBSDID("$FreeBSD$");
 
-#define LARGE_SIZE     (16*1024*1024)
+#define LARGE_SIZE     (1*1024*1024)
 static void
 test_large(const char *compression_type)
 {