diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2009-07-23 08:27:31 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2009-07-23 08:27:31 (GMT) |
commit | 0d41b14350829b8b48799ce494125eab0db96099 (patch) | |
tree | 4f50bae1f12343d34992b1247011d120e587019a /test | |
parent | be4c660148eab2cebbadee134d6afda8df64e092 (diff) | |
download | hdf5-0d41b14350829b8b48799ce494125eab0db96099.zip hdf5-0d41b14350829b8b48799ce494125eab0db96099.tar.gz hdf5-0d41b14350829b8b48799ce494125eab0db96099.tar.bz2 |
[svn-r17225] Added code to detect the exit code of each of the writer and readers processes
and set nerrors accordingly. It still has a bunch of debug statements which
will be cleaned out in the next round.
Tested:
Jam.
Diffstat (limited to 'test')
-rwxr-xr-x | test/testswmr.sh | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/test/testswmr.sh b/test/testswmr.sh index 445b82e..ef8ad78 100755 --- a/test/testswmr.sh +++ b/test/testswmr.sh @@ -56,19 +56,42 @@ TESTING() { ./swmr_generator echo launch the swmr_writer ./swmr_writer $Nrecords & +pid_write=$! + # launch readers n=0 echo launch $Nreaders swmr_readers while [ $n -lt $Nreaders ]; do ./swmr_reader $Nsecs & + pid_readers="$pid_readers $!" n=`expr $n + 1` done -wait +echo pid_write=$pid_write +echo pid_readers=$pid_readers +ps + +# collect exit code of the readers. +for xpid in $pid_readers; do + echo checked reader $xpid + wait $xpid + if test $? -ne 0; then + echo reader had error + nerrors=`expr $nerrors + 1` + fi +done +# collect exit code of the writer +echo checked write $pid_writer +wait $pid_writer +if test $? -ne 0; then + echo writer had error + nerrors=`expr $nerrors + 1` +fi # ############################################################################## # # END # ############################################################################## +echo nerrors=$nerrors if test $nerrors -eq 0 ; then echo "SWMR tests passed." fi |