umount can return error if /etc/mtab link to /proc/mounts
$ mount --rbind /tmp/1 /tmp/2
$ mount
...
/tmp/1 on /tmp/2 type none (rw,bind)
$ mv /etc/mtab{,.orig}
$ mount
...
/dev/root on /tmp/2 type ext3 (rw,data=ordered)
$ umount /tmp/1
umount: /tmp/1: not mounted
if umount return error, test_fs_bind.sh will hang up in the infinite loop:
( while grep_proc_mounts ; do
grep_proc_mounts | awk '{print $2}' | xargs -r --max-args=1 umount -l
done ) >& /dev/null
but /proc/mounts contain next info:
/dev/root /tmp/2\040(deleted) ext3 rw,data=ordered 0 0
because source directory has been deleted.
previous script try execute umount -l /tmp/2\040(deleted), umount fail correctly
but all message from stdout and stderr redirecte to /dev/null.
my patch fixed testcase fs_bind/regression/test02,
that execute all umount commands with target directories.
---
testcases/kernel/fs/fs_bind/regression/test02 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/testcases/kernel/fs/fs_bind/regression/test02
b/testcases/kernel/fs/fs_bind/regression/test02
index ff9808a..e2ac59d 100755
--- a/testcases/kernel/fs/fs_bind/regression/test02
+++ b/testcases/kernel/fs/fs_bind/regression/test02
@@ -61,7 +61,7 @@ trap '' ERR
{
umount dir1/a
umount dir2/a
- umount dir1
+ umount dir2
umount dir1
rm -rf dir*
--
1.5.6.4
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list