test_10a() {
local before=$(date +%s)
local evict
+ local lru_param="ldlm.namespaces.*mdc*.lru_max_age"
+ local old_max_age=($($LCTL get_param -n $lru_param))
+ local old_ratelimit=$($LCTL get_param console_ratelimit)
+
+ $LCTL set_param $lru_param=3900s console_ratelimit=0
+ stack_trap "$LCTL set_param $lru_param=$old_max_age $old_ratelimit"
do_facet client "stat $DIR > /dev/null" ||
error "failed to stat $DIR: $?"
client_reconnect
evict=$(do_facet client $LCTL get_param mdc.$FSNAME-MDT*.state |
awk -F"[ [,]" '/EVICTED ]$/ { if (mx<$5) {mx=$5;} } END { print mx }')
- [ ! -z "$evict" ] && [[ $evict -gt $before ]] ||
+ [[ -n "$evict" ]] && (( $evict > $before )) ||
(do_facet client $LCTL get_param mdc.$FSNAME-MDT*.state;
error "no eviction: $evict before:$before")
do_facet client checkstat -v -p 0777 $DIR ||
error "client checkstat failed: $?"
+ # console messages may be ratelimited on later iterations
+ (( ONLY_REPEAT_ITER == 1 )) || return 0
+
# check that the thread watchdog is working properly
do_facet mds1 dmesg | tac | sed "/${TESTNAME/_/ }/,$ d" |
grep "[Ss]ervice thread pid .* was inactive" ||
local repeat_end_sec=$((SECONDS + ONLY_MINUTES * 60))
fi
- local testiter=1
+ export ONLY_REPEAT_ITER=1
while true; do
local before_sub=$SECONDS
if [[ -n "$append" ]]; then
[[ -n "$tdir" ]] && rm -rvf $DIR/$tdir*
[[ -n "$tfile" ]] && rm -vf $DIR/$tfile*
- echo "subtest iteration $testiter/$repeat " \
+ echo "subtest iteration $ONLY_REPEAT_ITER/$repeat " \
"($(((SECONDS-before)/60))/$ONLY_MINUTES min)"
fi
# loop around subshell so stack_trap EXIT triggers each time
# no repeat options were set, break after the first iteration
[[ -z "$repeat" && -z "$repeat_end_sec" ]] && break
# break if any repeat options were set and have been met
- [[ -n "$repeat" ]] && (( $testiter >= $repeat )) && break
+ [[ -n "$repeat" ]] && (( ONLY_REPEAT_ITER >= repeat )) && break
[[ -n "$repeat_end_sec" ]] &&
(( $SECONDS >= $repeat_end_sec )) && break
- ((testiter++))
+ ((ONLY_REPEAT_ITER++))
done
[[ $KPTR_ON_MOUNT ]] || kptr_restore