diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2025-10-13 10:39:21 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2025-10-13 14:48:26 +0200 |
| commit | e0e64be8de3d220a12612b3a2e4aee428277d865 (patch) | |
| tree | d55858b5e6ebd050907c1f51188d7575b9e0048e /tests | |
| parent | 73cbebfaede2d31e22a6e75d395c37768d6382d1 (diff) | |
linux-container: Remove #:lock-mounts? and related code.
This reverts commits 437bb9ece55f37d4b5a62cafc98c0c3b848a53ce and
a57ed987ffd1452ba5a4d70feb54893e99b8e076, which were reported in
guix/guix#1169 to occasionally cause errors like:
guix shell: error: unshare : 268566528: Invalid argument
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/containers.scm | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/tests/containers.scm b/tests/containers.scm index 6edea9631dc..1e915d517e8 100644 --- a/tests/containers.scm +++ b/tests/containers.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 David Thompson <davet@gnu.org> -;;; Copyright © 2016-2017, 2019, 2023, 2025 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2016, 2017, 2019, 2023 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -111,26 +111,6 @@ #:namespaces '(user mnt)))) (skip-if-unsupported) -(test-equal "call-with-container, mnt namespace, locked mounts" - EINVAL - ;; umount(2) fails with EINVAL when targeting a mount point that is - ;; "locked". - (status:exit-val - (call-with-container (list (file-system - (device "none") - (mount-point "/testing") - (type "tmpfs") - (check? #f))) - (lambda () - (primitive-exit (catch 'system-error - (lambda () - (umount "/testing") - 0) - (lambda args - (system-error-errno args))))) - #:namespaces '(user mnt)))) - -(skip-if-unsupported) (test-equal "call-with-container, mnt namespace, wrong bind mount" `(system-error ,ENOENT) ;; An exception should be raised; see <http://bugs.gnu.org/23306>. @@ -189,8 +169,7 @@ #:namespaces '(user mnt)))) (skip-if-unsupported) -(test-equal "container-excursion" - 0 +(test-assert "container-excursion" (call-with-temporary-directory (lambda (root) ;; Two pipes: One for the container to signal that the test can begin, @@ -214,11 +193,7 @@ (readlink (string-append "/proc/" pid "/ns/" ns))) '("user" "ipc" "uts" "net" "pid" "mnt")))) - (let* ((pid (run-container root '() %namespaces 1 container - ;; Do not lock mounts so the user namespace - ;; appears to be the same seen from inside - ;; and from outside. - #:lock-mounts? #f)) + (let* ((pid (run-container root '() %namespaces 1 container)) (container-namespaces (namespaces pid)) (result (begin @@ -238,7 +213,7 @@ (write 'done end-out) (close end-out) (waitpid pid) - result)))))) + (zero? result))))))) (skip-if-unsupported) (test-equal "container-excursion, same namespaces" |
