hdf5/tools/h5diff/testph5diff.sh
Leon Arber 2183c5971a [svn-r9956] Purpose:
Fixed numerous ph5diff bugs.

Description:
Fixed manager output printing
Fixed out of order output printing
Fixed test script execution problem
Temporary fix for large amounts of output overflowing buffer.

Solution:
The manager task buffers its output.  However, since the manager task
never gets a print token, this output was lost.  Solution: new function called
print_manager_output that prints buffered output is called in places where the
manager buffers its output.

printf was apparently buffering output.  This means that a task would sometimes
print even after it had given up its print token.  Added fflush() call after
printf() calls, which seems to have fixed the problem.

calling rsh multiple times in succession seems to overwhelm something in Linux,
as it begins to refuse new connections until the old ones reset.  Since each
call to mpirun in the test script starts up 4 rsh sessions, the test script
eventually is unable to run any further tests.  Solution: Added a short delay in the
testscript between successive calls to mpirun to allow old connections to reset.

The 10k output buffer was of insufficient size to hold the large amounts of
output generated by some of the tests.  Since code to buffer to a file has not
been implemented yet, a temporary fix was to increase the size of the output
buffer to 50k.

Platforms tested:
heping

Misc. update:
2005-02-08 00:42:49 -05:00

64 lines
2.0 KiB
Bash
Executable File

#! /bin/sh
##
## Copyright by the Board of Trustees of the University of Illinois.
## All rights reserved.
##
## This file is part of HDF5. The full HDF5 copyright notice, including
## terms governing use, modification, and redistribution, is contained in
## the files COPYING and Copyright.html. COPYING can be found at the root
## of the source code distribution tree; Copyright.html can be found at the
## root level of an installed copy of the electronic HDF5 document set and
## is linked from the top-level documents page. It can also be found at
## http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have
## access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
##
# The build (current) directory might be different than the source directory.
if test -z "$srcdir"; then
srcdir=.
fi
TOOL=${srcdir}/testh5diff.sh
nerrors=0
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Testing".
#
TESTING() {
SPACES=" "
echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Run a test. If a test fails then increment the `nerrors' global variable.
#
TOOLTEST() {
# Run test.
echo $TOOL "$@"
/bin/sh $TOOL "$@"
# Check if the command failed and increment nerrors if so.
if test $? -ne 0 ; then
nerrors="`expr $nerrors + 1`"
fi
}
##############################################################################
##############################################################################
### T H E T E S T S ###
##############################################################################
##############################################################################
# testphdf5 test using the MPI-POSIX VFL driver
TOOLTEST -p
# Emit message about testing status
if test $nerrors -eq 0 ; then
echo "All $TEST_APP tests passed."
else
echo "ERROR! One or more $TOOL tests failed."
fi
# Propagate a useful exit code
exit $nerrors