set -e
ONLY=${ONLY:-"$*"}
-# bug number for skipped test: 13297 2108 9789 3637 9789 3561 12622 12653 12653 5188 10764 16260
-ALWAYS_EXCEPT=" 27u 42a 42b 42c 42d 45 51d 65a 65e 68b 75 119d $SANITY_EXCEPT"
+# bug number for skipped test: 16823 13297 2108 9789 3637 9789 3561 12622 12653 12653 5188 10764 16260
+ALWAYS_EXCEPT=" 27s 27u 42a 42b 42c 42d 45 51d 65a 65e 68b 75 119d $SANITY_EXCEPT"
# bug number for skipped test: 2108 9789 3637 9789 3561 5188/5749 1443
#ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"27m 42a 42b 42c 42d 45 68 76"}
# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
test_27a() {
echo '== stripe sanity =============================================='
mkdir -p $DIR/d27 || error "mkdir failed"
+ $GETSTRIPE $DIR/d27
$SETSTRIPE $DIR/d27/f0 -c 1 || error "lstripe failed"
$CHECKSTAT -t file $DIR/d27/f0 || error "checkstat failed"
pass
# osc's keep a NOSPC stick flag that gets unset with rmdir
reset_enospc() {
- [ "$1" ] && FAIL_LOC=$1 || FAIL_LOC=0
+ local FAIL_LOC=${1:-0}
+ local OSTIDX=${2:-""}
+
mkdir -p $DIR/d27/nospc
rmdir $DIR/d27/nospc
- do_nodes $(comma_list $(osts_nodes)) lctl set_param fail_loc=$FAIL_LOC
+ local list=$(comma_list $(osts_nodes))
+ [ "$OSTIDX" ] && list=$(facet_host ost$((OSTIDX + 1)))
+
+ do_nodes $list lctl set_param fail_loc=$FAIL_LOC
}
exhaust_precreations() {
local MDSIDX=$(get_mds_dir "$DIR/d27")
echo OSTIDX=$OSTIDX MDSIDX=$MDSIDX
- local OST=$(lfs osts | grep ${OSTIDX}": " | awk '{print $2}' | sed -e 's/_UUID$//')
+ local OST=$(lfs osts | grep ${OSTIDX}": " | \
+ awk '{print $2}' | sed -e 's/_UUID$//')
local MDT_INDEX=$(lfs df | grep "\[MDT:$((MDSIDX - 1))\]" | awk '{print $1}' | \
sed -e 's/_UUID$//;s/^.*-//')
echo "Creating to objid $last_id on ost $OST..."
createmany -o $DIR/d27/${OST}-f $next_id $((last_id - next_id + 2))
do_facet mds${MDSIDX} lctl get_param osc.*${OST}-osc-${MDT_INDEX}.prealloc* | grep '[0-9]'
- reset_enospc $2
+ reset_enospc $2 $OSTIDX
}
exhaust_all_precreations() {
reset_enospc
rm -f $DIR/d27/f27n
+ $SETSTRIPE $DIR/d27 -c 1 -i -1
exhaust_precreations 0 0x80000215
touch $DIR/d27/f27n || error
run_test 27r "stripe file with some full OSTs (shouldn't LBUG) ="
test_27s() { # bug 10725
- mkdir -p $DIR/$tdir
- $LSTRIPE $DIR/$tdir $((2048 * 1024 * 1024)) -1 2 && \
- error "stripe width >= 2^32 succeeded" || true
+ mkdir -p $DIR/$tdir
+ local stripe_size=$((4096 * 1024 * 1024)) # 2^32
+ local stripe_count=0
+ [ $OSTCOUNT -eq 1 ] || stripe_count=2
+ $SETSTRIPE $DIR/$tdir -s $stripe_size -c $stripe_count && \
+ error "stripe width >= 2^32 succeeded" || true
+
}
run_test 27s "lsm_xfersize overflow (should error) (bug 10725)"
touch $DIR/$tdir/$tfile
#define OBD_FAIL_TGT_DELAY_PRECREATE 0x705
- lctl set_param fail_loc=0x705
- START=`date +%s`
- for F in `seq 1 32`; do
- touch $DIR/$tdir/$tfile.$F
+ # all except ost1
+ for (( i=0; i < OSTCOUNT; i++ )) ; do
+ do_facet ost$i lctl set_param fail_loc=0x705
done
- lctl set_param fail_loc=0
+ local START=`date +%s`
+ createmany -o $DIR/$tdir/$tfile 32
+
+ reset_enospc
- FINISH=`date +%s`
- TIMEOUT=`lctl get_param -n timeout`
+ local FINISH=`date +%s`
+ local TIMEOUT=`lctl get_param -n timeout`
[ $((FINISH - START)) -ge $((TIMEOUT / 2)) ] && \
error "$FINISH - $START >= $TIMEOUT / 2"
run_test 102c "non-root getfattr/setfattr for lustre.lov EAs ==========="
compare_stripe_info1() {
+ local stripe_index_all_zero=1
+
for num in 1 2 3 4
do
for count in `seq 1 $STRIPE_COUNT`
error "$file: different stripe count $stripe_count, expected $count" && return
fi
if [ $stripe_index -ne 0 ]; then
- error "$file: different stripe offset $stripe_index, expected 0" && return
+ stripe_index_all_zero=0
fi
done
done
done
+ [ $stripe_index_all_zero -eq 1 ] && error "all files are being extracted starting from OST index 0"
+ return 0
}
compare_stripe_info2() {
done
wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$POOL" ""\
|| error "Pool $FSNAME.$POOL cannot be drained"
+ # striping on an empty pool should fall back to "pool of everything"
+ $SETSTRIPE -p $POOL ${POOL_FILE}/$tfile || error "failed to create file with empty pool"
}
run_test 200h "Remove all targets from a pool =========================="