about summary refs log tree commit diff
path: root/tests/gc-concurrent.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gc-concurrent.sh')
-rw-r--r--tests/gc-concurrent.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/gc-concurrent.sh b/tests/gc-concurrent.sh
index 5004a6e4e270..446e79f138a6 100644
--- a/tests/gc-concurrent.sh
+++ b/tests/gc-concurrent.sh
@@ -6,7 +6,8 @@ outPath1=$($nixstore -q $drvPath1)
 drvPath2=$($nixinstantiate gc-concurrent2.nix)
 outPath2=$($nixstore -q $drvPath2)
 
-ln -s $drvPath2 "$NIX_STATE_DIR"/gcroots/foo2
+rm -f "$NIX_STATE_DIR"/gcroots/foo
+ln -s $drvPath2 "$NIX_STATE_DIR"/gcroots/foo
 
 # Start build #1 in the background.  It starts immediately.
 $nixstore -rvv "$drvPath1" &
@@ -35,3 +36,5 @@ cat $outPath1/input-2/bar
 
 # Build #2 should have failed because its derivation got garbage collected.
 cat $outPath2/foobar
+
+rm "$NIX_STATE_DIR"/gcroots/foo