The "usleep" command is specific to RHEL, and is not available on
Ubuntu clients. Instead, "sleep" can be used with a fractional
second value to get the same effect more portably.
The "usleep" values are increased to be more reasonable lengths, as
a 100us sleep doesn't make sense after do_facet or other remote call
that may take seconds to complete. Also, in VM testing there may
be unpredictable delays, so it is better to be conservative.
Test-Parameters: trivial testlist=sanity-hsm,replay-single,replay-dual
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ic88c37d33ac17f46b9c1fb912112d318d9c3d07f
Reviewed-on: https://review.whamcloud.com/39889
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
do_facet client lctl set_param ldlm.namespaces.*.early_lock_cancel=0
do_facet client lctl set_param fail_loc=0x80000305 # drop cb, evict
cancel_lru_locks mdc
do_facet client lctl set_param ldlm.namespaces.*.early_lock_cancel=0
do_facet client lctl set_param fail_loc=0x80000305 # drop cb, evict
cancel_lru_locks mdc
- usleep 500 # wait to ensure first client is one that will be evicted
+ sleep 0.1 # wait to ensure first client is one that will be evicted
openfile -f O_RDONLY $MOUNT2/$tdir/$tfile
wait $OPENPID
do_facet client lctl set_param ldlm.namespaces.*.early_lock_cancel=1
openfile -f O_RDONLY $MOUNT2/$tdir/$tfile
wait $OPENPID
do_facet client lctl set_param ldlm.namespaces.*.early_lock_cancel=1
dd if=/dev/zero of=$DIR/$tfile bs=4k count=10000 &
while [ ! -e $DIR/$tfile ] ; do
dd if=/dev/zero of=$DIR/$tfile bs=4k count=10000 &
while [ ! -e $DIR/$tfile ] ; do
- usleep 60 # give dd a chance to start
+ sleep 0.01 # give dd a chance to start
done
$LFS getstripe $DIR/$tfile || error "$LFS getstripe $DIR/$tfile failed"
done
$LFS getstripe $DIR/$tfile || error "$LFS getstripe $DIR/$tfile failed"
local wait_timeout=200
local wait_start=$SECONDS
local wait_end=$((wait_start + wait_timeout))
local wait_timeout=200
local wait_start=$SECONDS
local wait_end=$((wait_start + wait_timeout))
- local sleep_time=100000 # 0.1 second
while ((SECONDS < wait_end)); do
if ! search_copytools $hosts; then
while ((SECONDS < wait_end)); do
if ! search_copytools $hosts; then
fi
echo "copytools still running on $hosts"
fi
echo "copytools still running on $hosts"
- usleep $sleep_time
- [ $sleep_time -lt 32000000 ] && # 3.2 seconds
- sleep_time=$(bc <<< "$sleep_time * 2")
+ sleep $sleep_time
+ [ $sleep_time -lt 5 ] && sleep_time=$((sleep_time + 1))
done
# try to dump Copytool's stack
done
# try to dump Copytool's stack
do_facet mds$index $LCTL set_param fail_loc=0x8000019a \
> /dev/null
do_facet mds$index $LCTL set_param fail_loc=0x8000019a \
> /dev/null
lctl clear
dd if=/dev/zero of=$DIR2/$tfile bs=$((4096+4))k conv=notrunc count=4 seek=3 &
DD2_PID=$!
lctl clear
dd if=/dev/zero of=$DIR2/$tfile bs=$((4096+4))k conv=notrunc count=4 seek=3 &
DD2_PID=$!
log "dd 1 started"
dd if=/dev/zero of=$DIR1/$tfile bs=$((16384-1024))k conv=notrunc count=1 seek=4 &
log "dd 1 started"
dd if=/dev/zero of=$DIR1/$tfile bs=$((16384-1024))k conv=notrunc count=1 seek=4 &