Skip to content
Snippets Groups Projects
Commit 4336d178 authored by Robert Read's avatar Robert Read
Browse files

b=2460

Add a test to recovery-small to trigger this bug. Also fix some
typos/brainos in recovery-small and test-framework, and set the debug
level to the default for local configs,
parent db62f9e7
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ MOUNT1=${MOUNT1:-$MOUNT}
MOUNT2=${MOUNT2:-"/mnt/lustre2"}
DIR=${DIR:-$MOUNT}
DIR2=${DIR2:-$MOUNT1}
PTLDEBUG=${PTLDEBUG:-0}
PTLDEBUG=${PTLDEBUG:-0x3f0400}
PDSH=${PDSH:-no_dsh}
MDSDEV=${MDSDEV:-$ROOT/tmp/mds-`hostname`}
......
......@@ -9,8 +9,6 @@ init_test_env $@
. ${CONFIG:=$LUSTRE/tests/cfg/local.sh}
. $LUSTRE/tests/test-framework.sh
build_test_filter
......@@ -135,6 +133,22 @@ test_10() {
do_facet client checkstat -v -p 0777 $MOUNT/f10 || return 3
do_facet client "munlink $MOUNT/f10"
}
run_test 10 "finish request after client eviction (bug 1521)"
run_test 10 "finish request on server after client eviction (bug 1521)"
#bug 2460
# wake up a thead waiting for completion after eviction
test_11(){
do_facet client multiop $MOUNT/$tfile Ow || return 1
do_facet client multiop $MOUNT/$tfile or || return 2
cancel_lru_locks OSC
do_facet client multiop $MOUNT/$tfile or || return 3
drop_bl_callback multiop $MOUNT/$tfile Ow ||
echo "client evicted, as expected"
do_facet client unlink $MOUNT/$tfile || return 4
}
run_test 11 "wake up a thead waiting for completion after eviction (b=2460)"
$CLEANUP
......@@ -2,6 +2,9 @@
set -e
export REFORMAT=""
export VERBOSE=false
# eg, assert_env LUSTRE MDSNODES OSTNODES CLIENTS
assert_env() {
local failed=""
......@@ -247,7 +250,7 @@ do_node() {
shift
if $VERBOSE; then
echo "CMD $HOST $@"
echo "CMD: $HOST $@"
fi
$PDSH $HOST "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests; cd $RPWD; sh -c \"$@\")"
}
......@@ -389,6 +392,15 @@ pause_bulk() {
return $RC
}
drop_ldlm_cancel() {
#define OBD_FAIL_LDLM_CANCEL 0x304
RC=0
do_facet client "echo 0x304 > /proc/sys/lustre/fail_loc"
do_facet client "$@" || RC=$?
do_facet client "echo 0 > /proc/sys/lustre/fail_loc"
return $RC
}
drop_bl_callback() {
#define OBD_FAIL_LDLM_BL_CALLBACK 0x305
RC=0
......@@ -398,6 +410,15 @@ drop_bl_callback() {
return $RC
}
cancel_lru_locks() {
for d in /proc/fs/lustre/ldlm/namespaces/$1*; do
if [ -f $d/lru_size ]; then
echo clear > $d/lru_size
grep [0-9] $d/lock_unused_count
fi
done
}
##################################
# Test interface
error() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment