guix/tests
Ludovic Courtès 5a7cb59648
deduplication: Detect holes and create sparse files.
This reduces disk usage of sparse files that are substituted such as
Guile object files (ELF files).  As of Guile 3.0.9, .go files are sparse
due to ELF sections being aligned on 64 KiB boundaries.

This reduces disk usage reported by “du -sh” by 9% for the ‘guix’
package, by 23% for ‘guile’, and by 35% for ‘guile-git’.

* guix/store/deduplication.scm (hole-size, find-holes): New procedures.
(tee)[seekable?]: New variable.
[read!]: Add case when SEEKABLE? is true.
* tests/store-deduplication.scm (cartesian-product): New procedure.
("copy-file/deduplicate, sparse files (holes: ~a/~a/~a)"): New test set.

Change-Id: Iad2ab7830dcb1220e2026f4a127a6c718afa8964
2024-05-25 16:44:42 +02:00
..
keys tests: Ensure test OpenPGP keys never expire. 2022-05-18 23:20:21 +02:00
services services: configuration: Use transducers within serialize-configuration. 2023-10-07 12:41:05 -04:00
accounts.scm accounts: Delete duplicate entries. 2019-08-28 00:27:14 +02:00
base16.scm utils: Move base16 procedures to (guix base16). 2017-03-16 22:50:14 +01:00
base32.scm build: Remove references to the 'nix-hash' program. 2020-08-29 16:24:17 +02:00
base64.scm substitute-binary: Support the Signature field of a narinfo file. 2014-03-30 12:02:10 +02:00
boot-parameters.scm tests: Add test for menu-entry roundtrips as sexps. 2022-08-28 23:37:28 +02:00
bournish.scm bournish: Extend 'rm' command. 2017-01-26 13:49:56 +01:00
build-emacs-utils.scm tests: build-emacs-utils: Allow test to pass on Emacs 27 too. 2022-07-13 10:49:40 -04:00
build-utils.scm utils: Fix wrap-script argument handling. 2022-01-10 11:44:29 -05:00
builders.scm git-download: Use “builtin:git-download” when available. 2023-09-26 17:36:58 +02:00
cache.scm cache: Catch invalid 'last-expiry-cleanup'. 2022-06-04 12:04:23 +02:00
challenge.scm guix: Move narinfo code from substitute script to module. 2021-01-16 11:51:03 +00:00
channels.scm channels: ‘latest-channel-instances’ traverses user-provided channels first. 2024-01-31 09:07:25 +01:00
combinators.scm utils: Move combinators to (guix combinators). 2016-05-04 23:35:55 +02:00
composer.scm guix: import: Add composer importer. 2023-12-18 23:16:28 +01:00
containers.scm linux-container: 'container-excursion' forks to join the PID namespace. 2023-01-30 22:24:27 +01:00
cpan.scm tests: Ensure 'cpan' updater test does not access the network. 2023-06-09 14:19:14 +02:00
cpio.scm utils: Don’t re-export ‘call-with-temporary-output-file’. 2024-04-15 22:36:42 +02:00
cran.scm import: cran: Fix description->package test. 2021-12-18 04:09:47 +01:00
crate.scm guix: import: Optionally import necessary yanked crates. 2024-01-09 09:38:38 +02:00
cve-sample.json tests: Fix malformed JSON. 2020-12-21 17:47:35 +01:00
cve.scm cve: Rewrite to read the JSON feed instead of the XML feed. 2019-10-23 16:40:17 +02:00
debug-link.scm tests: Add 'test-assertm' to (guix tests). 2018-11-12 23:37:13 +01:00
derivations.scm tests: Assume ‘git’ is always available. 2023-09-26 17:36:59 +02:00
discovery.scm discovery: Recurse into directories pointed to by a symlink. 2017-07-03 23:51:23 +02:00
egg.scm utils: Don’t re-export ‘call-with-temporary-output-file’. 2024-04-15 22:36:42 +02:00
elm.scm import: Add Elm importer. 2022-05-22 01:07:52 +02:00
elpa.scm tests: Ensure 'elpa' test does not access the network. 2023-06-09 14:19:14 +02:00
file-systems.scm pack: Streamline how files are included in tarballs. 2021-07-18 02:10:49 -04:00
gem.scm tests: Use quasiquoted 'match' patterns for package sexps. 2023-05-31 23:50:06 +02:00
gexp.scm gexp: Add #:guile parameter to ‘gexp->file’ and ‘scheme-file’. 2024-04-08 00:05:48 +02:00
git-authenticate.scm tests: Assume ‘git’ is always available. 2023-09-26 17:36:59 +02:00
git.scm tests: Assume ‘git’ is always available. 2023-09-26 17:36:59 +02:00
glob.scm guix: Add globstar support. 2020-12-09 22:25:17 +01:00
gnu-maintenance.scm tests: ‘rewrite-url’ test no longer depends on network access. 2023-09-27 23:38:21 +02:00
go.scm guix: import: Report go version for go importer. 2023-12-16 18:05:58 +02:00
grafts.scm grafts: Fix corner case involving multiple-output derivations. 2023-10-28 00:17:23 +02:00
graph.scm tests: Adjust 'node-back-edges' test for 'bag' to system-dependent glibc. 2023-08-21 16:16:47 +02:00
gremlin.scm tests: Fix file-needed/recursive on aarch64-linux. 2022-01-16 20:21:27 -08:00
guix-archive.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-authenticate.sh tests: Move keys into ./tests/keys/ and add a third ed25519 key. 2021-12-22 10:53:19 +01:00
guix-build-branch.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-build.sh ui: 'load*' accepts /dev/fd/N files pointing to a pipe. 2023-08-17 17:33:53 +02:00
guix-daemon.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-describe.sh guix describe: Adjust test to latest changes. 2022-09-04 23:10:10 +02:00
guix-download.sh tests: Remove interference from the user’s Git config. 2024-05-13 16:31:35 +02:00
guix-environment-container.sh tests: Adjust to cope with glibc graft. 2023-10-28 01:30:37 +02:00
guix-environment.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-gc.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-git-authenticate.sh git authenticate: Record introduction and keyring in ‘.git/config’. 2024-05-01 17:26:18 +02:00
guix-graph.sh tests: Adjust ‘guix graph --path’ test to latest Emacs changes. 2023-09-26 17:36:57 +02:00
guix-hash.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-home.sh tests: guix-home: Fix description search for home-mcron. 2023-08-25 17:45:47 +02:00
guix-lint.sh packages: 'package-field-location' handles 'search-path' returning #f. 2021-02-22 12:07:45 +01:00
guix-locate.sh locate: Accept ‘--clear’ without additional arguments. 2023-11-15 18:29:37 +01:00
guix-pack-localstatedir.sh pack: '--localstatedir' and '-R' tests gracefully handle missing /gnu/store. 2019-05-18 12:23:31 +02:00
guix-pack-relocatable.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-pack.sh tests: Adjust to cope with glibc graft. 2023-10-28 01:30:37 +02:00
guix-package-aliases.sh tests: Relax two tests that expected a non-zero error code. 2023-04-21 17:09:46 +02:00
guix-package-net.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-package.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-refresh.sh refresh: Add --target-version option. 2023-08-15 09:38:29 -04:00
guix-repl.sh repl: Look for script files in (getcwd). 2020-09-16 16:04:01 +02:00
guix-shell-export-manifest.sh shell: Fix '--export-manifest' for cached profiles and when '-p' is used. 2022-06-16 23:57:40 +02:00
guix-shell.sh shell: ‘--development’ honors ‘--system’. 2023-12-06 23:50:04 +01:00
guix-style.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-system.sh tests: Verify plasma.tmpl at x86_64-linux. 2023-10-21 16:11:17 +02:00
guix-time-machine.sh time-machine: Allow time travels to v0.16.0. 2024-03-11 22:12:34 +01:00
hackage.scm guix: import: Fix parsing Cabal files that import many stanzas 2023-12-03 16:15:29 +01:00
hexpm.scm tests: Use quasiquoted 'match' patterns for package sexps. 2023-05-31 23:50:06 +02:00
home-import.scm home: import: Use (guix read-print) to render the config file. 2022-09-20 19:24:31 +02:00
home-services.scm home: services: Add 'lookup-home-service-types' procedure. 2022-06-04 12:04:24 +02:00
http-client.scm tests: Add (guix http-client) tests. 2022-03-06 22:49:46 +01:00
import-git.scm tests: Assume ‘git’ is always available. 2023-09-26 17:36:59 +02:00
import-github.scm upstream-updater: Rename record field. 2022-12-26 17:15:06 +01:00
import-utils.scm import-utils: Do not include punctuation when wrapping in @code{}. 2023-08-28 19:08:38 +02:00
inferior.scm guix: inferior: Fix the behaviour of open-inferior #:error-port. 2022-07-08 13:51:34 +01:00
ipfs.scm Add (guix ipfs). 2021-04-12 18:42:22 +02:00
lint.scm lint: archival: Trigger “Save Code Now” for VCSes other than Git. 2024-03-09 18:55:49 +01:00
minetest.scm tests: Adjust minetest tests. 2023-06-09 14:19:14 +02:00
modules.scm Remove VM generation dead-code. 2021-12-23 10:54:00 +01:00
monads.scm Remove now unnecessary uses of (guix grafts). 2022-10-22 01:46:55 +02:00
nar.scm daemon: Do not deduplicate files smaller than 8 KiB. 2021-11-16 14:34:28 +01:00
networking.scm services: ntp-service-type: Remove deprecated server as strings support. 2023-04-07 17:56:07 +02:00
npm-binary.scm import: Add binary npm importer. 2024-05-19 16:05:00 +02:00
offload.scm offload: Modify the build-machine record to accept multiple systems. 2020-08-25 13:45:27 -04:00
opam.scm utils: Don’t re-export ‘call-with-temporary-output-file’. 2024-04-15 22:36:42 +02:00
openpgp.scm tests: Move keys into ./tests/keys/ and add a third ed25519 key. 2021-12-22 10:53:19 +01:00
pack.scm store: database: Rename a couple of procedures. 2024-04-03 17:30:53 +01:00
packages.scm tests: Fix "package-transitive-supported-systems, implicit inputs". 2023-09-15 22:05:23 +02:00
pki.scm pki: 'public-keys->acl' deduplicates entries. 2022-12-12 15:03:05 +01:00
print.scm import: print: Quasiquote properties 2022-09-29 22:59:48 +02:00
processes.scm tests: processes: Skip tests if running with binfmt. 2019-12-10 10:49:42 +01:00
profiles.scm gnu: Use ‘libc-utf8-locales-for-target’. 2023-12-02 12:25:45 +01:00
publish.scm utils: Don’t re-export ‘call-with-temporary-output-file’. 2024-04-15 22:36:42 +02:00
pypi.scm tests: Use quasiquoted 'match' patterns for package sexps. 2023-05-31 23:50:06 +02:00
read-print.scm read-print: Properly indent ‘parameterize’. 2023-11-22 16:51:46 +01:00
records.scm tests: records: Add test for ellipsis in body. 2023-06-04 10:59:28 +02:00
rpm.scm pack: Add RPM format. 2023-02-19 21:13:23 -05:00
scripts.scm tests: Add missing import. 2019-03-24 00:13:53 +01:00
search-paths.scm build: Remove 'gnu/packages/bootstrap' and its binaries. 2019-06-14 22:09:38 +02:00
services.scm gnu: services: Revert to deleting and updating all matching services 2023-08-31 23:31:50 -04:00
sets.scm build: Add a Guile custom test driver using SRFI-64. 2016-04-03 14:19:09 +02:00
size.scm tests: Add 'test-assertm' to (guix tests). 2018-11-12 23:37:13 +01:00
status.scm status: Relay "updating substitutes" messages. 2022-06-26 23:19:14 +02:00
store-database.scm utils: Don’t re-export ‘call-with-temporary-output-file’. 2024-04-15 22:36:42 +02:00
store-deduplication.scm deduplication: Detect holes and create sparse files. 2024-05-25 16:44:42 +02:00
store-roots.scm tests: store-roots: Remove bogus test. 2023-08-18 16:10:08 +02:00
store.scm daemon: Implement ‘substitute-urls’ RPC. 2023-12-11 23:18:53 +01:00
style.scm style: Add 'arguments' styling rule. 2023-05-18 20:01:32 +02:00
substitute.scm substitute: Do not exit when failing to find a nar. 2023-12-04 22:26:36 +01:00
swh.scm swh: ‘lookup-origin-revision’ handles branches pointing to directories. 2024-03-09 18:55:49 +01:00
syscalls.scm tests: Skip ‘terminal-string-width’ test on encodings other than UTF-8. 2024-05-13 16:31:35 +02:00
system.scm Remove now unnecessary uses of (guix grafts). 2022-10-22 01:46:55 +02:00
test.drv Add unit test for derivation parsing and output. 2012-04-19 23:09:55 +02:00
texlive.scm tests: Fix texlive->guix-package test. 2023-08-13 02:00:00 +02:00
transformations.scm tests: Adjust to cope with glibc graft. 2023-10-28 01:30:37 +02:00
ui.scm ui: Take package upstream name into account when searching. 2022-12-13 17:46:39 +01:00
union.scm tests: Make builds less expensive. 2019-06-14 21:57:39 +02:00
upstream.scm tests: upstream: Restore test that was skipped. 2023-05-31 23:25:25 +02:00
utils.scm utils: Don’t re-export ‘call-with-temporary-output-file’. 2024-04-15 22:36:42 +02:00
uuid.scm uuid: 'fat-uuid->string' preserves leading zeros. 2019-05-07 12:18:44 +02:00
workers.scm workers: Add test with exceptions. 2017-11-17 10:47:49 +01:00