aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-03-14 06:28:28 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-03-14 06:28:28 +0100
commitc2fda8642dc917e3a95f1a556b0876249a1bb321 (patch)
tree85701c2264676b8e606f076a4285885cc004d13c
parentcf8b55c40b65a30a6b397f66658d83f0f31f4ed1 (diff)
downloadbusybox-w32-c2fda8642dc917e3a95f1a556b0876249a1bb321.tar.gz
busybox-w32-c2fda8642dc917e3a95f1a556b0876249a1bb321.tar.bz2
busybox-w32-c2fda8642dc917e3a95f1a556b0876249a1bb321.zip
mount: add a test for bind+rshared
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rwxr-xr-xtestsuite/mount.tests39
1 files changed, 38 insertions, 1 deletions
diff --git a/testsuite/mount.tests b/testsuite/mount.tests
index d3d2400e8..58eeb2ec5 100755
--- a/testsuite/mount.tests
+++ b/testsuite/mount.tests
@@ -20,7 +20,7 @@ if test x"$CONFIG_MKFS_MINIX" != x"y" \
20 exit 0 20 exit 0
21fi 21fi
22 22
23testdir=$PWD/mount.testdir 23testdir="$PWD/mount.testdir"
24 24
25dd if=/dev/zero of=mount.image1m count=1 bs=1M 2>/dev/null || { echo "dd error"; exit 1; } 25dd if=/dev/zero of=mount.image1m count=1 bs=1M 2>/dev/null || { echo "dd error"; exit 1; }
26mkfs.minix -v mount.image1m >/dev/null 2>&1 || { echo "mkfs.minix error"; exit 1; } 26mkfs.minix -v mount.image1m >/dev/null 2>&1 || { echo "mkfs.minix error"; exit 1; }
@@ -44,4 +44,41 @@ umount -d "$testdir"
44rmdir "$testdir" 44rmdir "$testdir"
45rm mount.image1m 45rm mount.image1m
46 46
47
48# Bug: mount.shared1 directory shows no files (has to show files a and b)
49testing "mount bind+rshared" "\
50mkdir -p mount.dir mount.shared1 mount.shared2
51touch mount.dir/a mount.dir/b
52
53mount --bind mount.shared1 mount.shared1 2>&1
54mount --make-rshared mount.shared1 2>&1
55mount --bind mount.shared2 mount.shared2 2>&1
56mount --make-rshared mount.shared2 2>&1
57
58mount --bind mount.shared2 mount.shared1 2>&1
59mount --bind mount.dir mount.shared2 2>&1
60
61ls -R mount.dir mount.shared1 mount.shared2 2>&1
62
63umount mount.dir mount.shared1 mount.shared2 2>/dev/null
64umount mount.dir mount.shared1 mount.shared2 2>/dev/null
65umount mount.dir mount.shared1 mount.shared2 2>/dev/null
66rm -f mount.dir/a mount.dir/b mount.dir/c
67rmdir mount.dir mount.shared1 mount.shared2
68" \
69"\
70mount.dir:
71a
72b
73
74mount.shared1:
75a
76b
77
78mount.shared2:
79a
80b
81" \
82 "" ""
83
47exit $FAILCOUNT 84exit $FAILCOUNT