diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-08-16 20:03:32 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-10-13 12:12:44 +0200 |
commit | 8614cf13344eca75074cd4af20fd90238571b0b6 (patch) | |
tree | 367c7d7a0d3a5bf7a38f6d18a0bc56e15ec0b057 /tests | |
parent | 9947f1646a26b339fff2e02b77798e9841fac7f0 (diff) |
Non-blocking garbage collector
The garbage collector no longer blocks other processes from
adding/building store paths or adding GC roots. To prevent the
collector from deleting store paths just added by another process,
processes need to connect to the garbage collector via a Unix domain
socket to register new temporary roots.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/ca/build-with-garbage-path.sh | 2 | ||||
-rw-r--r-- | tests/repair.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/ca/build-with-garbage-path.sh b/tests/ca/build-with-garbage-path.sh index 9aa08a899..884cd2802 100755 --- a/tests/ca/build-with-garbage-path.sh +++ b/tests/ca/build-with-garbage-path.sh @@ -8,7 +8,7 @@ requireDaemonNewerThan "2.4pre20210621" # Get the output path of `rootCA`, and put some garbage instead outPath="$(nix-build ./content-addressed.nix -A rootCA --no-out-link)" -nix-store --delete "$outPath" +nix-store --delete $(nix-store -q --referrers-closure "$outPath") touch "$outPath" # The build should correctly remove the garbage and put the expected path instead diff --git a/tests/repair.sh b/tests/repair.sh index 12dcde8ea..1105b446b 100644 --- a/tests/repair.sh +++ b/tests/repair.sh @@ -30,7 +30,7 @@ nix-store --verify-path $path2 chmod u+w $path2 touch $path2/bad -nix-store --delete $(nix-store -qd $path2) +nix-store --delete $(nix-store -q --referrers-closure $(nix-store -qd $path2)) (! nix-store --verify --check-contents --repair) |