From a6479a36772068a026e399eaeadd6a1393a51051 Mon Sep 17 00:00:00 2001 From: green Date: Mon, 3 May 2004 19:33:46 +0000 Subject: [PATCH] Updated to HEAD --- lustre/tests/replay-single.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index fbf8d19..76ce388 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -62,8 +62,7 @@ setup() { start ost2 --reformat $OSTLCONFARGS [ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE start mds $MDSLCONFARGS --reformat - zconf_mount `hostname` $MOUNT - echo 0x3f0410 > /proc/sys/portals/debug + grep " $MOUNT " /proc/mounts || zconf_mount `hostname` $MOUNT } $SETUP @@ -80,6 +79,15 @@ test_0() { } run_test 0 "empty replay" +test_0b() { + # this test attempts to trigger a race in the precreation code, + # and must run before any other objects are created on the filesystem + fail ost + createmany -o $DIR/$tfile 20 || return 1 + unlinkmany $DIR/$tfile 20 || return 2 +} +run_test 0b "ensure object created after recover exists. (3284)" + test_1() { replay_barrier mds mcreate $DIR/$tfile @@ -825,14 +833,14 @@ run_test 41 "read from a valid osc while other oscs are invalid" # test MDS recovery after ost failure test_42() { - blocks=`df $MOUNT | tail -1 | awk '{ print $1 }'` + blocks=`df $MOUNT | tail -n 1 | awk '{ print $1 }'` createmany -o $DIR/$tfile-%d 800 replay_barrier ost unlinkmany $DIR/$tfile-%d 0 400 facet_failover ost # osc is evicted, fs is smaller - blocks_after=`df $MOUNT | tail -1 | awk '{ print $1 }'` + blocks_after=`df $MOUNT | tail -n 1 | awk '{ print $1 }'` [ $blocks_after -lt $blocks ] || return 1 echo wait for MDS to timeout and recover sleep $((TIMEOUT * 2)) -- 1.8.3.1