tests: rm/one-file-system: work around umount failure
authorJim Meyering <meyering@redhat.com>
Mon, 19 Oct 2009 07:11:08 +0000 (09:11 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 26 Oct 2009 09:21:25 +0000 (10:21 +0100)
* tests/rm/one-file-system (cleanup_): Unmount a/b, rather than
"$other_partition_tmpdir", to accommodate those who link /etc/mtab
to /proc/mounts.  Reported by Gilles Espinasse in
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/18508

THANKS
tests/rm/one-file-system

diff --git a/THANKS b/THANKS
index 29013f6000b5340bd82341919e2f325f0f7326c4..5efe2fa1e98f1921d39aa83371f861faf8efe2dc 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -210,6 +210,7 @@ Geoff Whale                         geoffw@cse.unsw.EDU.AU
 Gerald Pfeifer                      gerald@pfeifer.com
 Gerhard Poul                        gpoul@gnu.org
 Germano Leichsenring                germano@jedi.cs.kobe-u.ac.jp
+Gilles Espinasse                    g.esp@free.fr
 Glen Lenker                         glen.lenker@gmail.com
 Göran Uddeborg                      goeran@uddeborg.se
 Guochun Shi                         gshi@ncsa.uiuc.edu
index c8e11eb54c736302c179ba69462b9611b3eb86db..db00a5b47d51a6d02863fa1cb46b7796c0047436 100755 (executable)
@@ -27,7 +27,10 @@ require_root_
 # If used, these must *follow* test-lib.sh.
 cleanup_()
 {
-  umount "$other_partition_tmpdir"
+  # When you take the undesirable shortcut of making /etc/mtab a link
+  # to /proc/mounts, unmounting "$other_partition_tmpdir" would fail.
+  # So, here we unmount a/b instead.
+  umount a/b
   rm -rf "$other_partition_tmpdir"
 }
 . "$abs_srcdir/other-fs-tmpdir"