mirror of
https://github.com/sheumann/hush.git
synced 2024-08-20 04:28:57 +00:00
mount: add a test for bind+rshared
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
cf8b55c40b
commit
c2fda8642d
@ -20,7 +20,7 @@ if test x"$CONFIG_MKFS_MINIX" != x"y" \
|
||||
exit 0
|
||||
fi
|
||||
|
||||
testdir=$PWD/mount.testdir
|
||||
testdir="$PWD/mount.testdir"
|
||||
|
||||
dd if=/dev/zero of=mount.image1m count=1 bs=1M 2>/dev/null || { echo "dd error"; exit 1; }
|
||||
mkfs.minix -v mount.image1m >/dev/null 2>&1 || { echo "mkfs.minix error"; exit 1; }
|
||||
@ -44,4 +44,41 @@ umount -d "$testdir"
|
||||
rmdir "$testdir"
|
||||
rm mount.image1m
|
||||
|
||||
|
||||
# Bug: mount.shared1 directory shows no files (has to show files a and b)
|
||||
testing "mount bind+rshared" "\
|
||||
mkdir -p mount.dir mount.shared1 mount.shared2
|
||||
touch mount.dir/a mount.dir/b
|
||||
|
||||
mount --bind mount.shared1 mount.shared1 2>&1
|
||||
mount --make-rshared mount.shared1 2>&1
|
||||
mount --bind mount.shared2 mount.shared2 2>&1
|
||||
mount --make-rshared mount.shared2 2>&1
|
||||
|
||||
mount --bind mount.shared2 mount.shared1 2>&1
|
||||
mount --bind mount.dir mount.shared2 2>&1
|
||||
|
||||
ls -R mount.dir mount.shared1 mount.shared2 2>&1
|
||||
|
||||
umount mount.dir mount.shared1 mount.shared2 2>/dev/null
|
||||
umount mount.dir mount.shared1 mount.shared2 2>/dev/null
|
||||
umount mount.dir mount.shared1 mount.shared2 2>/dev/null
|
||||
rm -f mount.dir/a mount.dir/b mount.dir/c
|
||||
rmdir mount.dir mount.shared1 mount.shared2
|
||||
" \
|
||||
"\
|
||||
mount.dir:
|
||||
a
|
||||
b
|
||||
|
||||
mount.shared1:
|
||||
a
|
||||
b
|
||||
|
||||
mount.shared2:
|
||||
a
|
||||
b
|
||||
" \
|
||||
"" ""
|
||||
|
||||
exit $FAILCOUNT
|
||||
|
Loading…
Reference in New Issue
Block a user