diff --git a/tests/test-empty-working-tree b/tests/test-empty-working-tree
index 154334e1e7e0b5d1c03f8aea708d2350c18cca21_dGVzdHMvdGVzdC1lbXB0eS13b3JraW5nLXRyZWU=..525ffe284b0c463947c3f7cda15f1b6dc32f7384_dGVzdHMvdGVzdC1lbXB0eS13b3JraW5nLXRyZWU= 100755
--- a/tests/test-empty-working-tree
+++ b/tests/test-empty-working-tree
@@ -42,7 +42,7 @@
 git daemon --base-path="$(pwd)"\
  --listen=localhost\
  --export-all\
- --pid-file=gitdaemon.pid \
+ --pid-file="$DAEMON_PIDS" \
  --detach --reuseaddr \
  --enable=receive-pack
 
@@ -57,4 +57,3 @@
 git log --pretty=medium
 
 cd ..
-kill `cat gitdaemon.pid`
diff --git a/tests/test-encoding b/tests/test-encoding
index 154334e1e7e0b5d1c03f8aea708d2350c18cca21_dGVzdHMvdGVzdC1lbmNvZGluZw==..525ffe284b0c463947c3f7cda15f1b6dc32f7384_dGVzdHMvdGVzdC1lbmNvZGluZw== 100755
--- a/tests/test-encoding
+++ b/tests/test-encoding
@@ -53,7 +53,7 @@
 git daemon --base-path="$(pwd)"\
  --listen=localhost\
  --export-all\
- --pid-file=gitdaemon.pid \
+ --pid-file="$DAEMON_PIDS" \
  --detach --reuseaddr \
  --enable=receive-pack
 
@@ -69,4 +69,3 @@
 git log --pretty=medium
 
 cd ..
-kill `cat gitdaemon.pid`
diff --git a/tests/test-file-removal b/tests/test-file-removal
index 154334e1e7e0b5d1c03f8aea708d2350c18cca21_dGVzdHMvdGVzdC1maWxlLXJlbW92YWw=..525ffe284b0c463947c3f7cda15f1b6dc32f7384_dGVzdHMvdGVzdC1maWxlLXJlbW92YWw= 100755
--- a/tests/test-file-removal
+++ b/tests/test-file-removal
@@ -60,7 +60,7 @@
 git daemon --base-path="$(pwd)"\
  --listen=localhost\
  --export-all\
- --pid-file=gitdaemon.pid \
+ --pid-file="$DAEMON_PIDS" \
  --detach --reuseaddr \
  --enable=receive-pack
 
@@ -83,4 +83,3 @@
 git log --pretty=medium
 
 cd ..
-kill `cat gitdaemon.pid`
diff --git a/tests/test-git-tags b/tests/test-git-tags
index 154334e1e7e0b5d1c03f8aea708d2350c18cca21_dGVzdHMvdGVzdC1naXQtdGFncw==..525ffe284b0c463947c3f7cda15f1b6dc32f7384_dGVzdHMvdGVzdC1naXQtdGFncw== 100755
--- a/tests/test-git-tags
+++ b/tests/test-git-tags
@@ -56,7 +56,7 @@
 git daemon --base-path="$(pwd)"\
  --listen=localhost\
  --export-all\
- --pid-file=gitdaemon.pid \
+ --pid-file="$DAEMON_PIDS" \
  --detach --reuseaddr \
  --enable=receive-pack
 
@@ -69,4 +69,3 @@
 hg push
 
 cd ..
-kill `cat gitdaemon.pid`
diff --git a/tests/test-hg-author b/tests/test-hg-author
index 154334e1e7e0b5d1c03f8aea708d2350c18cca21_dGVzdHMvdGVzdC1oZy1hdXRob3I=..525ffe284b0c463947c3f7cda15f1b6dc32f7384_dGVzdHMvdGVzdC1oZy1hdXRob3I= 100755
--- a/tests/test-hg-author
+++ b/tests/test-hg-author
@@ -57,7 +57,7 @@
 git daemon --base-path="$(pwd)"\
  --listen=localhost\
  --export-all\
- --pid-file=gitdaemon.pid \
+ --pid-file="$DAEMON_PIDS" \
  --detach --reuseaddr \
  --enable=receive-pack
 
@@ -82,4 +82,3 @@
 hg log --graph
 
 cd ..
