summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-01-28 13:11:38 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-01-28 13:11:38 (GMT)
commit3360c3af0c100ac4d3a2fe2865f34661da862ec5 (patch)
tree9caf7dba62679504aa39ec02ebb72d8b8b5a848d /fortran/test
parent5b4d3279099e7e4fad6e0092c77aa93dfd35d616 (diff)
downloadhdf5-3360c3af0c100ac4d3a2fe2865f34661da862ec5.zip
hdf5-3360c3af0c100ac4d3a2fe2865f34661da862ec5.tar.gz
hdf5-3360c3af0c100ac4d3a2fe2865f34661da862ec5.tar.bz2
[svn-r18175] Description:
Bring r17986:18172 from trunk to revise_chunks branch. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/Makefile.in8
-rw-r--r--fortran/test/t.c37
-rw-r--r--fortran/test/tH5G_1_8.f9028
3 files changed, 35 insertions, 38 deletions
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index 7d5009a..f586adb 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -366,12 +366,12 @@ CP = cp
# Some machines need a command to run executables; this is that command
# so that our tests will run.
-# We use RUNTESTS instead of RUNSERIAL directly because it may be that
+# We use RUNEXEC instead of RUNSERIAL directly because it may be that
# some tests need to be run with a different command. Older versions
# of the makefiles used the command
# $(LIBTOOL) --mode=execute
# in some directories, for instance.
-RUNTESTS = $(RUNSERIAL)
+RUNEXEC = $(RUNSERIAL)
# Libraries to link to while building
LIBHDF5 = $(top_builddir)/src/libhdf5.la
@@ -960,7 +960,7 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
fi; \
echo "============================" >> $${log}; \
srcdir="$(srcdir)" \
- $(TIME) $(RUNTESTS) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
&& touch $(@:.chkexe_=.chkexe) || \
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
(cat $${log} && false) || exit 1; \
@@ -1031,7 +1031,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
$(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
- RUNTESTS="$(RUNPARALLEL)" || exit 1; \
+ RUNEXEC="$(RUNPARALLEL)" || exit 1; \
fi; \
done
@for test in $(TEST_SCRIPT_PARA) dummy; do \
diff --git a/fortran/test/t.c b/fortran/test/t.c
index 861a3e7..f2203d0 100644
--- a/fortran/test/t.c
+++ b/fortran/test/t.c
@@ -14,6 +14,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "t.h"
+#include "H5Eprivate.h"
/*----------------------------------------------------------------------------
* Name: h5_fixname_c
@@ -31,35 +32,31 @@
int_f
nh5_fixname_c(_fcd base_name, size_t_f *base_namelen, hid_t_f* fapl, _fcd full_name, size_t_f *full_namelen)
{
- int ret_value = -1;
- char *c_base_name;
- char *c_full_name;
- hid_t c_fapl;
+ char *c_base_name = NULL;
+ char *c_full_name = NULL;
+ int_f ret_value = 0;
/*
- * Define ifile access property list
- */
- c_fapl = (hid_t)*fapl;
- /*
* Convert FORTRAN name to C name
*/
- c_base_name = (char *)HD5f2cstring(base_name, (size_t)*base_namelen);
- if (c_base_name == NULL) goto DONE;
- c_full_name = (char *) HDmalloc((size_t)*full_namelen + 1);
- if (c_full_name == NULL) goto DONE;
+ if(NULL == (c_base_name = (char *)HD5f2cstring(base_name, (size_t)*base_namelen)))
+ HGOTO_DONE(FAIL)
+ if(NULL == (c_full_name = (char *)HDmalloc((size_t)*full_namelen + 1)))
+ HGOTO_DONE(FAIL)
/*
* Call h5_fixname function.
*/
- if (NULL != h5_fixname(c_base_name, c_fapl, c_full_name, (size_t)*full_namelen + 1)) {
- HD5packFstring(c_full_name, _fcdtocp(full_name), (size_t)*full_namelen);
- ret_value = 0;
- goto DONE;
- }
+ if(NULL == h5_fixname(c_base_name, (hid_t)*fapl, c_full_name, (size_t)*full_namelen + 1))
+ HGOTO_DONE(FAIL)
+ HD5packFstring(c_full_name, _fcdtocp(full_name), (size_t)*full_namelen);
+
+done:
+ if(c_base_name)
+ HDfree(c_base_name);
+ if(c_full_name)
+ HDfree(c_full_name);
-DONE:
- if (NULL != c_base_name) HDfree(c_base_name);
- if (NULL != c_full_name) HDfree(c_full_name);
return ret_value;
}
diff --git a/fortran/test/tH5G_1_8.f90 b/fortran/test/tH5G_1_8.f90
index 9c28f75..725e21b 100644
--- a/fortran/test/tH5G_1_8.f90
+++ b/fortran/test/tH5G_1_8.f90
@@ -646,10 +646,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error)
INTEGER :: corder ! Specifies the link’s creation order position.
LOGICAL :: f_corder_valid ! Indicates whether the value in corder is valid.
INTEGER :: link_type ! Specifies the link class:
- ! H5L_LINK_HARD_F - Hard link
- ! H5L_LINK_SOFT_F - Soft link
- ! H5L_LINK_EXTERNAL_F - External link
- ! H5L_LINK_ERROR _F - Error
+ ! H5L_TYPE_HARD_F - Hard link
+ ! H5L_TYPE_SOFT_F - Soft link
+ ! H5L_TYPE_EXTERNAL_F - External link
+ ! H5L_TYPE_ERROR _F - Error
INTEGER(HADDR_T) :: address ! If the link is a hard link, address specifies the file address that the link points to
INTEGER(SIZE_T) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value
@@ -689,7 +689,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error)
! CALL VerifyLogical("H5Lget_info_by_idx_f11", f_corder_valid, .TRUE., total_error)
- CALL VERIFY("H5Lget_info_by_idx_f", H5L_LINK_SOFT_F, link_type, total_error)
+ CALL VERIFY("H5Lget_info_by_idx_f", H5L_TYPE_SOFT_F, link_type, total_error)
CALL VERIFY("H5Lget_info_by_idx_f", cset, H5T_CSET_ASCII_F, total_error)
! should be '/d1' + NULL character = 4
CALL VERIFY("H5Lget_info_by_idx_f", INT(val_size), 4, total_error)
@@ -753,10 +753,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error)
INTEGER :: corder ! Specifies the link’s creation order position.
LOGICAL :: f_corder_valid ! Indicates whether the value in corder is valid.
INTEGER :: link_type ! Specifies the link class:
- ! H5L_LINK_HARD_F - Hard link
- ! H5L_LINK_SOFT_F - Soft link
- ! H5L_LINK_EXTERNAL_F - External link
- ! H5L_LINK_ERROR _F - Error
+ ! H5L_TYPE_HARD_F - Hard link
+ ! H5L_TYPE_SOFT_F - Soft link
+ ! H5L_TYPE_EXTERNAL_F - External link
+ ! H5L_TYPE_ERROR _F - Error
INTEGER(HADDR_T) :: address ! If the link is a hard link, address specifies the file address that the link points to
INTEGER(SIZE_T) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value
@@ -1318,7 +1318,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error)
CALL VerifyLogical("H5Lget_info_by_idx_f", f_corder_valid, .TRUE., total_error)
- CALL VERIFY("H5Lget_info_by_idx_f", H5L_LINK_HARD_F, link_type, total_error)
+ CALL VERIFY("H5Lget_info_by_idx_f", H5L_TYPE_HARD_F, link_type, total_error)
IF(iorder.EQ.H5_ITER_INC_F)THEN
CALL VERIFY("H5Lget_info_by_idx_f", corder, u+1, total_error)
ELSE
@@ -1511,10 +1511,10 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
INTEGER :: corder ! Specifies the link’s creation order position.
LOGICAL :: f_corder_valid ! Indicates whether the value in corder is valid.
INTEGER :: link_type ! Specifies the link class:
- ! H5L_LINK_HARD_F - Hard link
- ! H5L_LINK_SOFT_F - Soft link
- ! H5L_LINK_EXTERNAL_F - External link
- ! H5L_LINK_ERROR _F - Error
+ ! H5L_TYPE_HARD_F - Hard link
+ ! H5L_TYPE_SOFT_F - Soft link
+ ! H5L_TYPE_EXTERNAL_F - External link
+ ! H5L_TYPE_ERROR _F - Error
INTEGER(HADDR_T) :: address ! If the link is a hard link, address specifies the file address that the link points to
INTEGER(SIZE_T) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value