Newer
Older
echo "server went back in time!"
return 5
fi
return 0
}
run_test 48 "Don't lose transno when client is evicted (2525)"
createmany -o $DIR/$tfile-%d 400 || return 1
unlinkmany $DIR/$tfile-%d 0 400 || return 2
$CHECKSTAT -t file $DIR/$tfile-* && return 3 || true
}
run_test 49 "re-write records to llog as written during fail"
test_50() {
local osc_dev=`$LCTL device_list | \
$LCTL --device %$osc_dev recover && $LCTL --device %$osc_dev recover
# give the mds_lov_sync threads a chance to run
sleep 5
}
run_test 50 "Double OSC recovery, don't LASSERT (3812)"
# bug 3462 - simultaneous MDC requests
test_51a() {
mkdir -p $DIR/${tdir}-1
mkdir -p $DIR/${tdir}-2
touch $DIR/${tdir}-2/f
multiop $DIR/${tdir}-1/f O_c &
pid=$!
# give multiop a chance to open
sleep 1
$CHECKSTAT -t file $DIR/${tdir}-2/f || return 1
wait $pid || return 2
$CHECKSTAT -t file $DIR/${tdir}-1/f || return 3
rm -rf $DIR/${tdir}-*
}
run_test 51a "|X| close request while two MDC requests in flight"
test_51b() {
mkdir -p $DIR/$tdir-1
mkdir -p $DIR/$tdir-2
multiop $DIR/$tdir-1/f O_c &
pid=$!
# 1 second seems to be not enough, we met already such a cases
# --umka
sleep 5
kill -USR1 $pid
wait $pid || return 1
$CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
$CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
rm -rf $DIR/${tdir}-*
}
run_test 51b "|X| open request while two MDC requests in flight"
test_51c() {
mkdir -p $DIR/${tdir}-1
mkdir -p $DIR/${tdir}-2
multiop $DIR/${tdir}-1/f O_c &
pid=$!
# give multiop a chance to open
sleep 1
wait $pid || return 1
$CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
$CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
rm -rf $DIR/${tdir}-*
}
run_test 51c "|X| open request and close request while two MDC requests in flight"
test_51d() {
mkdir -p $DIR/${tdir}-1
mkdir -p $DIR/${tdir}-2
touch $DIR/${tdir}-2/f
multiop $DIR/${tdir}-1/f O_c &
pid=$!
# give multiop a chance to open
sleep 1
#$CHECKSTAT -t file $DIR/${tdir}-2/f || return 1
wait $pid || return 2
$CHECKSTAT -t file $DIR/${tdir}-1/f || return 3
rm -rf $DIR/${tdir}-*
}
run_test 51d "|X| close reply while two MDC requests in flight"
test_51e() {
mkdir -p $DIR/$tdir-1
mkdir -p $DIR/$tdir-2
multiop $DIR/$tdir-1/f O_c &
pid=$!
# give multiop a chance to open
sleep 1
kill -USR1 $pid
wait $pid || return 1
$CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
$CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
rm -rf $DIR/${tdir}-*
}
run_test 51e "|X| open reply while two MDC requests in flight"
test_51f() {
mkdir -p $DIR/${tdir}-1
mkdir -p $DIR/${tdir}-2
multiop $DIR/${tdir}-1/f O_c &
pid=$!
# give multiop a chance to open
sleep 1
wait $pid || return 1
$CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
$CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
rm -rf $DIR/${tdir}-*
}
run_test 51f "|X| open reply and close reply while two MDC requests in flight"
test_51g() {
mkdir -p $DIR/${tdir}-1
mkdir -p $DIR/${tdir}-2
multiop $DIR/${tdir}-1/f O_c &
pid=$!
# give multiop a chance to open
sleep 1
wait $pid || return 1
$CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
$CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
rm -rf $DIR/${tdir}-*
}
run_test 51g "|X| open reply and close request while two MDC requests in flight"
test_51h() {
mkdir -p $DIR/${tdir}-1
mkdir -p $DIR/${tdir}-2
multiop $DIR/${tdir}-1/f O_c &
pid=$!
wait $pid || return 1
$CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
$CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
rm -rf $DIR/${tdir}-*
}
run_test 51h "|X| open request and close reply while two MDC requests in flight"
# b3764 timed out lock replay
test_52() {
touch $DIR/$tfile
cancel_lru_locks MDC
multiop $DIR/$tfile s
replay_barrier $SINGLEMDS
do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x8000030c"
fail $SINGLEMDS
do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x0"
$CHECKSTAT -t file $DIR/$tfile-* && return 3 || true
}
run_test 52 "time out lock replay (3764)"
f1=$DIR/${tfile}-1
cat <<EOF > $f1
#!/bin/sh
true
EOF
chmod +x $f1
rm -f $f1
}
run_test 53 "|X| open request and close reply while two MDC requests in flight"
test_54() {
createmany -o $DIR/$tfile 20
unlinkmany $DIR/$tfile 20
}
run_test 54 "|X| open request and close reply while two MDC requests in flight"
#b3440 ASSERTION(rec->ur_fid2->id) failed
test_55() {
sysctl -w portals.debug=-1 portals.debug_mb=25
ln -s foo $DIR/$tfile
sleep 10
}
run_test 55 "don't replay a symlink open request (3440)"
#b3761 ASSERTION(hash != 0) failed
test_56() {
# OBD_FAIL_MDS_OPEN_CREATE | OBD_FAIL_ONCE
touch $DIR/$tfile
pid=$!
# give a chance for touch to run
sleep 5
wait $pid || return 1
rm $DIR/$tfile
return 0
}
run_test 56 "let MDS_CHECK_RESENT return the original return code instead of 0"
#b7312 LASSERT(!IS_ERR(parent)) in reconstruct_open()
test_57() {
mkdir $DIR/$tdir || return 1
touch $DIR/$tdir/$tfile || return 2
multiop $DIR/$tdir/$tfile o_ &
MULTIPID=$!
sleep 1
rm -f $DIR/$tdir/$tfile || return 3
rm -rf $DIR/$tdir || return 4
# drop first reint reply
sysctl -w lustre.fail_loc=0x0000030c
facet_failover $SINGLEMDS
df $MOUNT || return 1
kill -USR1 $MULTIPID || return 5
wait $MULTIPID || return 6
sysctl -w lustre.fail_loc=0
}
run_test 57 "open orphan in reconstruct_open()"
test_58() {
capa=`cat /proc/fs/lustre/mds/mds*/capa`
if [ "$capa" == "0" ]; then
echo "skip testing - no capa enabled"
return 0
fi
sysctl -w lustre.fail_loc=0x0000030c
rc=multiop $DIR/$tfile Ow
sysctl -w lustre.fail_loc=0
return rc
}
run_test 58 "open+create resent should return capa"
equals_msg test complete, cleaning up