-kill `cat gitdaemon.pid`
diff --git a/tests/test-hg-branch b/tests/test-hg-branch
index 154334e1e7e0b5d1c03f8aea708d2350c18cca21_dGVzdHMvdGVzdC1oZy1icmFuY2g=..525ffe284b0c463947c3f7cda15f1b6dc32f7384_dGVzdHMvdGVzdC1oZy1icmFuY2g= 100755
--- a/tests/test-hg-branch
+++ b/tests/test-hg-branch
@@ -58,7 +58,7 @@
 git daemon --base-path="$(pwd)"\
  --listen=localhost\
  --export-all\
- --pid-file=gitdaemon.pid \
+ --pid-file="$DAEMON_PIDS" \
  --detach --reuseaddr \
  --enable=receive-pack
 
@@ -82,4 +82,3 @@
 hg log --graph | $filterhash
 
 cd ..
-kill `cat gitdaemon.pid`
diff --git a/tests/test-hg-tags b/tests/test-hg-tags
index 154334e1e7e0b5d1c03f8aea708d2350c18cca21_dGVzdHMvdGVzdC1oZy10YWdz..525ffe284b0c463947c3f7cda15f1b6dc32f7384_dGVzdHMvdGVzdC1oZy10YWdz 100755
--- a/tests/test-hg-tags
+++ b/tests/test-hg-tags
@@ -56,7 +56,7 @@
 git daemon --base-path="$(pwd)"\
  --listen=localhost\
  --export-all\
- --pid-file=gitdaemon.pid \
+ --pid-file="$DAEMON_PIDS" \
  --detach --reuseaddr \
  --enable=receive-pack
 
@@ -83,4 +83,3 @@
 cat .hgtags
 
 cd ..
-kill `cat gitdaemon.pid`
diff --git a/tests/test-merge b/tests/test-merge
index 154334e1e7e0b5d1c03f8aea708d2350c18cca21_dGVzdHMvdGVzdC1tZXJnZQ==..525ffe284b0c463947c3f7cda15f1b6dc32f7384_dGVzdHMvdGVzdC1tZXJnZQ== 100755
--- a/tests/test-merge
+++ b/tests/test-merge
@@ -60,7 +60,7 @@
 git daemon --base-path="$(pwd)"\
  --listen=localhost\
  --export-all \
- --pid-file=gitdaemon.pid \
+ --pid-file="$DAEMON_PIDS" \
  --detach --reuseaddr \
  --enable=receive-pack
 
@@ -78,4 +78,3 @@
 git log --pretty=medium beta | sed 's/\.\.\.//g'
 
 cd ..
-kill `cat gitdaemon.pid`
diff --git a/tests/test-octopus b/tests/test-octopus
index 154334e1e7e0b5d1c03f8aea708d2350c18cca21_dGVzdHMvdGVzdC1vY3RvcHVz..525ffe284b0c463947c3f7cda15f1b6dc32f7384_dGVzdHMvdGVzdC1vY3RvcHVz 100755
--- a/tests/test-octopus
+++ b/tests/test-octopus
@@ -65,7 +65,7 @@
 git daemon --base-path="$(pwd)"\
  --listen=localhost\
  --export-all\
- --pid-file=gitdaemon.pid \
+ --pid-file="$DAEMON_PIDS" \
  --detach --reuseaddr \
  --enable=receive-pack
 
@@ -80,4 +80,3 @@
 git log --pretty=medium | sed s/\\.\\.\\.//g
 
 cd ..
-kill `cat gitdaemon.pid`
diff --git a/tests/test-outgoing b/tests/test-outgoing
index 154334e1e7e0b5d1c03f8aea708d2350c18cca21_dGVzdHMvdGVzdC1vdXRnb2luZw==..525ffe284b0c463947c3f7cda15f1b6dc32f7384_dGVzdHMvdGVzdC1vdXRnb2luZw== 100755
--- a/tests/test-outgoing
+++ b/tests/test-outgoing
@@ -49,7 +49,7 @@
 git daemon --base-path="$(pwd)"\
  --listen=localhost\
  --export-all\
- --pid-file=gitdaemon.pid \
+ --pid-file="$DAEMON_PIDS" \
  --detach --reuseaddr \
  --enable=receive-pack
 
@@ -94,4 +94,3 @@
 
 
 cd ..
