# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
# bug number for SLOW test:
-# 40 (min)"
+# time in minutes: 40"
[ "$SLOW" = "no" ] && EXCEPT_SLOW="5"
if [ $(facet_fstype $SINGLEMDS) = "zfs" ]; then
-# bug number for slowed tests: LU-2887
- # 32 12.5 (min)"
- [ "$SLOW" = "no" ] && EXCEPT_SLOW="$EXCEPT_SLOW 8a 8b"
+# bug number for slow tests: LU-2887
+# time in minutes: 32 12.5"
+ [ "$SLOW" = "no" ] && EXCEPT_SLOW+=" 8a 8b"
+ if [ $MDSCOUNT -gt 1 ]; then
+# bug number for skipped test:
+ ALWAYS_EXCEPT+=""
+ fi
fi
build_test_filter
TDIR=$DIR/d0.${TESTSUITE}
mkdir -p $TDIR
-$SETSTRIPE $TDIR -i 0 -c 1
-$GETSTRIPE $TDIR
+$LFS setstripe $TDIR -i 0 -c 1
+$LFS getstripe $TDIR
test_0a() {
zconf_umount $(hostname) $MOUNT -f
if (( size > GB )); then
size=$GB
fi
- local iozone_opts="-i 0 -i 1 -i 2 -+d -r 4 -s $size -f $TDIR/$tfile"
+ # no random I/O (-i 2) as it's very slow with ZFS
+ local iozone_opts="-i 0 -i 1 -+d -r 4 -s $size -f $TDIR/$tfile"
iozone_bg $iozone_opts &
local pid=$!
local before=$(kbytesfree)
dd if=/dev/urandom bs=4096 count=1280 of=$f || error "dd failed"
- $GETSTRIPE $f || error "$GETSTRIPE $f failed"
+ $LFS getstripe $f || error "$LFS getstripe $f failed"
local stripe_index=$(lfs getstripe -i $f)
sync
test_9() {
[ $(lustre_version_code ost1) -ge $(version_code 2.6.54) ] ||
{ skip "Need OST version at least 2.6.54"; return; }
- $SETSTRIPE -i 0 -c 1 $DIR/$tfile || error "setstripe failed"
+ $LFS setstripe -i 0 -c 1 $DIR/$tfile || error "setstripe failed"
# LU-1573 - Add duplicate write to generate grants
dd if=/dev/zero of=$DIR/$tfile count=1 bs=1M > /dev/null ||
}
run_test 10 "conflicting PW & PR locks on a client"
+test_12() {
+ [ $FAILURE_MODE != "HARD" ] &&
+ skip "Test needs FAILURE_MODE HARD" && return 0
+ remote_ost || { skip "need remote OST" && return 0; }
+
+ local tmp=$TMP/$tdir
+ local dir=$DIR/$tdir
+ declare -a pids
+
+
+ mkdir -p $tmp || error "can't create $tmp"
+ mkdir -p $dir || error "can't create $dir"
+
+ $LFS setstripe -c 1 -i 0 $dir
+
+ for i in `seq 1 10`; do mkdir $dir/d$i; done
+
+ #define OBD_FAIL_OST_DELAY_TRANS 0x245
+ do_facet ost1 "$LCTL set_param fail_loc=0x245" ||
+ error "can't set fail_loc"
+
+ for i in `seq 1 10`;
+ do
+ createmany -o $dir/d$i/$(openssl rand -base64 12) 500 &
+ pids+=($!)
+ done
+ echo "Waiting createmany pids"
+ wait ${pids[@]}
+
+ ls -lR $dir > $tmp/ls_r_out 2>&1&
+ local ls_pid=$!
+
+ facet_failover ost1
+
+ echo "starting wait for ls -l"
+ wait $ls_pid
+ grep "?\|No such file or directory" $tmp/ls_r_out &&
+ error "Found file without object on OST"
+ rm -rf $tmp
+ rm -rf $dir
+}
+run_test 12 "check stat after OST failover"
+
complete $SECONDS
check_and_cleanup_lustre
exit_status