summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-10-19 09:11:08 +0200
committerJim Meyering <meyering@redhat.com>2009-10-26 10:21:25 +0100
commitc695781753fdb3eceb78afdd947b86501209b2f2 (patch)
tree4abbc611a78befb760312de0a70f7d03cb7dfe52
parentd9cf7c911f2d5aba6ae04615d179fb2aaf3f06d9 (diff)
downloadcoreutils-c695781753fdb3eceb78afdd947b86501209b2f2.tar.xz
tests: rm/one-file-system: work around umount failure
* 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
-rw-r--r--THANKS1
-rwxr-xr-xtests/rm/one-file-system5
2 files changed, 5 insertions, 1 deletions
diff --git a/THANKS b/THANKS
index 29013f600..5efe2fa1e 100644
--- 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
diff --git a/tests/rm/one-file-system b/tests/rm/one-file-system
index c8e11eb54..db00a5b47 100755
--- a/tests/rm/one-file-system
+++ b/tests/rm/one-file-system
@@ -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"