test_17() {
# With adaptive timeouts, bulk_get won't expire until adaptive_timeout_max
- OST_AT_MAX=$(do_facet ost1 "cat /sys/module/ptlrpc/at_max")
- do_facet ost1 "echo $TIMEOUT >> /sys/module/ptlrpc/at_max"
+ local at_max=$(do_facet ost1 "find /sys/ -name at_max")
+ [ -z "$at_max" ] && skip "missing /sys/.../at_max" && return 0
+ OST_AT_MAX=$(do_facet ost1 "cat $at_max")
+ do_facet ost1 "echo $TIMEOUT >> $at_max"
# OBD_FAIL_PTLRPC_BULK_GET_NET 0x0503 | OBD_FAIL_ONCE
# OST bulk will time out here, client retries
# expect cmp to succeed, client resent bulk
do_facet client "cmp $SAMPLE_FILE $DIR/$tfile" || return 3
do_facet client "rm $DIR/$tfile" || return 4
- do_facet ost1 "echo $OST_AT_MAX >> /sys/module/ptlrpc/at_max"
+ do_facet ost1 "echo $OST_AT_MAX >> $at_max"
return 0
}
run_test 17 "timeout bulk get, don't evict client (2732)"
mdcdev=`awk '/-mdc-/ {print $1}' $LPROC/devices`
[ "$mdcdev" ] || exit 2
# adaptive timeouts slow this way down
- MDS_AT_MAX=$(do_facet mds "cat /sys/module/ptlrpc/at_max")
- do_facet mds "echo 40 >> /sys/module/ptlrpc/at_max"
+ local at_max=$(do_facet mds "find /sys/ -name at_max")
+ [ -z "$at_max" ] && skip "missing /sys/.../at_max" && return 0
+ MDS_AT_MAX=$(do_facet mds "cat $at_max")
+ do_facet mds "echo 40 >> $at_max"
for i in `seq 1 10`; do
echo "$i of 10 ($(date +%s))"
do_facet mds "grep service $LPROC/mdt/MDS/mds/timeouts"
df $MOUNT
done
do_facet mds "sysctl -w lustre.fail_loc=0"
- do_facet mds "echo $MDS_AT_MAX >> /sys/module/ptlrpc/at_max"
+ do_facet mds "echo $MDS_AT_MAX >> $at_max"
return 0
}
run_test 44 "race in target handle connect"
at_start() #bug 3055
{
if [ -z "$ATOLDBASE" ]; then
- ATOLDBASE=$(do_facet mds "cat /sys/module/ptlrpc/at_history")
+ local at_history=$(do_facet mds "find /sys/ -name at_history")
+ [ -z "$at_history" ] && skip "missing /sys/.../at_history " && return 1
+ ATOLDBASE=$(do_facet mds "cat $at_history")
# speed up the timebase so we can check decreasing AT
- do_facet mds "echo 8 >> /sys/module/ptlrpc/at_history"
- do_facet ost1 "echo 8 >> /sys/module/ptlrpc/at_history"
+ do_facet mds "echo 8 >> $at_history"
+ do_facet ost1 "echo 8 >> $at_history"
fi
}
test_65a() #bug 3055
{
- at_start
+ at_start || return 0
$LCTL dk > /dev/null
debugsave
sysctl -w lnet.debug="+other"
test_65b() #bug 3055
{
- at_start
+ at_start || return 0
# turn on D_ADAPTTO
debugsave
sysctl -w lnet.debug="+other"
test_66a() #bug 3055
{
- at_start
+ at_start || return 0
grep "portal 12" $LPROC/mdc/${FSNAME}-MDT0000-mdc-*/timeouts
# adjust 5s at a time so no early reply is sent (within deadline)
do_facet mds "sysctl -w lustre.fail_val=5000"
test_66b() #bug 3055
{
- at_start
+ at_start || return 0
ORIG=$(awk '/network/ {print $4}' $LPROC/mdc/lustre-*/timeouts)
sysctl -w lustre.fail_val=$(($ORIG + 5))
#define OBD_FAIL_PTLRPC_PAUSE_REP 0x50c
test_67a() #bug 3055
{
- at_start
+ at_start || return 0
CONN1=$(awk '/_connect/ {total+=$2} END {print total}' $LPROC/osc/*/stats)
# sleeping threads may drive values above this
do_facet ost1 "sysctl -w lustre.fail_val=400"
test_67b() #bug 3055
{
- at_start
+ at_start || return 0
CONN1=$(awk '/_connect/ {total+=$2} END {print total}' $LPROC/osc/*/stats)
#define OBD_FAIL_OST_PAUSE_CREATE 0x223
do_facet ost1 "sysctl -w lustre.fail_val=20000"
test_68 () #bug 13813
{
- at_start
- local ENQ_MIN=$(cat /sys/module/ptlrpc/ldlm_enqueue_min)
- echo $TIMEOUT >> /sys/module/ptlrpc/ldlm_enqueue_min
+ at_start || return 0
+ local ldlm_enqueue_min=$(find /sys -name ldlm_enqueue_min)
+ [ -z "$ldlm_enqueue_min" ] && skip "missing /sys/.../ldlm_enqueue_min" && return 0
+ local ENQ_MIN=$(cat $ldlm_enqueue_min)
+ echo $TIMEOUT >> $ldlm_enqueue_min
rm -f $DIR/${tfile}_[1-2]
lfs setstripe $DIR/$tfile --index=0 --count=1
#define OBD_FAIL_LDLM_PAUSE_CANCEL 0x312
sysctl -w lustre.fail_loc=0x80000312
cp /etc/profile $DIR/${tfile}_2 || error "2nd cp failed $?"
sysctl -w lustre.fail_loc=0
- echo $ENQ_MIN >> /sys/module/ptlrpc/ldlm_enqueue_min
+ echo $ENQ_MIN >> $ldlm_enqueue_min
return 0
}
run_test 68 "AT: verify slowing locks"
if [ -n "$ATOLDBASE" ]; then
- do_facet mds "echo $ATOLDBASE >> /sys/module/ptlrpc/at_history"
- do_facet ost1 "echo $ATOLDBASE >> /sys/module/ptlrpc/at_history"
+ at_history=$(do_facet mds "find /sys/ -name at_history")
+ do_facet mds "echo $ATOLDBASE >> $at_history" || true
+ do_facet ost1 "echo $ATOLDBASE >> $at_history" || true
fi
# end of AT tests includes above lines