From c2fda8642dc917e3a95f1a556b0876249a1bb321 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 14 Mar 2011 06:28:28 +0100 Subject: mount: add a test for bind+rshared Signed-off-by: Denys Vlasenko --- testsuite/mount.tests | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) (limited to 'testsuite') diff --git a/testsuite/mount.tests b/testsuite/mount.tests index d3d2400..58eeb2e 100755 --- a/testsuite/mount.tests +++ b/testsuite/mount.tests @@ -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 -- cgit v1.1