[svn-r19739] Purpose:
Adjust flush/refresh tests to allow more time
for completion, and fix a bug that caused a
race condition between the test script and a
process it invokes.
Description:
Flush/refresh testing slows down considerably
with multiple (other) processes running in the
background, such as the case when -j option is
supplied to gmake when running the test suite.
I've extended the amount of time before the test
times out due to not receiving a signal, and
modified the script so that the timer now resets
after receiving a signal so it is not a cumulative
timer for the entire test, but rather only per
verification process that the script needs to spawn.
Additionally, I changed the way the test script
detected that a signal from a process was ready by
changing detection from 'file exists' to 'non-empty
file exists'.
This test may need to undergo further tweaking once
we get a feeling for how well it currently runs in
a number of different scenarios, particularly with
regards to how the script and the processes it spawns
communicate with each other.
Tested:
amani, using 'gmake -j 8 check'.
h5committest
This commit is contained in:
@@ -54,7 +54,7 @@ pid_main=$!
|
||||
# =================================================
|
||||
startsignal=flushrefresh_VERIFICATION_START
|
||||
endsignal=flushrefresh_VERIFICATION_DONE
|
||||
timeout_length=100
|
||||
timeout_length=300
|
||||
timedout=0
|
||||
verification_done=0
|
||||
|
||||
@@ -62,12 +62,11 @@ verification_done=0
|
||||
# Run flush verification on test program.
|
||||
# =======================================
|
||||
|
||||
# start timer
|
||||
before=`date +%s`
|
||||
until [ $verification_done -eq 1 ]; do
|
||||
|
||||
# Wait for signal from test program that verification routine can run.
|
||||
until [ -f $startsignal ]; do
|
||||
before=`date +%s`
|
||||
until [ -s $startsignal ]; do
|
||||
after=`date +%s`
|
||||
timediff=`expr $after - $before`
|
||||
if [ $timediff -gt $timeout_length ]; then
|
||||
@@ -103,12 +102,11 @@ done
|
||||
# Run refresh verification on test program.
|
||||
# =========================================
|
||||
if [ $timedout -eq 0 ]; then
|
||||
# start timer
|
||||
before=`date +%s`
|
||||
until [ $verification_done -eq 2 ]; do
|
||||
|
||||
# Wait for signal from test program that verification routine can run.
|
||||
until [ -f $startsignal ]; do
|
||||
before=`date +%s`
|
||||
until [ -s $startsignal ]; do
|
||||
after=`date +%s`
|
||||
timediff=`expr $after - $before`
|
||||
if [ $timediff -gt $timeout_length ]; then
|
||||
|
||||
Reference in New Issue
Block a user