-kill `cat gitdaemon.pid`
diff --git a/tests/test-pull b/tests/test-pull
index 154334e1e7e0b5d1c03f8aea708d2350c18cca21_dGVzdHMvdGVzdC1wdWxs..525ffe284b0c463947c3f7cda15f1b6dc32f7384_dGVzdHMvdGVzdC1wdWxs 100755
--- a/tests/test-pull
+++ b/tests/test-pull
@@ -49,7 +49,7 @@
 git daemon --base-path="$(pwd)"\
  --listen=localhost\
  --export-all\
- --pid-file=gitdaemon.pid \
+ --pid-file="$DAEMON_PIDS" \
  --detach --reuseaddr
 
 echo % clone a tag
@@ -65,4 +65,3 @@
 
 
 cd ..
-kill `cat gitdaemon.pid`
diff --git a/tests/test-pull-after-strip b/tests/test-pull-after-strip
index 154334e1e7e0b5d1c03f8aea708d2350c18cca21_dGVzdHMvdGVzdC1wdWxsLWFmdGVyLXN0cmlw..525ffe284b0c463947c3f7cda15f1b6dc32f7384_dGVzdHMvdGVzdC1wdWxsLWFmdGVyLXN0cmlw 100755
--- a/tests/test-pull-after-strip
+++ b/tests/test-pull-after-strip
@@ -64,7 +64,7 @@
 git daemon --base-path="$(pwd)"\
  --listen=localhost\
  --export-all\
- --pid-file=gitdaemon.pid \
+ --pid-file="$DAEMON_PIDS" \
  --detach --reuseaddr
 
 echo % clone a tag
@@ -94,4 +94,3 @@
 hg log --graph
 
 cd ..
-kill `cat gitdaemon.pid`
diff --git a/tests/test-push b/tests/test-push
index 154334e1e7e0b5d1c03f8aea708d2350c18cca21_dGVzdHMvdGVzdC1wdXNo..525ffe284b0c463947c3f7cda15f1b6dc32f7384_dGVzdHMvdGVzdC1wdXNo 100755
--- a/tests/test-push
+++ b/tests/test-push
@@ -51,7 +51,7 @@
 git daemon --base-path="$(pwd)"\
  --listen=localhost\
  --export-all\
- --pid-file=gitdaemon.pid \
+ --pid-file="$DAEMON_PIDS" \
  --detach --reuseaddr \
  --enable=receive-pack
 
@@ -106,4 +106,3 @@
 hg push -fr master
 
 cd ..
-kill `cat gitdaemon.pid`
diff --git a/tests/test-sane-without-bookmarks b/tests/test-sane-without-bookmarks
index 154334e1e7e0b5d1c03f8aea708d2350c18cca21_dGVzdHMvdGVzdC1zYW5lLXdpdGhvdXQtYm9va21hcmtz..525ffe284b0c463947c3f7cda15f1b6dc32f7384_dGVzdHMvdGVzdC1zYW5lLXdpdGhvdXQtYm9va21hcmtz 100755
--- a/tests/test-sane-without-bookmarks
+++ b/tests/test-sane-without-bookmarks
@@ -44,7 +44,7 @@
 git daemon --base-path="$(pwd)"\
  --listen=localhost\
  --export-all\
-  --pid-file=gitdaemon.pid \
+  --pid-file="$DAEMON_PIDS" \
  --detach --reuseaddr
 
 hg clone git://localhost/gitrepo hgrepo | grep -v '^updating'
@@ -52,4 +52,3 @@
 hg log --graph
 
 cd ..
-kill `cat gitdaemon.pid`
diff --git a/tests/test-tree-decomposition b/tests/test-tree-decomposition
index 154334e1e7e0b5d1c03f8aea708d2350c18cca21_dGVzdHMvdGVzdC10cmVlLWRlY29tcG9zaXRpb24=..525ffe284b0c463947c3f7cda15f1b6dc32f7384_dGVzdHMvdGVzdC10cmVlLWRlY29tcG9zaXRpb24= 100755
--- a/tests/test-tree-decomposition
+++ b/tests/test-tree-decomposition
@@ -59,7 +59,7 @@
 git daemon --base-path="$(pwd)"\
  --listen=localhost\
  --export-all\
- --pid-file=gitdaemon.pid \
+ --pid-file="$DAEMON_PIDS" \
  --detach --reuseaddr \
  --enable=receive-pack
 
@@ -74,4 +74,3 @@
 git log --pretty=medium
 
 cd ..
-kill `cat gitdaemon.pid`