guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

56/63: tests: 'guix-environment-container.sh' works when run from a tmpf


From: Mark H. Weaver
Subject: 56/63: tests: 'guix-environment-container.sh' works when run from a tmpfs.
Date: Thu, 4 Aug 2016 07:44:59 +0000 (UTC)

mhw pushed a commit to branch core-updates-2016-08-01
in repository guix.

commit 1250034d5aff14fe236aad9900233a2b6f8563bb
Author: Ludovic Court├Ęs <address@hidden>
Date:   Sun Jul 31 18:51:38 2016 +0200

    tests: 'guix-environment-container.sh' works when run from a tmpfs.
    
    Fixes <http://bugs.gnu.org/22004>.
    Reported by Ting-Wei Lan <address@hidden>.
    
    * tests/guix-environment-container.sh (mount_test_code): Add 'match'
    clause to ignore "/"; augment clause that ignores specific file system
    types such that it does not ignore parent mount points.
---
 tests/guix-environment-container.sh |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/tests/guix-environment-container.sh 
b/tests/guix-environment-container.sh
index 5ea6c49..12da950 100644
--- a/tests/guix-environment-container.sh
+++ b/tests/guix-environment-container.sh
@@ -65,10 +65,15 @@ mount_test_code="
                 (match (string-split line #\space)
                   ;; Empty line.
                   ((\"\") #f)
-                  ;; Ignore these types of file systems.
-                  ((_ _ (or \"tmpfs\" \"proc\" \"sysfs\" \"devtmpfs\"
-                            \"devpts\" \"cgroup\" \"mqueue\") _ _ _)
+                  ;; Ignore the root file system.
+                  ((_ \"/\" _ _ _ _)
                    #f)
+                  ;; Ignore these types of file systems, except if they
+                  ;; correspond to a parent file system.
+                  ((_ mount (or \"tmpfs\" \"proc\" \"sysfs\" \"devtmpfs\"
+                                \"devpts\" \"cgroup\" \"mqueue\") _ _ _)
+                   (and (string-prefix? mount (getcwd))
+                       mount))
                   ((_ mount _ _ _ _)
                    mount)))
               (string-split (call-with-input-file \"/proc/mounts\" read-string)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]