From cc954928c229df741b481b20620dfc29b5d86f33 Mon Sep 17 00:00:00 2001 From: pschwan Date: Thu, 18 Jul 2002 17:15:52 +0000 Subject: [PATCH] a small coherence test with 2 mountpoints --- lustre/tests/intent-test2.sh | 70 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 lustre/tests/intent-test2.sh diff --git a/lustre/tests/intent-test2.sh b/lustre/tests/intent-test2.sh new file mode 100644 index 0000000..428039c --- /dev/null +++ b/lustre/tests/intent-test2.sh @@ -0,0 +1,70 @@ +#!/bin/bash + +SRCDIR="`dirname $0`" +. $SRCDIR/common.sh + +setup_opts "$@" + +set -vx + +MTPT1=/mnt/lustre1 +MTPT2=/mnt/lustre2 + +remount() { + umount $MTPT1 || exit -1 + umount $MTPT2 || exit -1 + debugctl clear + setup_mount || fail "cannot remount /mnt/lustre" +} + +fail() { + echo "unexpected failure" + exit -1 +} + +[ "`mount | grep $MTPT1`" ] || . llsetup.sh "$@" || exit -1 + +mkdir $MTPT1/dir1 || fail +echo "Next mkdir should fail" +mkdir $MTPT2/dir1 && fail +mkdir $MTPT2/dir2 || fail +echo "Next mkdirs should fail" +mkdir $MTPT1/dir2 && fail + +remount + +echo "Next 2 mkdir should fail" +mkdir $MTPT2/dir1 && fail +mkdir $MTPT1/dir2 && fail + +./mcreate $MTPT2/file1 +echo "Next mcreate should fail" +./mcreate $MTPT2/file1 && fail +./mcreate $MTPT2/file2 || fail +echo "Next mcreate should fail" +./mcreate $MTPT1/file2 && fail + +remount + +echo "Next 2 mcreates should fail" +./mcreate $MTPT2/file1 && fail +./mcreate $MTPT1/file2 && fail + +rmdir $MTPT1/dir2 || fail +echo "Next rmdir should fail" +rmdir $MTPT2/dir2 && fail +rmdir $MTPT2/dir1 || fail + +remount + +echo "Next rpmdir should fail" + +echo "File I/O: you should see increasing sequences of contiguous numbers" +echo 1 >> $MTPT1/file1 +cat $MTPT2/file1 +echo 2 >> $MTPT2/file1 +cat $MTPT1/file1 +echo 3 >> $MTPT2/file1 +cat $MTPT1/file1 +echo 4 >> $MTPT1/file1 +cat $MTPT1/file1 -- 1.8.3.1