diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-03-14 06:28:28 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-03-14 06:28:28 +0100 |
commit | c2fda8642dc917e3a95f1a556b0876249a1bb321 (patch) | |
tree | 85701c2264676b8e606f076a4285885cc004d13c | |
parent | cf8b55c40b65a30a6b397f66658d83f0f31f4ed1 (diff) | |
download | busybox-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-x | testsuite/mount.tests | 39 |
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 |
21 | fi | 21 | fi |
22 | 22 | ||
23 | testdir=$PWD/mount.testdir | 23 | testdir="$PWD/mount.testdir" |
24 | 24 | ||
25 | dd if=/dev/zero of=mount.image1m count=1 bs=1M 2>/dev/null || { echo "dd error"; exit 1; } | 25 | dd if=/dev/zero of=mount.image1m count=1 bs=1M 2>/dev/null || { echo "dd error"; exit 1; } |
26 | mkfs.minix -v mount.image1m >/dev/null 2>&1 || { echo "mkfs.minix error"; exit 1; } | 26 | mkfs.minix -v mount.image1m >/dev/null 2>&1 || { echo "mkfs.minix error"; exit 1; } |
@@ -44,4 +44,41 @@ umount -d "$testdir" | |||
44 | rmdir "$testdir" | 44 | rmdir "$testdir" |
45 | rm mount.image1m | 45 | rm mount.image1m |
46 | 46 | ||
47 | |||
48 | # Bug: mount.shared1 directory shows no files (has to show files a and b) | ||
49 | testing "mount bind+rshared" "\ | ||
50 | mkdir -p mount.dir mount.shared1 mount.shared2 | ||
51 | touch mount.dir/a mount.dir/b | ||
52 | |||
53 | mount --bind mount.shared1 mount.shared1 2>&1 | ||
54 | mount --make-rshared mount.shared1 2>&1 | ||
55 | mount --bind mount.shared2 mount.shared2 2>&1 | ||
56 | mount --make-rshared mount.shared2 2>&1 | ||
57 | |||
58 | mount --bind mount.shared2 mount.shared1 2>&1 | ||
59 | mount --bind mount.dir mount.shared2 2>&1 | ||
60 | |||
61 | ls -R mount.dir mount.shared1 mount.shared2 2>&1 | ||
62 | |||
63 | umount mount.dir mount.shared1 mount.shared2 2>/dev/null | ||
64 | umount mount.dir mount.shared1 mount.shared2 2>/dev/null | ||
65 | umount mount.dir mount.shared1 mount.shared2 2>/dev/null | ||
66 | rm -f mount.dir/a mount.dir/b mount.dir/c | ||
67 | rmdir mount.dir mount.shared1 mount.shared2 | ||
68 | " \ | ||
69 | "\ | ||
70 | mount.dir: | ||
71 | a | ||
72 | b | ||
73 | |||
74 | mount.shared1: | ||
75 | a | ||
76 | b | ||
77 | |||
78 | mount.shared2: | ||
79 | a | ||
80 | b | ||
81 | " \ | ||
82 | "" "" | ||
83 | |||
47 | exit $FAILCOUNT | 84 | exit $FAILCOUNT |