aboutsummaryrefslogtreecommitdiff
path: root/tests/containers.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-11-10 17:45:54 +0100
committerLudovic Courtès <ludo@gnu.org>2016-11-10 18:01:44 +0100
commit5970e8e248f6327c41c83b86bb2c89be7c3b1b4e (patch)
tree0f796474c90be43c8ce6f2e974064953e0b230c4 /tests/containers.scm
parent5e7eaccb14382b2d49bc8b4fc10fc57876d6c56f (diff)
downloadpatches-5970e8e248f6327c41c83b86bb2c89be7c3b1b4e.tar
patches-5970e8e248f6327c41c83b86bb2c89be7c3b1b4e.tar.gz
container: Pass a list of <file-system> objects as things to mount.
* gnu/build/linux-container.scm (mount-file-systems): 'mounts' is now a list of <file-system> objects instead of a list of lists ("specs"). Add call to 'file-system->spec' as the argument to 'mount-file-system'. (run-container, call-with-container): Adjust docstring accordingly. * gnu/system/file-systems.scm (spec->file-system): New procedure. * gnu/system/linux-container.scm (container-script)[script]: Call 'spec->file-system' inside gexp. * guix/scripts/environment.scm (launch-environment/container): Remove call to 'file-system->spec'. * tests/containers.scm ("call-with-container, mnt namespace") ("call-with-container, mnt namespace, wrong bind mount"): Pass a list of <file-system> objects.
Diffstat (limited to 'tests/containers.scm')
-rw-r--r--tests/containers.scm13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/containers.scm b/tests/containers.scm
index 698bef3e47..ccd122ac79 100644
--- a/tests/containers.scm
+++ b/tests/containers.scm
@@ -20,6 +20,7 @@
#:use-module (guix utils)
#:use-module (guix build syscalls)
#:use-module (gnu build linux-container)
+ #:use-module (gnu system file-systems)
#:use-module (srfi srfi-64)
#:use-module (ice-9 match))
@@ -80,7 +81,10 @@
(skip-if-unsupported)
(test-assert "call-with-container, mnt namespace"
(zero?
- (call-with-container '(("none" device "/testing" "tmpfs" () #f #f))
+ (call-with-container (list (file-system
+ (device "none")
+ (mount-point "/testing")
+ (type "tmpfs")))
(lambda ()
(assert-exit (file-exists? "/testing")))
#:namespaces '(user mnt))))
@@ -91,8 +95,11 @@
;; An exception should be raised; see <http://bugs.gnu.org/23306>.
(catch 'system-error
(lambda ()
- (call-with-container '(("/does-not-exist" device "/foo"
- "none" (bind-mount) #f #f))
+ (call-with-container (list (file-system
+ (device "/does-not-exist")
+ (mount-point "/foo")
+ (type "none")
+ (flags '(bind-mount))))
(const #t)
#:namespaces '(user mnt)))
(lambda args