From: Tim Kientzle Date: Sun, 13 Oct 2024 07:35:17 +0000 (-0700) Subject: Increase the hole size for this test to 32MiB (#2380) X-Git-Tag: v3.8.0~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aada018f05c1696efb5c306b5acbc3c9dd811632;p=thirdparty%2Flibarchive.git Increase the hole size for this test to 32MiB (#2380) APFS on macOS 15 seems to have a higher threshold for creating sparse files. --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac2c85a4c..c93c8850e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ permissions: jobs: MacOS: - runs-on: macos-13 + runs-on: macos-15 strategy: matrix: bs: [autotools, cmake] diff --git a/libarchive/test/test_sparse_basic.c b/libarchive/test/test_sparse_basic.c index 0350df1e9..963d5e8be 100644 --- a/libarchive/test/test_sparse_basic.c +++ b/libarchive/test/test_sparse_basic.c @@ -67,13 +67,16 @@ struct sparse { static void create_sparse_file(const char *, const struct sparse *); -#if defined(__APPLE__) -/* On APFS holes need to be at least 4096x4097 bytes */ -#define MIN_HOLE 16781312 -#else -/* Elsewhere we work with 4096*10 bytes */ -#define MIN_HOLE 409600 -#endif +/* This should be large enough that any OS/filesystem that + * does support sparse files is certain to store a gap this big + * as a hole. */ +/* A few data points: + * = ZFS on FreeBSD needs this to be at least 200kB + * = macOS APFS needs this to be at least 4096x4097 bytes + * + * 32MiB here is bigger than either of the above. + */ +#define MIN_HOLE (32 * 1024UL * 1024UL) #if defined(_WIN32) && !defined(__CYGWIN__) #include