From 31fa9abc019c8fea4753456e65a2381ec3d4aeab Mon Sep 17 00:00:00 2001 From: pschwan Date: Thu, 24 Apr 2003 05:02:46 +0000 Subject: [PATCH] - convert all kmem_cache_alloc/PORTAL_SLAB_ALLOC to OBD_SLAB_ALLOC - POISON is sometimes a no-op, so use memset() for unused handle.addr - in target_handle_reconnect, only compare "cookie", not the whole handle - a cleanup here, a cleanup there, while I hunted for the corruption --- lustre/tests/sanity-ldlm.sh | 61 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 lustre/tests/sanity-ldlm.sh diff --git a/lustre/tests/sanity-ldlm.sh b/lustre/tests/sanity-ldlm.sh new file mode 100644 index 0000000..891957b --- /dev/null +++ b/lustre/tests/sanity-ldlm.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +set -e + +SRCDIR=`dirname $0` +PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH + +MOUNT=${MOUNT:-/mnt/lustre} +DIR=${DIR:-$MOUNT} +export NAME=$NAME +clean() { + echo -n "cln.." + sh llmountcleanup.sh > /dev/null || exit 20 +} +CLEAN=${CLEAN:-clean} +start() { + echo -n "mnt.." + sh llrmount.sh > /dev/null || exit 10 + echo "done" +} +START=${START:-start} + +log() { + echo "$*" + lctl mark "$*" || /bin/true +} + +pass() { + echo PASS +} + +mount | grep $MOUNT || sh llmount.sh + +log '== drop ldlm request ================= test 1' +echo 0x302 > /proc/sys/lustre/fail_loc +echo 3 > /proc/sys/lustre/timeout +touch $DIR/f & +sleep 5 +echo 0 > /proc/sys/lustre/fail_loc +lctl --device 6 recover +pass +$CLEAN +$START + +log '== drop ldlm reply ================= test 2' +echo 0x213 > /proc/sys/lustre/fail_loc +echo 3 > /proc/sys/lustre/timeout +touch $DIR/f +pass +$CLEAN +$START + +log '== drop reply after completion ================= test 3' +touch $DIR/f +stat $DIR/f +echo 0x213 > /proc/sys/lustre/fail_loc +echo 0x5 > /proc/sys/lustre/timeout +echo foo >> $DIR/f +pass +$CLEAN +$START -- 1.8.3.1