summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2017-08-01 11:12:03 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2017-08-01 11:12:03 (GMT)
commitfd0d8738e07c602c1871a5052b4fe836c37b8d64 (patch)
treee4bbe74c8732b589e92085af502a990cf7316d8c
parent274f71be174c431be6e94b1d4f4c100ff090e749 (diff)
parent823f6a133302f1d6ba904020ad092723d2657d02 (diff)
downloadhdf5-fd0d8738e07c602c1871a5052b4fe836c37b8d64.zip
hdf5-fd0d8738e07c602c1871a5052b4fe836c37b8d64.tar.gz
hdf5-fd0d8738e07c602c1871a5052b4fe836c37b8d64.tar.bz2
Merge branch 'develop' into h5pl_commit
-rw-r--r--MANIFEST1
-rw-r--r--config/cmake_ext_mod/HDFLibMacros.cmake10
-rw-r--r--configure.ac40
-rw-r--r--fortran/examples/Makefile.am4
-rw-r--r--fortran/src/h5fc.in2
-rw-r--r--release_docs/RELEASE.txt9
-rw-r--r--src/H5Fprivate.h4
-rw-r--r--src/H5MF.c2
-rw-r--r--src/H5MFsection.c34
-rw-r--r--src/H5Pfcpl.c3
-rw-r--r--test/fheap.c16
-rw-r--r--test/plugin.c9
-rw-r--r--test/tfile.c17
-rw-r--r--tools/lib/h5diff.c2
-rw-r--r--tools/lib/h5diff_array.c20
-rw-r--r--tools/lib/h5tools.c6
-rw-r--r--tools/lib/h5tools_dump.c6
-rw-r--r--tools/lib/h5tools_ref.c2
-rw-r--r--tools/lib/h5tools_str.c8
-rw-r--r--tools/lib/h5tools_utils.c10
-rw-r--r--tools/lib/io_timer.c7
-rw-r--r--tools/lib/ph5diff.h4
-rw-r--r--tools/src/h5copy/h5copy.c2
-rw-r--r--tools/src/h5diff/h5diff_common.c2
-rw-r--r--tools/src/h5diff/h5diff_main.c3
-rw-r--r--tools/src/h5diff/ph5diff_main.c3
-rw-r--r--tools/src/h5dump/h5dump.c2
-rw-r--r--tools/src/h5dump/h5dump_ddl.c2
-rw-r--r--tools/src/h5dump/h5dump_xml.c2
-rw-r--r--tools/src/h5repack/h5repack.c4
-rw-r--r--tools/src/h5stat/h5stat.c2
-rw-r--r--tools/src/misc/h5mkgrp.c2
-rw-r--r--tools/src/misc/h5repart.c34
-rw-r--r--tools/test/h5copy/h5copygentest.c1
-rw-r--r--tools/test/h5diff/CMakeTests.cmake11
-rw-r--r--tools/test/h5diff/testfiles/h5diff_vlstr.txt16
-rw-r--r--tools/test/h5diff/testh5diff.sh.in5
-rw-r--r--tools/test/h5dump/h5dumpgentest.c1
-rw-r--r--tools/test/h5import/h5importtest.c1
-rw-r--r--tools/test/h5jam/h5jamgentest.c2
-rw-r--r--tools/test/h5jam/tellub.c6
-rw-r--r--tools/test/h5repack/testh5repack_detect_szip.c1
-rw-r--r--tools/test/misc/repart_test.c95
-rw-r--r--tools/test/misc/talign.c3
-rw-r--r--tools/test/perform/CMakeTests.cmake1
45 files changed, 214 insertions, 203 deletions
diff --git a/MANIFEST b/MANIFEST
index 739db4a..c7729e8 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2401,6 +2401,7 @@
./tools/test/h5diff/testfiles/h5diff_udfail.txt
./tools/test/h5diff/testfiles/diff_strings1.h5
./tools/test/h5diff/testfiles/diff_strings2.h5
+./tools/test/h5diff/testfiles/h5diff_vlstr.txt
#vds
./tools/test/h5diff/testfiles/h5diff_v1.txt
./tools/test/h5diff/testfiles/h5diff_v2.txt
diff --git a/config/cmake_ext_mod/HDFLibMacros.cmake b/config/cmake_ext_mod/HDFLibMacros.cmake
index f2e03d7..54e408b 100644
--- a/config/cmake_ext_mod/HDFLibMacros.cmake
+++ b/config/cmake_ext_mod/HDFLibMacros.cmake
@@ -74,14 +74,14 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
HDF_IMPORT_SET_LIB_OPTIONS (jpeg-static "jpeg" STATIC "")
add_dependencies (JPEG jpeg-static)
set (JPEG_STATIC_LIBRARY "jpeg-static")
- set (JPEG_LIBRARIES ${JPEG_static_LIBRARY})
+ set (JPEG_LIBRARIES ${JPEG_STATIC_LIBRARY})
if (BUILD_SHARED_LIBS)
# Create imported target jpeg-shared
add_library(jpeg-shared SHARED IMPORTED)
HDF_IMPORT_SET_LIB_OPTIONS (jpeg-shared "jpeg" SHARED "")
add_dependencies (JPEG jpeg-shared)
set (JPEG_SHARED_LIBRARY "jpeg-shared")
- set (JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_shared_LIBRARY})
+ set (JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_SHARED_LIBRARY})
endif ()
set (JPEG_INCLUDE_DIR_GEN "${BINARY_DIR}")
@@ -167,14 +167,14 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
HDF_IMPORT_SET_LIB_OPTIONS (szip-static "szip" STATIC "")
add_dependencies (SZIP szip-static)
set (SZIP_STATIC_LIBRARY "szip-static")
- set (SZIP_LIBRARIES ${SZIP_static_LIBRARY})
+ set (SZIP_LIBRARIES ${SZIP_STATIC_LIBRARY})
if (BUILD_SHARED_LIBS)
# Create imported target szip-shared
add_library(szip-shared SHARED IMPORTED)
HDF_IMPORT_SET_LIB_OPTIONS (szip-shared "szip" SHARED "")
add_dependencies (SZIP szip-shared)
set (SZIP_SHARED_LIBRARY "szip-shared")
- set (SZIP_LIBRARIES ${SZIP_LIBRARIES} ${SZIP_shared_LIBRARY})
+ set (SZIP_LIBRARIES ${SZIP_LIBRARIES} ${SZIP_SHARED_LIBRARY})
endif ()
set (SZIP_INCLUDE_DIR_GEN "${BINARY_DIR}")
@@ -262,7 +262,7 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
HDF_IMPORT_SET_LIB_OPTIONS (zlib-static ${ZLIB_LIB_NAME} STATIC "")
add_dependencies (ZLIB zlib-static)
set (ZLIB_STATIC_LIBRARY "zlib-static")
- set (ZLIB_LIBRARIES ${ZLIB_static_LIBRARY})
+ set (ZLIB_LIBRARIES ${ZLIB_STATIC_LIBRARY})
if (BUILD_SHARED_LIBS)
# Create imported target zlib-shared
add_library(zlib-shared SHARED IMPORTED)
diff --git a/configure.ac b/configure.ac
index 163f6d3..47f5897 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3338,6 +3338,28 @@ else
STATIC_SHARED="none"
fi
+if test "X$HDF_FORTRAN" = "Xyes"; then
+
+ ### libtool does not pass the correct argument linking (-WL,-WL,,) for the NAG Fortran compiler
+ ### on Linux (other OSs have not been tested).
+ ### Therefore, detect if we are using the NAG Fortran compiler, and replace the wl="-Wl," for Fortran to
+ ### wl="-Wl,-WL,," in the libtool file. (HDFFV-10037)
+ case "`uname`" in
+ Linux*)
+
+ fortran_linux_linker_option="-Wl,"
+
+ if (grep -i 'NAG_Fortran' libtool > /dev/null); then
+ fortran_linux_linker_option="-Wl,-Wl,,"
+ fi
+
+ ## Set the correct linker option for use in h5fc.in markup
+ AC_SUBST([fortran_linux_linker_option])
+ ;;
+ esac
+
+fi
+
## ----------------------------------------------------------------------
## Set a macro if shared library is enabled.
##
@@ -3473,6 +3495,10 @@ AC_CONFIG_COMMANDS([.classes], [], [$MKDIR_P java/src/.classes;
AC_OUTPUT
chmod 755 tools/src/misc/h5cc
+if test "X$HDF_CXX" = "Xyes"; then
+ chmod 755 c++/src/h5c++
+fi
+
if test "X$HDF_FORTRAN" = "Xyes"; then
chmod 755 fortran/src/h5fc
@@ -3484,10 +3510,18 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
cat libtool | awk '/wl=\"/{c++;if(c==3){sub("wl=\"\"","wl=\"-Wl,\"");c=0}}1' > libtool.tmp && mv -f libtool.tmp libtool && chmod 755 libtool
;;
esac
-fi
-if test "X$HDF_CXX" = "Xyes"; then
- chmod 755 c++/src/h5c++
+ ### libtool does not pass the correct argument linking (-WL,-WL,,) for the NAG Fortran compiler
+ ### on Linux (other OSs have not been tested).
+ ### Therefore, detect if we are using the NAG Fortran compiler, and replace the wl="-Wl," for Fortran to
+ ### wl="-Wl,-WL,," in the libtool file. (HDFFV-10037)
+ case "`uname`" in
+ Linux*)
+ if (grep -i 'NAG_Fortran' libtool > /dev/null); then
+ cat libtool | awk '/NAG_Fortran/{flag=1}flag&&/wl=/{$NF="wl=\"-Wl,Wl,,\"";flag=0}1' > libtool.tmp && mv -f libtool.tmp libtool && chmod 755 libtool
+ fi
+ ;;
+ esac
fi
## HDF5 configure code created by autotools with gcc 4.9.2 is adding problematic
diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am
index db85c09..6bf2edb 100644
--- a/fortran/examples/Makefile.am
+++ b/fortran/examples/Makefile.am
@@ -66,10 +66,10 @@ h5_crtatt.chkexe_: h5_rdwt.chkexe_
# Additional dependencies for the examples are listed below
if BUILD_PARALLEL_CONDITIONAL
$(EXTRA_PROG): $(H5FC_PP)
- $(H5FC_PP) $(H5CCFLAGS) $(FCFLAGS) -o $@ $(srcdir)/$@.f90;
+ $(H5FC_PP) $(H5CCFLAGS) -o $@ $(srcdir)/$@.f90;
else
$(EXTRA_PROG): $(H5FC)
- $(H5FC) $(H5CCFLAGS) $(FCFLAGS) -o $@ $(srcdir)/$@.f90;
+ $(H5FC) $(H5CCFLAGS) -o $@ $(srcdir)/$@.f90;
endif
# Tell automake how to install examples
diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in
index 47642c9..29ef83f 100644
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -307,7 +307,7 @@ if test "x$do_link" = "xyes"; then
link_args="$link_args -L${libdir}"
case "$host_os" in
- linux*) flag="-Wl,-rpath -Wl," ;;
+ linux*) flag="@fortran_linux_linker_option@-rpath -Wl," ;;
hpux*) flag="-Wl,+b -Wl," ;;
freebsd*|solaris*) flag="-R" ;;
rs6000*|aix*) flag="-L" ;;
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 7eb70e1..cd29900 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -147,6 +147,15 @@ Bug Fixes since HDF5-1.10.1 release
Tools
-----
+ - h5diff
+
+ h5diff segfaulted on compare of a NULL variable length string.
+
+ Improved h5diff compare of strings by adding a check for
+ NULL strings and setting the lengths to zero.
+
+ (ADB - 2017/07/25, HDFFV-10246)
+
- h5import
h5import crashed trying to import data from a subset of a dataset.
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 6f68a62..eba48de 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -549,9 +549,11 @@
#define H5F_FILE_SPACE_PAGE_SIZE_DEF 4096
/* For paged aggregation: minimum value for file space page size */
#define H5F_FILE_SPACE_PAGE_SIZE_MIN 512
+/* For paged aggregation: maxiumum value for file space page size: 1 gigabyte */
+#define H5F_FILE_SPACE_PAGE_SIZE_MAX 1024*1024*1024
/* For paged aggregation: drop free-space with size <= this threshold for small meta section */
-#define H5F_FILE_SPACE_PGEND_META_THRES 10
+#define H5F_FILE_SPACE_PGEND_META_THRES 0
/* Default for threshold for alignment (can be set via H5Pset_alignment()) */
#define H5F_ALIGN_DEF 1
diff --git a/src/H5MF.c b/src/H5MF.c
index e54d809..d7af56a 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -1519,7 +1519,7 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, haddr_t addr,
H5AC_ring_t fsm_ring = H5AC_RING_INV; /* Ring of fsm */
H5F_mem_page_t fs_type; /* Free space type */
hbool_t reset_ring = FALSE; /* Whether the ring was set */
- htri_t ret_value = FAIL; /* Return value */
+ htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
diff --git a/src/H5MFsection.c b/src/H5MFsection.c
index 02fc2d9..02e3218 100644
--- a/src/H5MFsection.c
+++ b/src/H5MFsection.c
@@ -130,27 +130,27 @@ H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SIMPLE[1] = {{
/* Class info for "small" free space sections */
H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SMALL[1] = {{
/* Class variables */
- H5MF_FSPACE_SECT_SMALL, /* Section type */
- 0, /* Extra serialized size */
- H5FS_CLS_MERGE_SYM | H5FS_CLS_ADJUST_OK, /* Class flags */
- NULL, /* Class private info */
+ H5MF_FSPACE_SECT_SMALL, /* Section type */
+ 0, /* Extra serialized size */
+ H5FS_CLS_MERGE_SYM | H5FS_CLS_ADJUST_OK, /* Class flags */
+ NULL, /* Class private info */
/* Class methods */
- NULL, /* Initialize section class */
- NULL, /* Terminate section class */
+ NULL, /* Initialize section class */
+ NULL, /* Terminate section class */
/* Object methods */
- H5MF_sect_small_add, /* Add section */
- NULL, /* Serialize section */
+ H5MF_sect_small_add, /* Add section */
+ NULL, /* Serialize section */
H5MF_sect_deserialize, /* Deserialize section */
- H5MF_sect_small_can_merge, /* Can sections merge? */
- H5MF_sect_small_merge, /* Merge sections */
- H5MF_sect_small_can_shrink, /* Can section shrink container?*/
- H5MF_sect_small_shrink, /* Shrink container w/section */
- H5MF_sect_free, /* Free section */
- H5MF_sect_valid, /* Check validity of section */
- H5MF_sect_split, /* Split section node for alignment */
- NULL, /* Dump debugging for section */
+ H5MF_sect_small_can_merge, /* Can sections merge? */
+ H5MF_sect_small_merge, /* Merge sections */
+ NULL, /* Can section shrink container?*/
+ NULL, /* Shrink container w/section */
+ H5MF_sect_free, /* Free section */
+ H5MF_sect_valid, /* Check validity of section */
+ H5MF_sect_split, /* Split section node for alignment */
+ NULL, /* Dump debugging for section */
}};
/* Class info for "large" free space sections */
@@ -674,7 +674,7 @@ HDfprintf(stderr, "%s: Entering, section {%a, %Hu}\n", FUNC, (*sect)->sect_info.
HDfprintf(stderr, "%s: section is dropped\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
- /* Adjust the section if it is not at page end but its size + pgend threshold is at page end */
+ /* Adjust the section if it is not at page end but its size + prem is at page end */
else
if(prem <= H5F_PGEND_META_THRES(udata->f)) {
(*sect)->sect_info.size += prem;
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index 5383aae..6b0d2c0 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -1472,6 +1472,9 @@ H5Pset_file_space_page_size(hid_t plist_id, hsize_t fsp_size)
if(fsp_size < H5F_FILE_SPACE_PAGE_SIZE_MIN)
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "cannot set file space page size to less than 512")
+ if(fsp_size > H5F_FILE_SPACE_PAGE_SIZE_MAX)
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "cannot set file space page size to more than 1GB")
+
/* Set the value*/
if(H5P_set(plist, H5F_CRT_FILE_SPACE_PAGE_SIZE_NAME, &fsp_size) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set file space page size")
diff --git a/test/fheap.c b/test/fheap.c
index 4be6cb9..6c3a8ac 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -16377,6 +16377,16 @@ main(void)
unsigned nerrors = 0; /* Cumulative error count */
unsigned num_pb_fs = 1; /* The number of settings to test for page buffering and file space handling */
int ExpressMode; /* Express testing level */
+ const char *envval; /* Environment variable */
+ hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */
+
+ /* Don't run this test using certain file drivers */
+ envval = HDgetenv("HDF5_DRIVER");
+ if(envval == NULL)
+ envval = "nomatch";
+
+ /* Current VFD that does not support contigous address space */
+ contig_addr_vfd = (hbool_t)(HDstrcmp(envval, "split") && HDstrcmp(envval, "multi"));
/* Reset library */
h5_reset();
@@ -16428,6 +16438,12 @@ main(void)
shared_wobj_g[u] = (unsigned char)u;
for(v = 0; v < num_pb_fs; v++) {
+ /* Skip test when:
+ a) multi/split drivers and
+ b) persisting free-space or using paged aggregation strategy
+ because the library will fail file creation (temporary) for the above conditions */
+ if(!contig_addr_vfd && v)
+ break;
if((fcpl = H5Pcopy(def_fcpl)) < 0)
TEST_ERROR
diff --git a/test/plugin.c b/test/plugin.c
index f536a9e..bcd7348 100644
--- a/test/plugin.c
+++ b/test/plugin.c
@@ -737,6 +737,15 @@ test_path_api_calls(void)
*/
n_starting_paths = 42;
+ /* Check that initialization is correct */
+ TESTING(" initialize");
+
+ if(H5PLsize(&n_paths) < 0)
+ TEST_ERROR
+ if(n_paths != 2)
+ TEST_ERROR
+
+ PASSED();
/****************/
/* H5PLremove() */
diff --git a/test/tfile.c b/test/tfile.c
index 533bb24..027ad62 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -109,6 +109,7 @@
#define TEST_THRESHOLD10 10 /* Free space section threshold */
#define FSP_SIZE_DEF 4096 /* File space page size default */
#define FSP_SIZE512 512 /* File space page size */
+#define FSP_SIZE1G 1024*1024*1024 /* File space page size */
/* Declaration for test_libver_macros2() */
#define FILE6 "tfile6.h5" /* Test file */
@@ -3581,6 +3582,9 @@ test_filespace_info(const char *env_h5_drvr)
* Setting value less than 512 will return an error;
* --setting file space page size to 0
* --setting file space page size to 511
+ *
+ * File space page size has a maximum size of 1 gigabyte.
+ * Setting value greater than 1 gigabyte will return an error.
*/
/* Create file creation property list template */
fcpl = H5Pcreate(H5P_FILE_CREATE);
@@ -3598,6 +3602,12 @@ test_filespace_info(const char *env_h5_drvr)
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Pset_file_space_page_size");
+ /* Setting to 1GB+1: should fail */
+ H5E_BEGIN_TRY {
+ ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE1G+1);
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Pset_file_space_page_size");
+
/* Setting to 512: should succeed */
ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE512);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3605,6 +3615,13 @@ test_filespace_info(const char *env_h5_drvr)
CHECK(ret, FAIL, "H5Pget_file_space_page_size");
VERIFY(fsp_size, FSP_SIZE512, "H5Pget_file_space_page_size");
+ /* Setting to 1GB: should succeed */
+ ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE1G);
+ CHECK(ret, FAIL, "H5Pset_file_space_page_size");
+ ret = H5Pget_file_space_page_size(fcpl, &fsp_size);
+ CHECK(ret, FAIL, "H5Pget_file_space_page_size");
+ VERIFY(fsp_size, FSP_SIZE1G, "H5Pget_file_space_page_size");
+
/* Close property list */
H5Pclose(fcpl);
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index afb36d9..9da5b6b 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -11,8 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdlib.h>
-
#include "H5private.h"
#include "h5tools.h"
#include "h5tools_utils.h"
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 0b1a96e..7236ad1 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -673,21 +673,33 @@ static hsize_t diff_datum(void *_mem1,
h5difftrace("diff_datum H5T_STRING variable\n");
/* Get pointer to first string */
s1 = *(char**) mem1;
- size1 = HDstrlen(s1);
+ if(s1)
+ size1 = HDstrlen(s1);
+ else
+ size1 = 0;
/* Get pointer to second string */
s2 = *(char**) mem2;
- size2 = HDstrlen(s2);
+ if(s2)
+ size2 = HDstrlen(s2);
+ else
+ size2 = 0;
}
else if (H5T_STR_NULLTERM == pad) {
h5difftrace("diff_datum H5T_STRING null term\n");
/* Get pointer to first string */
s1 = (char*) mem1;
- size1 = HDstrlen(s1);
+ if(s1)
+ size1 = HDstrlen(s1);
+ else
+ size1 = 0;
if (size1 > size_mtype)
size1 = size_mtype;
/* Get pointer to second string */
s2 = (char*) mem2;
- size2 = HDstrlen(s2);
+ if(s2)
+ size2 = HDstrlen(s2);
+ else
+ size2 = 0;
if (size2 > size_mtype)
size2 = size_mtype;
}
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 3729cac..5031e44 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -12,16 +12,10 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
- * Thursday, July 23, 1998
- *
* Purpose: A library for displaying the values of a dataset in a human
* readable format.
*/
-#include <stdio.h>
-#include <stdlib.h>
-
#include "h5tools.h"
#include "h5tools_dump.h"
#include "h5tools_ref.h"
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 1a57512..fb79b77 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -12,16 +12,10 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
- * Thursday, July 23, 1998
- *
* Purpose: A library for displaying the values of a dataset in a human
* readable format.
*/
-#include <stdio.h>
-#include <stdlib.h>
-
#include "h5tools.h"
#include "h5tools_dump.h"
#include "h5tools_ref.h"
diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c
index 85850e3..e000080 100644
--- a/tools/lib/h5tools_ref.c
+++ b/tools/lib/h5tools_ref.c
@@ -11,8 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdio.h>
-#include <stdlib.h>
#include "h5tools_ref.h"
#include "H5private.h"
#include "H5SLprivate.h"
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index fa15785..a66cfe5 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -12,16 +12,8 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Bill Wendling <wendling@ncsa.uiuc.edu>
- * Monday, 19. February 2001
- *
* Purpose: These are string functions for us to use and abuse.
*/
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
#include "H5private.h"
#include "h5tools.h" /* for h5tool_format_t structure */
#include "h5tools_ref.h"
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index c361e25..08213df 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -12,20 +12,10 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Bill Wendling <wendling@ncsa.uiuc.edu>
- * Tuesday, 6. March 2001
- */
-
-/*
* Portions of this work are derived from _Obfuscated C and Other Mysteries_,
* by Don Libes, copyright (c) 1993 by John Wiley & Sons, Inc.
*/
-#include <ctype.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-
#include "h5tools.h"
#include "h5tools_utils.h"
#include "H5private.h"
diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c
index e3318e9..a6885df 100644
--- a/tools/lib/io_timer.c
+++ b/tools/lib/io_timer.c
@@ -22,16 +22,9 @@
* This is a module of useful timing functions for performance testing.
*/
-#include <stdio.h>
-#include <stdlib.h>
-
#include "H5private.h"
#include "hdf5.h"
-#ifdef H5_HAVE_PARALLEL
-#include <mpi.h>
-#endif
-
#include "io_timer.h"
/*
diff --git a/tools/lib/ph5diff.h b/tools/lib/ph5diff.h
index 9628d45..996a611 100644
--- a/tools/lib/ph5diff.h
+++ b/tools/lib/ph5diff.h
@@ -42,9 +42,5 @@ struct diffs_found
int not_cmp;
};
-#ifdef H5_HAVE_PARALLEL
-#include <mpi.h>
-#endif
-
#endif /* _PH5DIFF_H__ */
diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c
index 390b93e..3f91fce 100644
--- a/tools/src/h5copy/h5copy.c
+++ b/tools/src/h5copy/h5copy.c
@@ -14,8 +14,6 @@
#include "H5private.h"
#include "h5tools.h"
#include "h5tools_utils.h"
-#include <string.h>
-#include <stdlib.h>
/* Name of tool */
#define PROGRAMNAME "h5copy"
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index 0537b9f..1069a31 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -11,8 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdlib.h>
-#include <string.h>
#include "H5private.h"
#include "h5diff.h"
#include "h5diff_common.h"
diff --git a/tools/src/h5diff/h5diff_main.c b/tools/src/h5diff/h5diff_main.c
index 92a1610..66ff71e 100644
--- a/tools/src/h5diff/h5diff_main.c
+++ b/tools/src/h5diff/h5diff_main.c
@@ -11,9 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdlib.h>
-#include <assert.h>
-#include <memory.h>
#include "H5private.h"
#include "h5diff.h"
#include "h5diff_common.h"
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index bfeb408..192067f 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -11,9 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
#include "H5private.h"
#include "h5diff.h"
#include "ph5diff.h"
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index b53c212..bf2e127 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -10,8 +10,6 @@
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdio.h>
-#include <stdlib.h>
#include "h5dump.h"
#include "h5dump_ddl.h"
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c
index 8ce6cd6..0a45840 100644
--- a/tools/src/h5dump/h5dump_ddl.c
+++ b/tools/src/h5dump/h5dump_ddl.c
@@ -10,8 +10,6 @@
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdio.h>
-#include <stdlib.h>
#include "H5private.h"
#include "h5tools.h"
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index 1c3978d..bb0fd7a 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -10,8 +10,6 @@
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdio.h>
-#include <stdlib.h>
#include "H5private.h"
#include "h5tools.h"
diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c
index bc8527b..4860d9e 100644
--- a/tools/src/h5repack/h5repack.c
+++ b/tools/src/h5repack/h5repack.c
@@ -11,10 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
#include "H5private.h"
#include "h5repack.h"
#include "h5tools.h"
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index 6aee7a8..6f196b4 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -11,8 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdlib.h>
-#include <string.h>
#include "H5private.h" /* Generic Functions */
#include "h5tools.h"
#include "h5tools_utils.h"
diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c
index 597b6b3..43d6bfe 100644
--- a/tools/src/misc/h5mkgrp.c
+++ b/tools/src/misc/h5mkgrp.c
@@ -15,8 +15,6 @@
#include "H5private.h"
#include "h5tools.h"
#include "h5tools_utils.h"
-#include <string.h>
-#include <stdlib.h>
/* Name of tool */
#define PROGRAMNAME "h5mkgrp"
diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c
index 4432621..cdc554f 100644
--- a/tools/src/misc/h5repart.c
+++ b/tools/src/misc/h5repart.c
@@ -25,39 +25,9 @@
/* See H5private.h for how to include system headers */
#include "hdf5.h"
#include "H5private.h"
-#ifdef H5_STDC_HEADERS
-# include <ctype.h>
-# include <errno.h>
-# include <fcntl.h>
-# include <stdio.h>
-# include <stdlib.h>
-# include <string.h>
-#endif
-
-#ifdef H5_HAVE_UNISTD_H
-# include <sys/types.h>
-# include <unistd.h>
-#endif
-
-#ifdef H5_HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#ifndef FALSE
-# define FALSE 0
-#endif
-#ifndef TRUE
-# define TRUE 1
-#endif
-# define NAMELEN 4096
-#define GB *1024*1024*1024
-#ifndef MIN
-# define MIN(X,Y) ((X)<(Y)?(X):(Y))
-#endif
-#ifndef MIN3
-# define MIN3(X,Y,Z) MIN(MIN(X,Y),Z)
-#endif
+#define NAMELEN 4096
+#define GB *1024*1024*1024
/*Make these 2 private properties(defined in H5Fprivate.h) available to h5repart.
*The first one updates the member file size in the superblock. The second one
diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c
index d4d6a08..35f9132 100644
--- a/tools/test/h5copy/h5copygentest.c
+++ b/tools/test/h5copy/h5copygentest.c
@@ -14,7 +14,6 @@
/*
* Generate the binary hdf5 file for the h5copy tests
*/
-#include <stdlib.h>
#include "hdf5.h"
#include "H5private.h"
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index 72dda6b..608795c 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -95,6 +95,8 @@
${HDF5_TOOLS_DIR}/testfiles/vds/5_b.h5
${HDF5_TOOLS_DIR}/testfiles/vds/5_c.h5
${HDF5_TOOLS_DIR}/testfiles/vds/5_vds.h5
+ # tools/testfiles
+ ${HDF5_TOOLS_DIR}/testfiles/tvlstr.h5
)
set (LIST_OTHER_TEST_FILES
@@ -286,6 +288,7 @@
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v1.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v2.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v3.txt
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_vlstr.txt
)
set (LIST_WIN_TEST_FILES
@@ -311,6 +314,11 @@
HDFTEST_COPY_FILE("${h5_tstfiles}" "${PROJECT_BINARY_DIR}/PAR/testfiles/${fname}" "h5diff_files")
endif ()
endforeach ()
+ # copy second version of tvlstr.h5
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tvlstr.h5" "${PROJECT_BINARY_DIR}/testfiles/tvlstr2.h5" "h5diff_files")
+ if (H5_HAVE_PARALLEL)
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tvlstr.h5" "${PROJECT_BINARY_DIR}/PAR/testfiles/tvlstr2.h5" "h5diff_files")
+ endif ()
#
@@ -888,6 +896,8 @@
h5diff_v2.out.err
h5diff_v3.out
h5diff_v3.out.err
+ h5diff_vlstr.out
+ h5diff_vlstr.out.err
)
set_tests_properties (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (NOT "${last_test}" STREQUAL "")
@@ -1465,6 +1475,7 @@ ADD_H5_TEST (h5diff_487 1 -v --exclude-path "/group1/dset" h5diff_exclude3-1.h5
# # diff various multiple vlen and fixed strings in a compound type dataset
# ##############################################################################
ADD_H5_TEST (h5diff_530 0 -v ${COMP_VL_STRS_FILE} ${COMP_VL_STRS_FILE} /group /group_copy)
+ADD_H5_TEST (h5diff_vlstr 0 -v tvlstr.h5 tvlstr2.h5)
# ##############################################################################
# # Test container types (array,vlen) with multiple nested compound types
diff --git a/tools/test/h5diff/testfiles/h5diff_vlstr.txt b/tools/test/h5diff/testfiles/h5diff_vlstr.txt
new file mode 100644
index 0000000..67141f1
--- /dev/null
+++ b/tools/test/h5diff/testfiles/h5diff_vlstr.txt
@@ -0,0 +1,16 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /Dataset1
+ x x /vl_string_type
+
+group : </> and </>
+0 differences found
+attribute: <test_scalar of </>> and <test_scalar of </>>
+0 differences found
+dataset: </Dataset1> and </Dataset1>
+0 differences found
+datatype: </vl_string_type> and </vl_string_type>
+0 differences found
+EXIT CODE: 0
diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in
index d769c23..df472d4 100644
--- a/tools/test/h5diff/testh5diff.sh.in
+++ b/tools/test/h5diff/testh5diff.sh.in
@@ -124,6 +124,7 @@ $SRC_H5DIFF_TESTFILES/tmpSingleSiteBethe.reference.h5
$SRC_H5DIFF_TESTFILES/tmpSingleSiteBethe.output.h5
$SRC_H5DIFF_TESTFILES/diff_strings1.h5
$SRC_H5DIFF_TESTFILES/diff_strings2.h5
+$SRC_TOOLS_TESTFILES/tvlstr.h5
"
LIST_HDF5_VDS_TEST_FILES="
@@ -341,6 +342,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_tmp2.txt
$SRC_H5DIFF_TESTFILES/h5diff_v1.txt
$SRC_H5DIFF_TESTFILES/h5diff_v2.txt
$SRC_H5DIFF_TESTFILES/h5diff_v3.txt
+$SRC_H5DIFF_TESTFILES/h5diff_vlstr.txt
"
#
@@ -566,6 +568,8 @@ SKIP() {
##############################################################################
# prepare for test
COPY_TESTFILES_TO_TESTDIR
+# second copy of tvlstr.h5
+$CP -f $SRC_TOOLS_TESTFILES/tvlstr.h5 $TESTDIR/tvlstr2.h5
# ############################################################################
# # Common usage
@@ -1141,6 +1145,7 @@ TOOLTEST h5diff_487.txt -v --exclude-path "/group1/dset" h5diff_exclude3-1.h5 h5
# # diff various multiple vlen and fixed strings in a compound type dataset
# ##############################################################################
TOOLTEST h5diff_530.txt -v h5diff_comp_vl_strs.h5 h5diff_comp_vl_strs.h5 /group /group_copy
+TOOLTEST h5diff_vlstr.txt -v tvlstr.h5 tvlstr2.h5
# ##############################################################################
# # Test container types (array,vlen) with multiple nested compound types
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index 44c4369..2128acb 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -20,7 +20,6 @@
* trying it on a new platform, ...), you need to verify the correctness
* of the expected output and update the corresponding *.ddl files.
*/
-#include <limits.h>
#include "hdf5.h"
#include "H5private.h"
diff --git a/tools/test/h5import/h5importtest.c b/tools/test/h5import/h5importtest.c
index 00ae2e7..489bc01 100644
--- a/tools/test/h5import/h5importtest.c
+++ b/tools/test/h5import/h5importtest.c
@@ -11,7 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdio.h>
#include "H5private.h"
#ifdef H5_HAVE_WIN32_API
diff --git a/tools/test/h5jam/h5jamgentest.c b/tools/test/h5jam/h5jamgentest.c
index d713bb9..9f3d000 100644
--- a/tools/test/h5jam/h5jamgentest.c
+++ b/tools/test/h5jam/h5jamgentest.c
@@ -20,8 +20,6 @@
* trying it on a new platform, ...), you need to verify the correctness
* of the expected output and update the corresponding *.ddl files.
*/
-#include <assert.h>
-#include <limits.h>
#include "hdf5.h"
#include "H5private.h"
diff --git a/tools/test/h5jam/tellub.c b/tools/test/h5jam/tellub.c
index fad14b7..8e4b3ac 100644
--- a/tools/test/h5jam/tellub.c
+++ b/tools/test/h5jam/tellub.c
@@ -11,12 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdio.h>
-
-#ifdef H5_HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#include "hdf5.h"
#include "H5private.h"
#include "h5tools.h"
diff --git a/tools/test/h5repack/testh5repack_detect_szip.c b/tools/test/h5repack/testh5repack_detect_szip.c
index e08d5ab..6e7a24e 100644
--- a/tools/test/h5repack/testh5repack_detect_szip.c
+++ b/tools/test/h5repack/testh5repack_detect_szip.c
@@ -11,7 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdio.h>
#include "h5repack.h"
#include "h5tools.h"
#include "h5tools_utils.h"
diff --git a/tools/test/misc/repart_test.c b/tools/test/misc/repart_test.c
index 372f46a..4016ee8 100644
--- a/tools/test/misc/repart_test.c
+++ b/tools/test/misc/repart_test.c
@@ -12,19 +12,16 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
- * June 1, 2005
- *
* Purpose: This program tests family files after being repartitioned
* by h5repart. It simply tries to reopen the files with
* correct family driver and member size.
*/
#include "hdf5.h"
+#include "H5private.h"
#define KB 1024
#define FAMILY_H5REPART_SIZE1 20000
#define FAMILY_H5REPART_SIZE2 (5*KB)
-#define MAX(a,b) (a>b ? a:b)
const char *FILENAME[] = {
"fst_family%05d.h5",
@@ -42,52 +39,54 @@ herr_t test_sec2_h5repart_opens(void);
*
* Purpose: Tries to reopen family files.
*
- * Return: Success: exit(0)
- *
- * Failure: exit(1)
+ * Return: SUCCEED/FAIL
*
- * Programmer: Raymond Lu
- * June 1, 2005
- *
- * Modifications:
*-------------------------------------------------------------------------
*/
herr_t
test_family_h5repart_opens(void)
{
- hid_t file=(-1), fapl=(-1);
+ hid_t fid = -1;
+ hid_t fapl_id = -1;
/* open 1st file(single member file) with correct family size(20000 byte) */
- if ((fapl=H5Pcreate(H5P_FILE_ACCESS))<0)
+ if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
goto error;
- if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_H5REPART_SIZE1, H5P_DEFAULT)<0)
+ if (H5Pset_fapl_family(fapl_id, (hsize_t)FAMILY_H5REPART_SIZE1, H5P_DEFAULT) < 0)
goto error;
- if((file=H5Fopen(FILENAME[0], H5F_ACC_RDWR, fapl))<0)
+ if ((fid = H5Fopen(FILENAME[0], H5F_ACC_RDWR, fapl_id))<0)
goto error;
- if(H5Fclose(file)<0)
+ if (H5Fclose(fid) < 0)
goto error;
/* open 2nd file(multiple member files) with correct family size(5KB) */
- if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_H5REPART_SIZE2, H5P_DEFAULT)<0)
+ if (H5Pset_fapl_family(fapl_id, (hsize_t)FAMILY_H5REPART_SIZE2, H5P_DEFAULT) < 0)
+ goto error;
+
+ if ((fid = H5Fopen(FILENAME[1], H5F_ACC_RDWR, fapl_id)) < 0)
goto error;
- if((file=H5Fopen(FILENAME[1], H5F_ACC_RDWR, fapl))<0)
+ if (H5Pclose(fapl_id) < 0)
goto error;
- if(H5Fclose(file)<0)
+ if (H5Fclose(fid) < 0)
goto error;
- return 0;
+ return SUCCEED;
error:
H5E_BEGIN_TRY {
- H5Fclose(file);
+ H5Pclose(fapl_id);
+ H5Fclose(fid);
} H5E_END_TRY;
- return -1;
-}
+
+ return FAIL;
+
+} /* end test_family_h5repart_opens() */
+
/*-------------------------------------------------------------------------
@@ -95,36 +94,32 @@ error:
*
* Purpose: Tries to reopen a sec2 file.
*
- * Return: Success: exit(0)
+ * Return: SUCCEED/FAIL
*
- * Failure: exit(1)
- *
- * Programmer: Raymond Lu
- * June 21, 2005
- *
- * Modifications:
*-------------------------------------------------------------------------
*/
herr_t
test_sec2_h5repart_opens(void)
{
- hid_t file=(-1);
+ hid_t fid = -1;
/* open the sec2 file */
- if((file=H5Fopen(FILENAME[2], H5F_ACC_RDWR, H5P_DEFAULT))<0)
+ if ((fid = H5Fopen(FILENAME[2], H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
goto error;
- if(H5Fclose(file)<0)
+ if (H5Fclose(fid) < 0)
goto error;
- return 0;
+ return SUCCEED;
error:
H5E_BEGIN_TRY {
- H5Fclose(file);
+ H5Fclose(fid);
} H5E_END_TRY;
- return -1;
-}
+
+ return FAIL;
+
+} /* end test_sec2_h5repart_opens() */
/*-------------------------------------------------------------------------
@@ -132,32 +127,26 @@ error:
*
* Purpose: Tests h5repart-ed family files
*
- * Return: Success: exit(0)
- *
- * Failure: exit(1)
- *
- * Programmer: Raymond Lu
- * June 1, 2005
- *
- * Modifications:
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
*
*-------------------------------------------------------------------------
*/
int
main(void)
{
- int nerrors=0;
+ int nerrors = 0;
- nerrors += test_family_h5repart_opens()<0 ?1:0;
- nerrors += test_sec2_h5repart_opens()<0 ?1:0;
+ nerrors += test_family_h5repart_opens() < 0 ? 1 : 0;
+ nerrors += test_sec2_h5repart_opens() < 0 ? 1 : 0;
- if (nerrors) goto error;
+ if (nerrors)
+ goto error;
- return 0;
+ HDexit(EXIT_SUCCESS);
error:
nerrors = MAX(1, nerrors);
- printf("***** %d FAMILY FILE TEST%s FAILED! *****\n",
+ HDprintf("***** %d FAMILY FILE TEST%s FAILED! *****\n",
nerrors, 1 == nerrors ? "" : "S");
- return 1;
-}
+ HDexit(EXIT_FAILURE);
+} /* end main() */
diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c
index 9a72557..ce866b4 100644
--- a/tools/test/misc/talign.c
+++ b/tools/test/misc/talign.c
@@ -15,9 +15,6 @@
* Small program to illustrate the "misalignment" of members within a compound
* datatype, in a datatype fixed by H5Tget_native_type().
*/
-#include <string.h>
-#include <stdlib.h>
-/*#include <unistd.h> *//* Required for unlink() */
#include "hdf5.h"
#include "H5private.h"
diff --git a/tools/test/perform/CMakeTests.cmake b/tools/test/perform/CMakeTests.cmake
index 2933563..39faa73 100644
--- a/tools/test/perform/CMakeTests.cmake
+++ b/tools/test/perform/CMakeTests.cmake
@@ -146,6 +146,7 @@ else ()
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
+set_tests_properties (PERFORM_zip_perf PROPERTIES DEPENDS PERFORM_zip_perf_help)
if (H5_HAVE_PARALLEL)
add_test (NAME PERFORM_h5perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf>)