mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-07 16:37:56 +08:00
Fix datatype lookup in named datatype flush/refresh code and detect more core dumps in test scripts (#193)
* Detect coredumps, and avoid printing a warning when creating a directory that already exists * Retrieve the actual datatype object correctly, in the face of possible pass-through VOL connectors * Detect more core dumps, and tiny formatting cleanup * Revert error status checks for mirror VFD test script
This commit is contained in:
parent
068136351c
commit
3f37f6648d
@ -1333,7 +1333,7 @@ H5T_save_refresh_state(hid_t tid, H5O_shared_t *cached_H5O_shared)
|
||||
|
||||
if (NULL == (dt = (H5T_t *)H5I_object_verify(tid, H5I_DATATYPE)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid is not a datatype ID")
|
||||
vol_dt = (H5T_t *)(dt->vol_obj->data);
|
||||
vol_dt = H5T_get_actual_type(dt);
|
||||
if (NULL == vol_dt)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid is not not a named datatype ID")
|
||||
|
||||
@ -1373,7 +1373,7 @@ H5T_restore_refresh_state(hid_t tid, H5O_shared_t *cached_H5O_shared)
|
||||
|
||||
if (NULL == (dt = (H5T_t *)H5I_object_verify(tid, H5I_DATATYPE)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid not a datatype ID")
|
||||
vol_dt = (H5T_t *)(dt->vol_obj->data);
|
||||
vol_dt = H5T_get_actual_type(dt);
|
||||
if (NULL == vol_dt)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid is not not a named datatype ID")
|
||||
|
||||
|
@ -64,6 +64,12 @@ TEST() {
|
||||
# Skip the plugin for testing missing filter.
|
||||
$ENVCMD $RUNSERIAL $TEST_ERR_BIN
|
||||
) >$actual 2>$actual_err
|
||||
|
||||
# Check for core dump
|
||||
if [ $? != 0 ]; then
|
||||
nerrors=`expr $nerrors + 1`
|
||||
fi
|
||||
|
||||
# Extract file name, line number, version and thread IDs because they may be different
|
||||
sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \
|
||||
-e 's/line [0-9]*/line (number)/' \
|
||||
|
@ -34,9 +34,9 @@ ENVCMD="env HDF5_EXTFILE_PREFIX=\${ORIGIN}" # The environment variable & valu
|
||||
$ENVCMD $RUNSERIAL $TEST_BIN
|
||||
exitcode=$?
|
||||
if [ $exitcode -eq 0 ]; then
|
||||
echo "Test prefix for HDF5_EXTFILE_PREFIX PASSED"
|
||||
else
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
echo "***Error encountered for HDF5_EXTFILE_PREFIX test***"
|
||||
echo "Test prefix for HDF5_EXTFILE_PREFIX PASSED"
|
||||
else
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
echo "***Error encountered for HDF5_EXTFILE_PREFIX test***"
|
||||
fi
|
||||
exit $nerrors
|
||||
|
@ -82,7 +82,7 @@ fi
|
||||
# different, occasionally the wrong file is deleted, interrupting the flow of
|
||||
# the test. Running each of these tests in its own directory should eliminate
|
||||
# the problem.
|
||||
mkdir flushrefresh_test
|
||||
mkdir -p flushrefresh_test
|
||||
cp flushrefresh flushrefresh_test
|
||||
|
||||
# With the --disable-shared option, flushrefresh is built in the test directory,
|
||||
@ -90,7 +90,7 @@ cp flushrefresh flushrefresh_test
|
||||
# the test directory. test/flushrefresh should always be copied,
|
||||
# .libs/flushrefresh should be copied only if it exists.
|
||||
if [ -f .libs/flushrefresh ]; then
|
||||
mkdir flushrefresh_test/.libs
|
||||
mkdir -p flushrefresh_test/.libs
|
||||
for FILE in .libs/flushrefresh*; do
|
||||
case "$FILE" in
|
||||
*.o) continue ;; ## don't copy the .o files
|
||||
@ -156,6 +156,12 @@ until [ $verification_done -eq 1 ]; do
|
||||
echo "all flush verification complete" > $endsignal
|
||||
else
|
||||
./flushrefresh $param1 $param2
|
||||
|
||||
# Check for core dump
|
||||
if [ $? -gt 0 ]; then
|
||||
nerrors=`expr $nerrors + 1`
|
||||
fi
|
||||
|
||||
echo "verification flush process done" > $endsignal
|
||||
fi
|
||||
|
||||
@ -195,6 +201,12 @@ if [ $timedout -eq 0 ]; then
|
||||
echo "all refresh verification complete" > $endsignal
|
||||
else
|
||||
./flushrefresh $param1
|
||||
|
||||
# Check for core dump
|
||||
if [ $? -gt 0 ]; then
|
||||
nerrors=`expr $nerrors + 1`
|
||||
fi
|
||||
|
||||
echo "refresh verifiction process done" > $endsignal
|
||||
fi
|
||||
|
||||
|
@ -34,8 +34,8 @@ echo "$ENVCMD $RUNSERIAL $TEST_BIN"
|
||||
$ENVCMD $RUNSERIAL $TEST_BIN
|
||||
exitcode=$?
|
||||
if [ $exitcode -eq 0 ]; then
|
||||
echo "Test for HDF5_EXT_PREFIX PASSED"
|
||||
else
|
||||
echo "Test for HDF5_EXT_PREFIX PASSED"
|
||||
else
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
echo "***Error encountered for HDF5_EXT_PREFIX test***"
|
||||
fi
|
||||
|
@ -35,8 +35,8 @@ UNENVCMD="unset HDF5_VDS_PREFIX" # Unset the environment variable
|
||||
$ENVCMD $RUNSERIAL $TEST_BIN
|
||||
exitcode=$?
|
||||
if [ $exitcode -eq 0 ]; then
|
||||
echo "Test prefix for HDF5_VDS_PREFIX PASSED"
|
||||
else
|
||||
echo "Test prefix for HDF5_VDS_PREFIX PASSED"
|
||||
else
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
echo "***Error encountered for HDF5_VDS_PREFIX test***"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user