about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-01-31T10·27+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-01-31T10·27+0000
commit1328aa33077fd1cf84869e366c82b8ea1d1abb5d (patch)
tree8f079aabcfb9d1d5b485170e0edb583c052039ee /tests
parenta7668411a10c79ad40c9c18caf2570d5c9f52182 (diff)
* Start of concurrent garbage collection. Processes write temporary
  roots to a per-process temporary file in /nix/var/nix/temproots
  while holding a write lock on that file.  The garbage collector
  acquires read locks on all those files, thus blocking further
  progress in other Nix processes, and reads the sets of temporary
  roots.

Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am7
-rw-r--r--tests/gc-concurrent.sh4
-rw-r--r--tests/init.sh1
3 files changed, 8 insertions, 4 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 53ecfe1fb7d7..7c823a046a79 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -36,9 +36,10 @@ nix-pull.sh: dependencies.nix
 gc.sh: dependencies.nix
 gc-concurrent.sh: gc-concurrent.nix
 
-TESTS = init.sh hash.sh lang.sh simple.sh dependencies.sh locking.sh parallel.sh \
-  build-hook.sh substitutes.sh substitutes2.sh fallback.sh nix-push.sh gc.sh \
-  gc-concurrent.sh verify.sh nix-pull.sh
+#TESTS = init.sh hash.sh lang.sh simple.sh dependencies.sh locking.sh parallel.sh \
+#  build-hook.sh substitutes.sh substitutes2.sh fallback.sh nix-push.sh gc.sh \
+#  gc-concurrent.sh verify.sh nix-pull.sh
+TESTS = init.sh gc-concurrent.sh 
 
 XFAIL_TESTS =
 
diff --git a/tests/gc-concurrent.sh b/tests/gc-concurrent.sh
index d85c609825ee..c41475fb6ebd 100644
--- a/tests/gc-concurrent.sh
+++ b/tests/gc-concurrent.sh
@@ -1,6 +1,8 @@
 storeExpr=$($TOP/src/nix-instantiate/nix-instantiate gc-concurrent.nix)
 outPath=$($TOP/src/nix-store/nix-store -q $storeExpr)
 
+ls -l test-tmp/state/temproots
+
 
 # Start a build in the background.
 $TOP/src/nix-store/nix-store -rvv "$storeExpr" &
@@ -8,7 +10,7 @@ pid=$!
 
 # Run the garbage collector while the build is running.
 sleep 2
-$NIX_BIN_DIR/nix-collect-garbage
+$NIX_BIN_DIR/nix-collect-garbage -vvvvv
 
 # Wait for the build to finish.
 echo waiting for pid $pid to finish...
diff --git a/tests/init.sh b/tests/init.sh
index e80a847c3a44..63cce81bd79d 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -26,6 +26,7 @@ ln -s $TOP/scripts/readmanifest.pm $NIX_BIN_DIR/nix/
 mkdir -p "$NIX_LOCALSTATE_DIR"/nix/manifests
 mkdir -p "$NIX_LOCALSTATE_DIR"/nix/gcroots
 mkdir -p "$NIX_LOCALSTATE_DIR"/log/nix
+mkdir -p "$NIX_LOCALSTATE_DIR"/temproots
 
 mkdir $NIX_DATA_DIR/nix
 cp -prd $TOP/corepkgs $NIX_DATA_DIR/nix/