set -e
PTLDEBUG=${PTLDEBUG:--1}
-LUSTRE=${LUSTRE:-`dirname $0`/..}
+LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
SETUP=${SETUP:-""}
CLEANUP=${CLEANUP:-""}
. $LUSTRE/tests/test-framework.sh
ostfailover_HOST=${ostfailover_HOST:-$ost_HOST}
#failover= must be defined in OST_MKFS_OPTIONS if ostfailover_HOST != ost_HOST
+remote_ost_nodsh && skip "remote OST with nodsh" && exit 0
+
# Tests that fail on uml
CPU=`awk '/model/ {print $4}' /proc/cpuinfo`
[ "$CPU" = "UML" ] && EXCEPT="$EXCEPT 6"
ALWAYS_EXCEPT="$REPLAY_OST_SINGLE_EXCEPT"
#
-[ "$SLOW" = "no" ] && EXCEPT_SLOW=""
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="5"
# It is replay-ost-single, after all
OSTCOUNT=1
build_test_filter
REFORMAT=--reformat cleanup_and_setup_lustre
+assert_DIR
rm -rf $DIR/[df][0-9]*
test_0a() {
run_test 0b "empty replay"
test_1() {
- date > $DIR/$tfile
+ date > $DIR/$tfile || error "error creating $DIR/$tfile"
fail ost1
$CHECKSTAT -t file $DIR/$tfile || return 1
rm -f $DIR/$tfile
test_2() {
for i in `seq 10`; do
- echo "tag-$i" > $DIR/$tfile-$i
+ echo "tag-$i" > $DIR/$tfile-$i || error "create $DIR/$tfile-$i"
done
fail ost1
for i in `seq 10`; do
- grep -q "tag-$i" $DIR/$tfile-$i || error "f2-$i"
+ grep -q "tag-$i" $DIR/$tfile-$i || error "grep $DIR/$tfile-$i"
done
rm -f $DIR/$tfile-*
}
run_test 4 "Fail OST during read, with verification"
test_5() {
- [ -z "`which iozone 2> /dev/null`" ] && log "iozone missing" && return
+ [ -z "`which iozone 2> /dev/null`" ] && skip "iozone missing" && return 0
FREE=`df -P $DIR | tail -n 1 | awk '{ print $4/2 }'`
GB=1048576 # 1048576KB == 1GB
if (( FREE > GB )); then
run_test 5 "Fail OST during iozone"
kbytesfree() {
- lctl get_param -n osc.*-osc-*.kbytesfree | awk '{total+=$1} END {print total}'
+ calc_osc_kbytes kbytesfree
}
test_6() {
+ remote_mds_nodsh && skip "remote MDS with nodsh" && return 0
+
f=$DIR/$tfile
rm -f $f
sync && sleep 2 && sync # wait for delete thread