summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST1
-rw-r--r--config/cmake_ext_mod/HDFLibMacros.cmake10
-rw-r--r--release_docs/RELEASE.txt9
-rw-r--r--test/plugin.c3
-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
36 files changed, 111 insertions, 178 deletions
diff --git a/MANIFEST b/MANIFEST
index c34e614..6decb7d 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2399,6 +2399,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/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 42cf488..b6f508b 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -225,6 +225,15 @@ Bug Fixes since HDF5-1.10.0-patch1 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)
+
- h5repack
h5repack did not maintain the creation order flag of the root
diff --git a/test/plugin.c b/test/plugin.c
index 1254e9a..3034c0b 100644
--- a/test/plugin.c
+++ b/test/plugin.c
@@ -733,7 +733,10 @@ test_filter_path_apis(void)
if(H5Zfilter_avail(H5Z_FILTER_DYNLIB1) != TRUE) TEST_ERROR
+ TESTING(" initialize");
H5PLsize(&ndx);
+ if(ndx!=2) TEST_ERROR
+ PASSED();
TESTING(" remove");
/* Remove all existing paths*/
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 22fd863..5f01a41 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 911e0c6..5190197 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 135b8e4..670559f 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 8648f07..ff3d35f 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>)