summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-08-01 21:04:31 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-08-08 14:04:13 -0400
commit831bc1468ea27732ba59d58e4b38a192151aa123 (patch)
tree7e6474a505e7721ad27a203ac24ff28a0f12697e /tests
parent8c812f2aeeed8398a27f1594c20914031d97db58 (diff)
downloadguix-831bc1468ea27732ba59d58e4b38a192151aa123.tar.gz
build: container: Add #:host-uids argument to call-with-container.
It's not always possible to map 65536 uids when creating a container as the
root user within another user namespace.  This is true when building Guix
within the build daemon's container.  By using a uid range of 1 by default,
even as the root user, the tests now pass.

* gnu/build/linux-container.scm (initialize-user-namespace, run-container):
  Add 'host-uids' argument.
  (call-with-container): Add #:host-uids keyword argument.
* tests/containers.scm ("container-excursion"): Update 'run-container' call.
Diffstat (limited to 'tests')
-rw-r--r--tests/containers.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/containers.scm b/tests/containers.scm
index cb1aeddcb1..cc90f1ed6c 100644
--- a/tests/containers.scm
+++ b/tests/containers.scm
@@ -102,7 +102,7 @@
                    (readlink (string-append "/proc/" pid "/ns/" ns)))
                  '("user" "ipc" "uts" "net" "pid" "mnt"))))
 
-        (let* ((pid (run-container root '() %namespaces container))
+        (let* ((pid (run-container root '() %namespaces 1 container))
                (container-namespaces (namespaces pid))
                (result
                 (begin