diff options
| -rw-r--r-- | tests/store-deduplication.scm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/store-deduplication.scm b/tests/store-deduplication.scm index f116ff9834e..95571e8b6f4 100644 --- a/tests/store-deduplication.scm +++ b/tests/store-deduplication.scm | |||
| @@ -190,7 +190,19 @@ | |||
| 190 | initial-gap middle-gap final-gap) | 190 | initial-gap middle-gap final-gap) |
| 191 | (call-with-temporary-directory | 191 | (call-with-temporary-directory |
| 192 | (lambda (store) | 192 | (lambda (store) |
| 193 | (let ((source (string-append store "/source"))) | 193 | (let* ((source (string-append store "/source")) |
| 194 | (store-st (stat store)) | ||
| 195 | (store-bksz (stat:blksize store-st)) | ||
| 196 | ;; the test checks that space is actually saved | ||
| 197 | ;; by the holes, but this isn't the case if | ||
| 198 | ;; the size of each allocated block is large enough to swamp the savings. | ||
| 199 | ;; | ||
| 200 | ;; So, on large-block systems (e.g. Asahi tmpfs) we need | ||
| 201 | ;; to scale the gaps so this is true again. | ||
| 202 | (scale (max 1 (/ store-bksz 4096))) | ||
| 203 | (initial-gap (* initial-gap scale)) | ||
| 204 | (middle-gap (* middle-gap scale)) | ||
| 205 | (final-gap (* final-gap scale))) | ||
| 194 | (call-with-output-file source | 206 | (call-with-output-file source |
| 195 | (lambda (port) | 207 | (lambda (port) |
| 196 | (seek port initial-gap SEEK_CUR) | 208 | (seek port initial-gap SEEK_CUR) |
