summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeInstallation.cmake3
-rw-r--r--CMakeLists.txt20
-rw-r--r--c++/src/CMakeLists.txt6
-rw-r--r--c++/src/H5ArrayType.h6
-rw-r--r--c++/src/H5AtomType.h4
-rw-r--r--c++/src/H5Attribute.h18
-rw-r--r--c++/src/H5CompType.h6
-rw-r--r--c++/src/H5DaccProp.h4
-rw-r--r--c++/src/H5DataSet.h18
-rw-r--r--c++/src/H5DataSpace.h2
-rw-r--r--c++/src/H5DataType.h10
-rw-r--r--c++/src/H5DcreatProp.h4
-rw-r--r--c++/src/H5DxferProp.h4
-rw-r--r--c++/src/H5EnumType.h6
-rw-r--r--c++/src/H5FaccProp.h4
-rw-r--r--c++/src/H5FcreatProp.h4
-rw-r--r--c++/src/H5File.h2
-rw-r--r--c++/src/H5FloatType.h6
-rw-r--r--c++/src/H5IntType.h6
-rw-r--r--c++/src/H5LaccProp.h4
-rw-r--r--c++/src/H5LcreatProp.h4
-rw-r--r--c++/src/H5Location.cpp2
-rw-r--r--c++/src/H5OcreatProp.h4
-rw-r--r--c++/src/H5PredType.h4
-rw-r--r--c++/src/H5PropList.cpp2
-rw-r--r--c++/src/H5PropList.h10
-rw-r--r--c++/src/H5StrType.h6
-rw-r--r--c++/src/H5VarLenType.h6
-rw-r--r--c++/test/ttypes.cpp8
-rw-r--r--config/cmake/H5pubconf.h.in27
-rw-r--r--config/cmake/cacheinit.cmake2
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake6
-rw-r--r--config/gnu-cxxflags9
-rw-r--r--config/gnu-fflags9
-rw-r--r--config/gnu-flags9
-rw-r--r--config/gnu-warnings/error-general1
-rw-r--r--config/gnu-warnings/noerror-general1
-rw-r--r--configure.ac53
-rw-r--r--fortran/src/CMakeLists.txt78
-rw-r--r--fortran/test/CMakeLists.txt14
-rw-r--r--hl/c++/src/CMakeLists.txt6
-rw-r--r--hl/c++/src/H5PacketTable.h2
-rw-r--r--hl/fortran/src/CMakeLists.txt18
-rw-r--r--hl/src/CMakeLists.txt6
-rw-r--r--hl/src/H5TB.c342
-rw-r--r--hl/test/test_image.c11
-rw-r--r--src/CMakeLists.txt141
-rw-r--r--src/H5.c1
-rw-r--r--test/CMakeLists.txt1
-rw-r--r--test/CMakeTests.cmake3
-rw-r--r--test/ShellTests.cmake7
-rw-r--r--testpar/CMakeVFDTests.cmake4
-rw-r--r--tools/test/h5copy/testh5copy.sh.in12
-rw-r--r--tools/test/h5diff/h5diff_plugin.sh.in117
-rw-r--r--tools/test/h5diff/testh5diff.sh.in48
-rw-r--r--tools/test/h5dump/h5dump_plugin.sh.in28
-rw-r--r--tools/test/h5dump/testh5dump.sh.in408
-rw-r--r--tools/test/h5dump/testh5dumppbits.sh.in158
-rw-r--r--tools/test/h5dump/testh5dumpvds.sh.in172
-rw-r--r--tools/test/h5dump/testh5dumpxml.sh.in31
-rw-r--r--tools/test/h5jam/getub.c5
-rw-r--r--tools/test/h5ls/h5ls_plugin.sh.in6
-rw-r--r--tools/test/h5repack/h5repack.sh.in46
-rw-r--r--tools/test/misc/h5perf_gentest.c4
-rw-r--r--tools/test/misc/h5repart_gentest.c2
-rw-r--r--tools/test/misc/testh5mkgrp.sh.in93
-rw-r--r--tools/test/perform/chunk.c2
-rw-r--r--tools/test/perform/chunk_cache.c16
-rw-r--r--tools/test/perform/iopipe.c2
-rw-r--r--tools/test/perform/overhead.c2
-rw-r--r--tools/test/perform/perf_meta.c6
-rw-r--r--tools/test/perform/pio_perf.h6
-rw-r--r--tools/test/perform/pio_standalone.h32
73 files changed, 1151 insertions, 979 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index bff0c49..d811ea5 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -205,7 +205,6 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
set (release_files
${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_CMake.txt
- ${HDF5_SOURCE_DIR}/release_docs/COPYING
${HDF5_SOURCE_DIR}/release_docs/RELEASE.txt
)
if (WIN32)
@@ -263,9 +262,9 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
set (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}")
set (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}")
set (CPACK_PACKAGE_VERSION_PATCH "")
+ set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
if (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
- set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
endif ()
set (CPACK_PACKAGE_RELOCATABLE TRUE)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e34830b..4054110 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -507,6 +507,14 @@ else ()
endif ()
#-----------------------------------------------------------------------------
+# perl is used in some optional src and tests, check availability
+find_package (Perl)
+if (PERL_FOUND)
+ set (H5_PERL_FOUND YES)
+endif ()
+#-----------------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
# Option to Build Static executables
#-----------------------------------------------------------------------------
option (BUILD_STATIC_EXECS "Build Static Executables" OFF)
@@ -517,12 +525,18 @@ if (BUILD_STATIC_EXECS)
endif ()
endif ()
+option (HDF5_ENABLE_ANALYZER_TOOLS "enable the use of Clang tools" OFF)
+mark_as_advanced (HDF5_ENABLE_ANALYZER_TOOLS)
if (HDF5_ENABLE_ANALYZER_TOOLS)
include (${HDF5_SOURCE_DIR}/config/sanitizer/tools.cmake)
endif ()
+option (HDF5_ENABLE_SANITIZERS "execute the Clang sanitizer" OFF)
+mark_as_advanced (HDF5_ENABLE_SANITIZERS)
if (HDF5_ENABLE_SANITIZERS)
include (${HDF5_SOURCE_DIR}/config/sanitizer/sanitizers.cmake)
endif ()
+option (HDF5_ENABLE_FORMATTERS "format source files" OFF)
+mark_as_advanced (HDF5_ENABLE_FORMATTERS)
if (HDF5_ENABLE_FORMATTERS)
include (${HDF5_SOURCE_DIR}/config/sanitizer/formatting.cmake)
endif ()
@@ -1029,7 +1043,9 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
if (HDF5_BUILD_FORTRAN)
include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake)
- message (STATUS "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}")
+ endif ()
include (${HDF_RESOURCES_DIR}/HDFFortranCompilerFlags.cmake)
include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake)
set (LINK_Fortran_LIBS ${LINK_LIBS})
@@ -1071,7 +1087,7 @@ endif ()
# Option to build HDF5 C++ Library
#-----------------------------------------------------------------------------
if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
- option (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" ON)
+ option (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" OFF)
if (HDF5_BUILD_CPP_LIB)
# check for unsupported options
if (HDF5_ENABLE_PARALLEL)
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 8608c67..4b1a2d6 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -209,7 +209,11 @@ install (
)
if (NOT WIN32 AND NOT MINGW)
- set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
+ if (HDF5_ENABLE_PARALLEL AND MPI_CXX_FOUND)
+ set (_PKG_CONFIG_COMPILER ${MPI_CXX_COMPILER})
+ else ()
+ set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
+ endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5c++
diff --git a/c++/src/H5ArrayType.h b/c++/src/H5ArrayType.h
index 4302352..b93ae4a 100644
--- a/c++/src/H5ArrayType.h
+++ b/c++/src/H5ArrayType.h
@@ -37,7 +37,7 @@ class H5_DLLCPP ArrayType : public DataType {
// Returns an ArrayType object via DataType* by decoding the
// binary object description of this type.
- virtual DataType *decode() const;
+ virtual DataType *decode() const H5_OVERRIDE;
// Returns the number of dimensions of this array datatype.
int getArrayNDims() const;
@@ -49,7 +49,7 @@ class H5_DLLCPP ArrayType : public DataType {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("ArrayType");
}
@@ -61,7 +61,7 @@ class H5_DLLCPP ArrayType : public DataType {
ArrayType(const hid_t existing_id);
// Noop destructor
- virtual ~ArrayType();
+ virtual ~ArrayType() H5_OVERRIDE;
// Default constructor
ArrayType();
diff --git a/c++/src/H5AtomType.h b/c++/src/H5AtomType.h
index 84da5e9..e00a308 100644
--- a/c++/src/H5AtomType.h
+++ b/c++/src/H5AtomType.h
@@ -58,7 +58,7 @@ class H5_DLLCPP AtomType : public DataType {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("AtomType");
}
@@ -68,7 +68,7 @@ class H5_DLLCPP AtomType : public DataType {
AtomType(const AtomType &original);
// Noop destructor
- virtual ~AtomType();
+ virtual ~AtomType() H5_OVERRIDE;
#endif // DOXYGEN_SHOULD_SKIP_THIS
protected:
diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h
index 41e5a31..71bfa14 100644
--- a/c++/src/H5Attribute.h
+++ b/c++/src/H5Attribute.h
@@ -38,7 +38,7 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
Attribute(const hid_t attr_id);
// Closes this attribute.
- virtual void close();
+ virtual void close() H5_OVERRIDE;
// Gets the name of this attribute.
ssize_t getName(char *attr_name, size_t buf_size = 0) const;
@@ -50,13 +50,13 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
ssize_t getName(size_t buf_size, H5std_string &attr_name) const;
// Gets a copy of the dataspace for this attribute.
- virtual DataSpace getSpace() const;
+ virtual DataSpace getSpace() const H5_OVERRIDE;
// Returns the amount of storage size required for this attribute.
- virtual hsize_t getStorageSize() const;
+ virtual hsize_t getStorageSize() const H5_OVERRIDE;
// Returns the in memory size of this attribute's data.
- virtual size_t getInMemDataSize() const;
+ virtual size_t getInMemDataSize() const H5_OVERRIDE;
// Reads data from this attribute.
void read(const DataType &mem_type, void *buf) const;
@@ -68,21 +68,21 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("Attribute");
}
// Gets the attribute id.
- virtual hid_t getId() const;
+ virtual hid_t getId() const H5_OVERRIDE;
// Destructor: properly terminates access to this attribute.
- virtual ~Attribute();
+ virtual ~Attribute() H5_OVERRIDE;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
protected:
// Sets the attribute id.
- virtual void p_setId(const hid_t new_id);
+ virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
#endif // DOXYGEN_SHOULD_SKIP_THIS
private:
@@ -92,7 +92,7 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
// getTypeClass and various API functions getXxxType
// defined in AbstractDs for generic datatype and specific
// sub-types
- virtual hid_t p_get_type() const;
+ virtual hid_t p_get_type() const H5_OVERRIDE;
// Reads variable or fixed len strings from this attribute.
void p_read_variable_len(const DataType &mem_type, H5std_string &strg) const;
diff --git a/c++/src/H5CompType.h b/c++/src/H5CompType.h
index 6a4c093..4424d89 100644
--- a/c++/src/H5CompType.h
+++ b/c++/src/H5CompType.h
@@ -45,7 +45,7 @@ class H5_DLLCPP CompType : public DataType {
// Returns a CompType object via DataType* by decoding the binary
// object description of this type.
- virtual DataType *decode() const;
+ virtual DataType *decode() const H5_OVERRIDE;
// Returns the type class of the specified member of this compound
// datatype. It provides to the user a way of knowing what type
@@ -108,13 +108,13 @@ class H5_DLLCPP CompType : public DataType {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("CompType");
}
// Noop destructor.
- virtual ~CompType();
+ virtual ~CompType() H5_OVERRIDE;
private:
// Contains common code that is used by the member functions
diff --git a/c++/src/H5DaccProp.h b/c++/src/H5DaccProp.h
index 7d6b250..398918d 100644
--- a/c++/src/H5DaccProp.h
+++ b/c++/src/H5DaccProp.h
@@ -38,7 +38,7 @@ class H5_DLLCPP DSetAccPropList : public LinkAccPropList {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("DSetAccPropList");
}
@@ -51,7 +51,7 @@ class H5_DLLCPP DSetAccPropList : public LinkAccPropList {
DSetAccPropList(const hid_t plist_id);
// Noop destructor.
- virtual ~DSetAccPropList();
+ virtual ~DSetAccPropList() H5_OVERRIDE;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h
index c745470..619bc30 100644
--- a/c++/src/H5DataSet.h
+++ b/c++/src/H5DataSet.h
@@ -28,7 +28,7 @@ namespace H5 {
class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
public:
// Close this dataset.
- virtual void close();
+ virtual void close() H5_OVERRIDE;
// Extends the dataset with unlimited dimension.
void extend(const hsize_t *size) const;
@@ -53,16 +53,16 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
haddr_t getOffset() const;
// Gets the dataspace of this dataset.
- virtual DataSpace getSpace() const;
+ virtual DataSpace getSpace() const H5_OVERRIDE;
// Determines whether space has been allocated for a dataset.
void getSpaceStatus(H5D_space_status_t &status) const;
// Returns the amount of storage size required for this dataset.
- virtual hsize_t getStorageSize() const;
+ virtual hsize_t getStorageSize() const H5_OVERRIDE;
// Returns the in memory size of this attribute's data.
- virtual size_t getInMemDataSize() const;
+ virtual size_t getInMemDataSize() const H5_OVERRIDE;
// Returns the number of bytes required to store VL data.
hsize_t getVlenBufSize(const DataType &type, const DataSpace &space) const;
@@ -100,7 +100,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("DataSet");
}
@@ -121,15 +121,15 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
DataSet(const hid_t existing_id);
// Gets the dataset id.
- virtual hid_t getId() const;
+ virtual hid_t getId() const H5_OVERRIDE;
// Destructor: properly terminates access to this dataset.
- virtual ~DataSet();
+ virtual ~DataSet() H5_OVERRIDE;
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Sets the dataset id.
- virtual void p_setId(const hid_t new_id);
+ virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
#endif // DOXYGEN_SHOULD_SKIP_THIS
private:
@@ -139,7 +139,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
// getTypeClass and various API functions getXxxType
// defined in AbstractDs for generic datatype and specific
// sub-types
- virtual hid_t p_get_type() const;
+ virtual hid_t p_get_type() const H5_OVERRIDE;
// Reads variable or fixed len strings from this dataset.
void p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id,
diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h
index 470de74..5583baa 100644
--- a/c++/src/H5DataSpace.h
+++ b/c++/src/H5DataSpace.h
@@ -127,7 +127,7 @@ class H5_DLLCPP DataSpace : public IdComponent {
static void deleteConstants();
// Destructor: properly terminates access to this dataspace.
- virtual ~DataSpace();
+ virtual ~DataSpace() H5_OVERRIDE;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h
index 49f5348..7dd371b 100644
--- a/c++/src/H5DataType.h
+++ b/c++/src/H5DataType.h
@@ -47,7 +47,7 @@ class H5_DLLCPP DataType : public H5Object {
// PropList& plist = PropList::DEFAULT);
// Closes this datatype.
- virtual void close();
+ virtual void close() H5_OVERRIDE;
// Copies an existing datatype to this datatype object.
void copy(const DataType &like_type);
@@ -133,7 +133,7 @@ class H5_DLLCPP DataType : public H5Object {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("DataType");
}
@@ -148,10 +148,10 @@ class H5_DLLCPP DataType : public H5Object {
bool hasBinaryDesc() const;
// Gets the datatype id.
- virtual hid_t getId() const;
+ virtual hid_t getId() const H5_OVERRIDE;
// Destructor: properly terminates access to this datatype.
- virtual ~DataType();
+ virtual ~DataType() H5_OVERRIDE;
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -162,7 +162,7 @@ class H5_DLLCPP DataType : public H5Object {
hid_t p_decode() const;
// Sets the datatype id.
- virtual void p_setId(const hid_t new_id);
+ virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
// Opens a datatype and returns the id.
hid_t p_opentype(const H5Location &loc, const char *dtype_name) const;
diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h
index 820c0d1..a576518 100644
--- a/c++/src/H5DcreatProp.h
+++ b/c++/src/H5DcreatProp.h
@@ -128,7 +128,7 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("DSetCreatPropList");
}
@@ -141,7 +141,7 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {
DSetCreatPropList(const hid_t plist_id);
// Noop destructor.
- virtual ~DSetCreatPropList();
+ virtual ~DSetCreatPropList() H5_OVERRIDE;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h
index 1e4d668..3925a57 100644
--- a/c++/src/H5DxferProp.h
+++ b/c++/src/H5DxferProp.h
@@ -100,7 +100,7 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("DSetMemXferPropList");
}
@@ -113,7 +113,7 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
DSetMemXferPropList(const hid_t plist_id);
// Noop destructor
- virtual ~DSetMemXferPropList();
+ virtual ~DSetMemXferPropList() H5_OVERRIDE;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5EnumType.h b/c++/src/H5EnumType.h
index 484405a..2501e4b 100644
--- a/c++/src/H5EnumType.h
+++ b/c++/src/H5EnumType.h
@@ -41,7 +41,7 @@ class H5_DLLCPP EnumType : public DataType {
// Returns an EnumType object via DataType* by decoding the
// binary object description of this type.
- virtual DataType *decode() const;
+ virtual DataType *decode() const H5_OVERRIDE;
// Returns the number of members in this enumeration datatype.
int getNmembers() const;
@@ -68,7 +68,7 @@ class H5_DLLCPP EnumType : public DataType {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("EnumType");
}
@@ -82,7 +82,7 @@ class H5_DLLCPP EnumType : public DataType {
// Copy constructor: same as the original EnumType.
EnumType(const EnumType &original);
- virtual ~EnumType();
+ virtual ~EnumType() H5_OVERRIDE;
}; // end of EnumType
} // namespace H5
diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h
index 998f870..53c7799 100644
--- a/c++/src/H5FaccProp.h
+++ b/c++/src/H5FaccProp.h
@@ -137,7 +137,7 @@ class H5_DLLCPP FileAccPropList : public PropList {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("FileAccPropList");
}
@@ -150,7 +150,7 @@ class H5_DLLCPP FileAccPropList : public PropList {
FileAccPropList(const hid_t plist_id);
// Noop destructor
- virtual ~FileAccPropList();
+ virtual ~FileAccPropList() H5_OVERRIDE;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5FcreatProp.h b/c++/src/H5FcreatProp.h
index 00ae0b1..65daf8f 100644
--- a/c++/src/H5FcreatProp.h
+++ b/c++/src/H5FcreatProp.h
@@ -78,7 +78,7 @@ class H5_DLLCPP FileCreatPropList : public PropList {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("FileCreatPropList");
}
@@ -91,7 +91,7 @@ class H5_DLLCPP FileCreatPropList : public PropList {
FileCreatPropList(const hid_t plist_id);
// Noop destructor
- virtual ~FileCreatPropList();
+ virtual ~FileCreatPropList() H5_OVERRIDE;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5File.h b/c++/src/H5File.h
index 6126eec..bdd7b84 100644
--- a/c++/src/H5File.h
+++ b/c++/src/H5File.h
@@ -117,7 +117,7 @@ class H5_DLLCPP H5File : public Group {
virtual hid_t getId() const H5_OVERRIDE;
// H5File destructor.
- virtual ~H5File();
+ virtual ~H5File() H5_OVERRIDE;
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5FloatType.h b/c++/src/H5FloatType.h
index c76be95..e8df757 100644
--- a/c++/src/H5FloatType.h
+++ b/c++/src/H5FloatType.h
@@ -36,7 +36,7 @@ class H5_DLLCPP FloatType : public AtomType {
// Returns an FloatType object via DataType* by decoding the
// binary object description of this type.
- virtual DataType *decode() const;
+ virtual DataType *decode() const H5_OVERRIDE;
// Retrieves the exponent bias of a floating-point type.
size_t getEbias() const;
@@ -64,7 +64,7 @@ class H5_DLLCPP FloatType : public AtomType {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("FloatType");
}
@@ -79,7 +79,7 @@ class H5_DLLCPP FloatType : public AtomType {
FloatType(const FloatType &original);
// Noop destructor.
- virtual ~FloatType();
+ virtual ~FloatType() H5_OVERRIDE;
}; // end of FloatType
} // namespace H5
diff --git a/c++/src/H5IntType.h b/c++/src/H5IntType.h
index 185c8f0..f0f30ac 100644
--- a/c++/src/H5IntType.h
+++ b/c++/src/H5IntType.h
@@ -36,7 +36,7 @@ class H5_DLLCPP IntType : public AtomType {
// Returns an IntType object via DataType* by decoding the
// binary object description of this type.
- virtual DataType *decode() const;
+ virtual DataType *decode() const H5_OVERRIDE;
// Retrieves the sign type for an integer type
H5T_sign_t getSign() const;
@@ -46,7 +46,7 @@ class H5_DLLCPP IntType : public AtomType {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("IntType");
}
@@ -61,7 +61,7 @@ class H5_DLLCPP IntType : public AtomType {
IntType(const IntType &original);
// Noop destructor.
- virtual ~IntType();
+ virtual ~IntType() H5_OVERRIDE;
}; // end of IntType
} // namespace H5
diff --git a/c++/src/H5LaccProp.h b/c++/src/H5LaccProp.h
index 4fa516c..65a9673 100644
--- a/c++/src/H5LaccProp.h
+++ b/c++/src/H5LaccProp.h
@@ -32,7 +32,7 @@ class H5_DLLCPP LinkAccPropList : public PropList {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("LinkAccPropList");
}
@@ -52,7 +52,7 @@ class H5_DLLCPP LinkAccPropList : public PropList {
size_t getNumLinks() const;
// Noop destructor
- virtual ~LinkAccPropList();
+ virtual ~LinkAccPropList() H5_OVERRIDE;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5LcreatProp.h b/c++/src/H5LcreatProp.h
index aea38e7..c0c66a4 100644
--- a/c++/src/H5LcreatProp.h
+++ b/c++/src/H5LcreatProp.h
@@ -32,7 +32,7 @@ class H5_DLLCPP LinkCreatPropList : public PropList {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("LinkCreatPropList");
}
@@ -59,7 +59,7 @@ class H5_DLLCPP LinkCreatPropList : public PropList {
H5T_cset_t getCharEncoding() const;
// Noop destructor
- virtual ~LinkCreatPropList();
+ virtual ~LinkCreatPropList() H5_OVERRIDE;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index 46f47bb..065de0c 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -2158,6 +2158,7 @@ H5Location::childObjType(const char *objname) const
break;
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
+ case H5O_TYPE_MAP:
default:
throwException("childObjType", "Unknown type of object");
}
@@ -2236,6 +2237,7 @@ H5Location::childObjType(hsize_t index, H5_index_t index_type, H5_iter_order_t o
break;
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
+ case H5O_TYPE_MAP:
default:
throwException("childObjType", "Unknown type of object");
}
diff --git a/c++/src/H5OcreatProp.h b/c++/src/H5OcreatProp.h
index 7f6d411..0aa825b 100644
--- a/c++/src/H5OcreatProp.h
+++ b/c++/src/H5OcreatProp.h
@@ -44,7 +44,7 @@ class H5_DLLCPP ObjCreatPropList : public PropList {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("ObjCreatPropList");
}
@@ -57,7 +57,7 @@ class H5_DLLCPP ObjCreatPropList : public PropList {
ObjCreatPropList(const hid_t plist_id);
// Noop destructor
- virtual ~ObjCreatPropList();
+ virtual ~ObjCreatPropList() H5_OVERRIDE;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h
index b40d2b3..c4ac6b2 100644
--- a/c++/src/H5PredType.h
+++ b/c++/src/H5PredType.h
@@ -29,7 +29,7 @@ class H5_DLLCPP PredType : public AtomType {
public:
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("PredType");
}
@@ -42,7 +42,7 @@ class H5_DLLCPP PredType : public AtomType {
PredType(const PredType &original);
// Noop destructor
- virtual ~PredType();
+ virtual ~PredType() H5_OVERRIDE;
/*! \brief This dummy function do not inherit from DataType - it will
throw a DataTypeIException if invoked.
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp
index 2c80255..3df403b 100644
--- a/c++/src/H5PropList.cpp
+++ b/c++/src/H5PropList.cpp
@@ -152,6 +152,8 @@ PropList::PropList(const hid_t plist_id) : IdComponent()
case H5I_ERROR_STACK:
case H5I_NTYPES:
case H5I_UNINIT:
+ case H5I_MAP:
+ case H5I_SPACE_SEL_ITER:
default:
id = H5P_DEFAULT;
break;
diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h
index 12c8b4b..2df326b 100644
--- a/c++/src/H5PropList.h
+++ b/c++/src/H5PropList.h
@@ -38,7 +38,7 @@ class H5_DLLCPP PropList : public IdComponent {
bool operator==(const PropList &rhs) const;
// Close this property list.
- virtual void close();
+ virtual void close() H5_OVERRIDE;
// Close a property list class.
void closeClass() const;
@@ -102,7 +102,7 @@ class H5_DLLCPP PropList : public IdComponent {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("PropList");
}
@@ -114,10 +114,10 @@ class H5_DLLCPP PropList : public IdComponent {
PropList(const PropList &original);
// Gets the property list id.
- virtual hid_t getId() const;
+ virtual hid_t getId() const H5_OVERRIDE;
// Destructor: properly terminates access to this property list.
- virtual ~PropList();
+ virtual ~PropList() H5_OVERRIDE;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -128,7 +128,7 @@ class H5_DLLCPP PropList : public IdComponent {
hid_t id; // HDF5 property list id
// Sets the property list id.
- virtual void p_setId(const hid_t new_id);
+ virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
private:
static PropList *DEFAULT_;
diff --git a/c++/src/H5StrType.h b/c++/src/H5StrType.h
index d272c53..3e4013a 100644
--- a/c++/src/H5StrType.h
+++ b/c++/src/H5StrType.h
@@ -42,7 +42,7 @@ class H5_DLLCPP StrType : public AtomType {
// Returns an StrType object via DataType* by decoding the
// binary object description of this type.
- virtual DataType *decode() const;
+ virtual DataType *decode() const H5_OVERRIDE;
// Retrieves the character set type of this string datatype.
H5T_cset_t getCset() const;
@@ -58,7 +58,7 @@ class H5_DLLCPP StrType : public AtomType {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("StrType");
}
@@ -73,7 +73,7 @@ class H5_DLLCPP StrType : public AtomType {
StrType(const StrType &original);
// Noop destructor.
- virtual ~StrType();
+ virtual ~StrType() H5_OVERRIDE;
}; // end of StrType
} // namespace H5
diff --git a/c++/src/H5VarLenType.h b/c++/src/H5VarLenType.h
index f767e0e..583b9cd 100644
--- a/c++/src/H5VarLenType.h
+++ b/c++/src/H5VarLenType.h
@@ -33,11 +33,11 @@ class H5_DLLCPP VarLenType : public DataType {
// Returns an VarLenType object via DataType* by decoding the
// binary object description of this type.
- virtual DataType *decode() const;
+ virtual DataType *decode() const H5_OVERRIDE;
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("VarLenType");
}
@@ -53,7 +53,7 @@ class H5_DLLCPP VarLenType : public DataType {
VarLenType(const H5Location &loc, const H5std_string &name);
// Noop destructor
- virtual ~VarLenType();
+ virtual ~VarLenType() H5_OVERRIDE;
// Default constructor
VarLenType();
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp
index b633740..7d0337d 100644
--- a/c++/test/ttypes.cpp
+++ b/c++/test/ttypes.cpp
@@ -656,7 +656,6 @@ static void
test_named()
{
static hsize_t ds_size[2] = {10, 20};
- hsize_t i;
unsigned attr_data[10][20];
DataType * ds_type = NULL;
@@ -726,8 +725,11 @@ test_named()
// It should be possible to define an attribute for the named type
Attribute attr1 = itype.createAttribute("attr1", PredType::NATIVE_UCHAR, space);
- for (i = 0; i < ds_size[0] * ds_size[1]; i++)
- attr_data[0][i] = (int)i; /*tricky*/
+ for (hsize_t i = 0; i < ds_size[0]; i++) {
+ for (hsize_t j = 0; j < ds_size[1]; j++) {
+ attr_data[i][j] = (unsigned)(i * ds_size[1] + j);
+ }
+ }
attr1.write(PredType::NATIVE_UINT, attr_data);
attr1.close();
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index bf24776..d757158 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -243,21 +243,9 @@
/* Define to 1 if you have the `z' library (-lz). */
#cmakedefine H5_HAVE_LIBZ @H5_HAVE_LIBZ@
-/* Define to 1 if you have the `llround' function. */
-#cmakedefine H5_HAVE_LLROUND @H5_HAVE_LLROUND@
-
-/* Define to 1 if you have the `llroundf' function. */
-#cmakedefine H5_HAVE_LLROUNDF @H5_HAVE_LLROUNDF@
-
/* Define to 1 if you have the `longjmp' function. */
#cmakedefine H5_HAVE_LONGJMP @H5_HAVE_LONGJMP@
-/* Define to 1 if you have the `lround' function. */
-#cmakedefine H5_HAVE_LROUND @H5_HAVE_LROUND@
-
-/* Define to 1 if you have the `lroundf' function. */
-#cmakedefine H5_HAVE_LROUNDF @H5_HAVE_LROUNDF@
-
/* Define to 1 if you have the `lseek64' function. */
#cmakedefine H5_HAVE_LSEEK64 @H5_HAVE_LSEEK64@
@@ -322,12 +310,6 @@
compiled */
#cmakedefine H5_HAVE_ROS3_VFD @H5_HAVE_ROS3_VFD@
-/* Define to 1 if you have the `round' function. */
-#cmakedefine H5_HAVE_ROUND @H5_HAVE_ROUND@
-
-/* Define to 1 if you have the `roundf' function. */
-#cmakedefine H5_HAVE_ROUNDF @H5_HAVE_ROUNDF@
-
/* Define to 1 if you have the `setjmp' function. */
#cmakedefine H5_HAVE_SETJMP @H5_HAVE_SETJMP@
@@ -787,19 +769,10 @@
/* Define for large files, on AIX-style hosts. */
#cmakedefine H5__LARGE_FILES
-/* Define to empty if `const' does not conform to ANSI C. */
-#cmakedefine H5_const
-
/* Define to `long int' if <sys/types.h> does not define. */
#cmakedefine H5_off_t
/* Define to `long' if <sys/types.h> does not define. */
-#cmakedefine H5_ptrdiff_t
-
-/* Define to `unsigned long' if <sys/types.h> does not define. */
-#cmakedefine H5_size_t
-
-/* Define to `long' if <sys/types.h> does not define. */
#cmakedefine H5_ssize_t
#endif
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index fc85277..e423deb 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -21,6 +21,8 @@ set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
set (HDF_PACKAGE_NAMESPACE "hdf5::" CACHE STRING "Name for HDF package namespace (can be empty)" FORCE)
+set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build C++ support" FORCE)
+
set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
set (HDF5_INSTALL_MOD_FORTRAN "NO" CACHE STRING "Copy FORTRAN mod files to include directory (NO SHARED STATIC)" FORCE)
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index 4b11f51..105e0e7 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -500,18 +500,12 @@ CHECK_FUNCTION_EXISTS (frexpl ${HDF_PREFIX}_HAVE_FREXPL)
CHECK_FUNCTION_EXISTS (gethostname ${HDF_PREFIX}_HAVE_GETHOSTNAME)
CHECK_FUNCTION_EXISTS (getrusage ${HDF_PREFIX}_HAVE_GETRUSAGE)
-CHECK_FUNCTION_EXISTS (llround ${HDF_PREFIX}_HAVE_LLROUND)
-CHECK_FUNCTION_EXISTS (llroundf ${HDF_PREFIX}_HAVE_LLROUNDF)
-CHECK_FUNCTION_EXISTS (lround ${HDF_PREFIX}_HAVE_LROUND)
-CHECK_FUNCTION_EXISTS (lroundf ${HDF_PREFIX}_HAVE_LROUNDF)
CHECK_FUNCTION_EXISTS (lstat ${HDF_PREFIX}_HAVE_LSTAT)
CHECK_FUNCTION_EXISTS (pread ${HDF_PREFIX}_HAVE_PREAD)
CHECK_FUNCTION_EXISTS (pwrite ${HDF_PREFIX}_HAVE_PWRITE)
CHECK_FUNCTION_EXISTS (rand_r ${HDF_PREFIX}_HAVE_RAND_R)
CHECK_FUNCTION_EXISTS (random ${HDF_PREFIX}_HAVE_RANDOM)
-CHECK_FUNCTION_EXISTS (round ${HDF_PREFIX}_HAVE_ROUND)
-CHECK_FUNCTION_EXISTS (roundf ${HDF_PREFIX}_HAVE_ROUNDF)
CHECK_FUNCTION_EXISTS (setsysinfo ${HDF_PREFIX}_HAVE_SETSYSINFO)
CHECK_FUNCTION_EXISTS (signal ${HDF_PREFIX}_HAVE_SIGNAL)
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags
index 67f925c..cba8298 100644
--- a/config/gnu-cxxflags
+++ b/config/gnu-cxxflags
@@ -144,6 +144,15 @@ if test "X-g++" = "X-$cxx_vendor"; then
DEBUG_CXXFLAGS="-ftrapv -fno-common"
fi
+ ########################
+ # Enhanced Diagnostics #
+ ########################
+
+ if test $cxx_vers_major -ge 10; then
+ NO_DIAGS_CXXFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color"
+ fi
+ DIAGS_CXXFLAGS=
+
###########
# Symbols #
###########
diff --git a/config/gnu-fflags b/config/gnu-fflags
index 51895ed..ec4fcab 100644
--- a/config/gnu-fflags
+++ b/config/gnu-fflags
@@ -105,6 +105,15 @@ if test "X-gfortran" = "X-$f9x_vendor"; then
DEBUG_FCFLAGS="-fbounds-check"
fi
+ ########################
+ # Enhanced Diagnostics #
+ ########################
+
+ if test $f9x_vers_major -ge 10; then
+ NO_DIAGS_FCFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color"
+ fi
+ DIAGS_FCFLAGS=
+
###########
# Symbols #
###########
diff --git a/config/gnu-flags b/config/gnu-flags
index 89d27d6..01533de 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -158,6 +158,15 @@ if test "X-gcc" = "X-$cc_vendor"; then
DEBUG_CFLAGS="-ftrapv -fno-common"
fi
+ ########################
+ # Enhanced Diagnostics #
+ ########################
+
+ if test $cc_vers_major -ge 10; then
+ NO_DIAGS_CFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color"
+ fi
+ DIAGS_CFLAGS=
+
###########
# Symbols #
###########
diff --git a/config/gnu-warnings/error-general b/config/gnu-warnings/error-general
index 4358b20..8405c40 100644
--- a/config/gnu-warnings/error-general
+++ b/config/gnu-warnings/error-general
@@ -3,7 +3,6 @@
# circumstances, so ask the compiler to treat them as errors:
#
-Werror=bad-function-cast
--Werror=declaration-after-statement
-Werror=implicit-function-declaration
-Werror=missing-declarations
-Werror=missing-prototypes
diff --git a/config/gnu-warnings/noerror-general b/config/gnu-warnings/noerror-general
index e19014f..31194d3 100644
--- a/config/gnu-warnings/noerror-general
+++ b/config/gnu-warnings/noerror-general
@@ -3,7 +3,6 @@
# circumstances, so ask the compiler to treat them as errors:
#
-Wbad-function-cast
--Wdeclaration-after-statement
-Wimplicit-function-declaration
-Wmissing-declarations
-Wmissing-prototypes
diff --git a/configure.ac b/configure.ac
index 2b8bb69..cb6d431 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,12 +95,12 @@ AC_CONFIG_COMMANDS([pubconf], [
sed 's/#define /#define H5_/' <src/H5config.h |\
sed 's/#undef /#undef H5_/' >pubconf
if test ! -f src/H5pubconf.h; then
- /bin/mv -f pubconf src/H5pubconf.h
+ mv -f pubconf src/H5pubconf.h
elif (diff pubconf src/H5pubconf.h >/dev/null); then
rm -f pubconf
echo "src/H5pubconf.h is unchanged"
else
- /bin/mv -f pubconf src/H5pubconf.h
+ mv -f pubconf src/H5pubconf.h
fi
echo "Post process src/libhdf5.settings"
sed '/^#/d' < src/libhdf5.settings > libhdf5.settings.TMP
@@ -2094,6 +2094,51 @@ AC_ARG_ENABLE([production],
## ----------------------------------------------------------------------
+## Check if the compiler should include build diagnostics
+##
+AC_MSG_CHECKING([enable build diagnostics])
+AC_ARG_ENABLE([diags],
+ [AS_HELP_STRING([--enable-diags=(yes|no|<custom>)],
+ [Allow default enhanced diagnostics to the build.
+ This is independent of the build mode and optimization
+ level.
+ [default=no]
+ ])],
+ [DIAGS=$enableval])
+
+## Set default
+if test "X-$DIAGS" = X- ; then
+ DIAGS=no
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([DIAGS])
+
+case "X-$DIAGS" in
+ X-yes)
+ H5_CFLAGS="$H5_CFLAGS $DIAGS_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $DIAGS_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $DIAGS_FCFLAGS"
+ AC_MSG_RESULT([yes])
+ ;;
+ X-no)
+ H5_CFLAGS="$H5_CFLAGS $NO_DIAGS_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $NO_DIAGS_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $NO_DIAGS_FCFLAGS"
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ H5_CFLAGS="$H5_CFLAGS $DIAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $DIAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $DIAGS"
+ DIAGS="custom ($DIAGS)"
+ AC_MSG_RESULT([$DIAGS])
+ ;;
+esac
+
+
+## ----------------------------------------------------------------------
## Check if the compiler should include symbols
##
AC_MSG_CHECKING([enable debugging symbols])
@@ -2207,10 +2252,6 @@ if test "X-$DEV_WARNINGS" = X- ; then
DEV_WARNINGS=no
fi
-## Allow this variable to be substituted in
-## other files (src/libhdf5.settings.in, etc.)
-AC_SUBST([DEV_WARNINGS])
-
case "X-$DEV_WARNINGS" in
X-yes)
H5_CFLAGS="$H5_CFLAGS $DEVELOPER_WARNING_CFLAGS"
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 37b5157..7a39abf 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -73,38 +73,35 @@ add_executable (H5match_types
)
target_include_directories (H5match_types PRIVATE "${HDF5_SRC_BINARY_DIR};${HDF5_SRC_DIR};${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
-add_custom_command (
- OUTPUT ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
- ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90
+add_custom_command (TARGET H5match_types POST_BUILD
+ BYPRODUCTS H5f90i_gen.h H5fortran_types.F90
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5match_types>
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
DEPENDS H5match_types
)
if (NOT ONLY_SHARED_LIBS)
- add_custom_command (
- OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
- ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
+ add_custom_command (TARGET H5match_types POST_BUILD
+ BYPRODUCTS H5f90i_gen.h H5fortran_types.F90
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5f90i_gen.h" "${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h"
+ ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5fortran_types.F90" "${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90"
+ ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
- DEPENDS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
+ DEPENDS H5_buildiface H5match_types ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h PROPERTIES GENERATED TRUE)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 PROPERTIES GENERATED TRUE)
endif ()
if (BUILD_SHARED_LIBS)
- add_custom_command (
- OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
- ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90
+ add_custom_command (TARGET H5match_types POST_BUILD
+ BYPRODUCTS H5f90i_gen.h H5fortran_types.F90
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5f90i_gen.h" "${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h"
+ ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5fortran_types.F90" "${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90"
+ ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared
- DEPENDS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
+ DEPENDS H5_buildiface H5match_types ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h PROPERTIES GENERATED TRUE)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 PROPERTIES GENERATED TRUE)
@@ -134,16 +131,29 @@ set (f90CStub_C_SOURCES
set_source_files_properties (${f90CStub_C_SOURCES} PROPERTIES LANGUAGE C)
set (f90CStub_C_HDRS
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h
+)
+
+set (f90CStub_CGEN_HDRS
# generated files
${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
)
-set (f90CStub_C_SHHDRS
+add_custom_target (H5gen_i ALL
+ DEPENDS H5match_types ${f90CStub_CGEN_HDRS}
+)
+
+set (f90CStub_CGEN_SHHDRS
# generated files
${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
)
+add_custom_target (H5gen_iSH ALL
+ DEPENDS H5match_types ${f90CStub_CGEN_SHHDRS}
+)
if (NOT ONLY_SHARED_LIBS)
- add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS})
+ add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS} ${f90CStub_CGEN_HDRS})
target_include_directories (${HDF5_F90_C_LIB_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
@@ -157,11 +167,12 @@ if (NOT ONLY_SHARED_LIBS)
FOLDER libraries/fortran
LINKER_LANGUAGE C
)
+ add_dependencies (${HDF5_F90_C_LIB_TARGET} H5gen_i)
set (install_targets ${HDF5_F90_C_LIB_TARGET})
endif ()
if (BUILD_SHARED_LIBS)
- add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_SHHDRS})
+ add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS} ${f90CStub_CGEN_SHHDRS})
target_include_directories (${HDF5_F90_C_LIBSH_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
@@ -176,6 +187,7 @@ if (BUILD_SHARED_LIBS)
FOLDER libraries/fortran
LINKER_LANGUAGE C
)
+ add_dependencies (${HDF5_F90_C_LIBSH_TARGET} H5gen_iSH)
set (install_targets ${install_targets} ${HDF5_F90_C_LIBSH_TARGET})
endif ()
@@ -210,39 +222,39 @@ set (f90_F_GEN_SOURCES
${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.F90
${HDF5_F90_SRC_SOURCE_DIR}/H5Pff.F90
)
-add_custom_command (
- OUTPUT ${HDF5_F90_BINARY_DIR}/H5_gen.F90
+add_custom_command (TARGET H5_buildiface POST_BUILD
+ BYPRODUCTS ${HDF5_F90_BINARY_DIR}/H5_gen.F90
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5_buildiface>
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
- DEPENDS ${f90_F_GEN_SOURCES}
+ DEPENDS H5_buildiface ${f90_F_GEN_SOURCES}
COMMENT "Generating the H5_gen.F90 file"
)
if (NOT ONLY_SHARED_LIBS)
- add_custom_command (
- OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
+ add_custom_command (TARGET H5_buildiface POST_BUILD
+ BYPRODUCTS H5_gen.F90
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5_gen.F90" "${HDF5_F90_BINARY_DIR}/static/H5_gen.F90"
+ ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5_gen.F90 ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
- DEPENDS ${HDF5_F90_BINARY_DIR}/H5_gen.F90
+ DEPENDS H5_buildiface ${HDF5_F90_BINARY_DIR}/H5_gen.F90
COMMENT "Generating the H5_gen.F90 file"
)
add_custom_target (H5gen ALL
- DEPENDS ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
+ DEPENDS H5_buildiface ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 PROPERTIES GENERATED TRUE)
endif ()
if (BUILD_SHARED_LIBS)
- add_custom_command (
- OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90
+ add_custom_command (TARGET H5_buildiface POST_BUILD
+ BYPRODUCTS H5_gen.F90
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5_gen.F90" "${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90"
+ ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5_gen.F90 ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared
DEPENDS ${HDF5_F90_BINARY_DIR}/H5_gen.F90
COMMENT "Generating the H5_gen.F90 shared file"
)
add_custom_target (H5genSH ALL
- DEPENDS ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90
+ DEPENDS H5_buildiface ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90
)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90 PROPERTIES GENERATED TRUE)
endif ()
@@ -550,7 +562,11 @@ install (
)
if (NOT WIN32 AND NOT MINGW)
- set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER})
+ if (HDF5_ENABLE_PARALLEL AND MPI_Fortran_FOUND)
+ set (_PKG_CONFIG_COMPILER ${MPI_Fortran_COMPILER})
+ else ()
+ set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER})
+ endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5fc
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 40aef6d..147746c 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -91,27 +91,27 @@ if (HDF5_ENABLE_FORMATTERS)
endif ()
if (NOT BUILD_SHARED_LIBS)
- add_custom_command (
- OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90
+ add_custom_command (TARGET H5_test_buildiface POST_BUILD
+ BYPRODUCTS tf_gen.F90
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5_test_buildiface>
WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static
DEPENDS H5_test_buildiface
- COMMENT "Generating the tf_gen.F90 file"
+ COMMENT "Generating the tf_gen.F90 static file"
)
add_custom_target (H5testgen ALL
- DEPENDS ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90
+ DEPENDS H5_test_buildiface ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90
)
set_source_files_properties (${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 PROPERTIES GENERATED TRUE)
else ()
- add_custom_command (
- OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90
+ add_custom_command (TARGET H5_test_buildiface POST_BUILD
+ BYPRODUCTS tf_gen.F90
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5_test_buildiface>
WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared
DEPENDS H5_test_buildiface
COMMENT "Generating the tf_gen.F90 shared file"
)
add_custom_target (H5testgenSH ALL
- DEPENDS ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90
+ DEPENDS H5_test_buildiface ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90
)
set_source_files_properties (${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90 PROPERTIES GENERATED TRUE)
endif ()
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index 1eac9fe..e488656 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -120,7 +120,11 @@ install (
)
if (NOT WIN32 AND NOT MINGW)
- set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
+ if (HDF5_ENABLE_PARALLEL AND MPI_CXX_FOUND)
+ set (_PKG_CONFIG_COMPILER ${MPI_CXX_COMPILER})
+ else ()
+ set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
+ endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5hlc++
diff --git a/hl/c++/src/H5PacketTable.h b/hl/c++/src/H5PacketTable.h
index a73b4c9..acd0ccf 100644
--- a/hl/c++/src/H5PacketTable.h
+++ b/hl/c++/src/H5PacketTable.h
@@ -35,7 +35,7 @@ class H5_HLCPPDLL PacketTable {
*/
PacketTable()
{
- table_id = H5I_BADID;
+ table_id = H5I_INVALID_HID;
}
/* "Open" Constructor
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 0b7795b..4f0b451 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -114,15 +114,15 @@ set (HDF5_HL_F90_F_BASE_SOURCES
)
if (NOT ONLY_SHARED_LIBS)
- add_custom_command (
- OUTPUT ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/static/H5TBff_gen.F90
+ add_custom_command (TARGET H5HL_buildiface POST_BUILD
+ BYPRODUCTS $H5LTff_gen.F90 H5TBff_gen.F90
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5HL_buildiface>
WORKING_DIRECTORY ${HDF5_HL_F90_BINARY_DIR}/static
DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES}
COMMENT "Generating the H5LTff_gen.F90, H5TBff_gen.F90 files"
)
add_custom_target (H5HLgen ALL
- DEPENDS ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/static/H5TBff_gen.F90
+ DEPENDS H5HL_buildiface ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/static/H5TBff_gen.F90
)
set_source_files_properties (
${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90
@@ -131,15 +131,15 @@ if (NOT ONLY_SHARED_LIBS)
)
endif ()
if (BUILD_SHARED_LIBS)
- add_custom_command (
- OUTPUT ${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/shared/H5TBff_gen.F90
+ add_custom_command (TARGET H5HL_buildiface POST_BUILD
+ BYPRODUCTS H5LTff_gen.F90 H5TBff_gen.F90
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5HL_buildiface>
WORKING_DIRECTORY ${HDF5_HL_F90_BINARY_DIR}/shared
DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES}
COMMENT "Generating the H5LTff_gen.F90, H5TBff_gen.F90 shared files"
)
add_custom_target (H5HLgenSH ALL
- DEPENDS ${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/shared/H5TBff_gen.F90
+ DEPENDS H5HL_buildiface ${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/shared/H5TBff_gen.F90
)
set_source_files_properties (
${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90
@@ -353,7 +353,11 @@ install (
)
if (NOT WIN32 AND NOT MINGW)
- set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER})
+ if (HDF5_ENABLE_PARALLEL AND MPI_Fortran_FOUND)
+ set (_PKG_CONFIG_COMPILER ${MPI_Fortran_COMPILER})
+ else ()
+ set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER})
+ endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5hlfc
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt
index 785bdcf..427424e 100644
--- a/hl/src/CMakeLists.txt
+++ b/hl/src/CMakeLists.txt
@@ -152,7 +152,11 @@ install (
)
if (NOT WIN32 AND NOT MINGW)
- set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER})
+ if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)
+ set (_PKG_CONFIG_COMPILER ${MPI_C_COMPILER})
+ else ()
+ set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER})
+ endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5hlcc
diff --git a/hl/src/H5TB.c b/hl/src/H5TB.c
index 1ac162f..efa61a3 100644
--- a/hl/src/H5TB.c
+++ b/hl/src/H5TB.c
@@ -57,11 +57,11 @@ H5TBmake_table(const char *table_title, hid_t loc_id, const char *dset_name, hsi
hsize_t nrecords, size_t type_size, const char *field_names[], const size_t *field_offset,
const hid_t *field_types, hsize_t chunk_size, void *fill_data, int compress, const void *buf)
{
- hid_t did = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t mem_type_id = H5I_BADID;
- hid_t plist_id = H5I_BADID;
- hid_t attr_id = H5I_BADID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t mem_type_id = H5I_INVALID_HID;
+ hid_t plist_id = H5I_INVALID_HID;
+ hid_t attr_id = H5I_INVALID_HID;
hsize_t dims[1];
hsize_t dims_chunk[1];
hsize_t maxdims[1] = {H5S_UNLIMITED};
@@ -129,17 +129,17 @@ H5TBmake_table(const char *table_title, hid_t loc_id, const char *dset_name, hsi
/* terminate access to the data space. */
if (H5Sclose(sid) < 0)
goto out;
- sid = H5I_BADID;
+ sid = H5I_INVALID_HID;
/* end access to the dataset */
if (H5Dclose(did) < 0)
goto out;
- did = H5I_BADID;
+ did = H5I_INVALID_HID;
/* end access to the property list */
if (H5Pclose(plist_id) < 0)
goto out;
- plist_id = H5I_BADID;
+ plist_id = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* set the conforming table attributes
@@ -196,24 +196,24 @@ H5TBmake_table(const char *table_title, hid_t loc_id, const char *dset_name, hsi
if (H5Aclose(attr_id) < 0)
goto out;
- attr_id = H5I_BADID;
+ attr_id = H5I_INVALID_HID;
} /* end for */
/* terminate access to the data space. */
if (H5Sclose(sid) < 0)
goto out;
- sid = H5I_BADID;
+ sid = H5I_INVALID_HID;
/* end access to the dataset */
if (H5Dclose(did) < 0)
goto out;
- did = H5I_BADID;
+ did = H5I_INVALID_HID;
} /* end if */
/* release the datatype. */
if (H5Tclose(mem_type_id) < 0)
goto out;
- mem_type_id = H5I_BADID;
+ mem_type_id = H5I_INVALID_HID;
ret_val = 0;
@@ -267,9 +267,9 @@ herr_t
H5TBappend_records(hid_t loc_id, const char *dset_name, hsize_t nrecords, size_t type_size,
const size_t *field_offset, const size_t *field_sizes, const void *buf)
{
- hid_t did = H5I_BADID;
- hid_t tid = H5I_BADID;
- hid_t mem_type_id = H5I_BADID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t mem_type_id = H5I_INVALID_HID;
hsize_t nrecords_orig;
hsize_t nfields;
herr_t ret_val = -1;
@@ -332,11 +332,11 @@ herr_t
H5TBwrite_records(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nrecords, size_t type_size,
const size_t *field_offset, const size_t *field_sizes, const void *buf)
{
- hid_t did = H5I_BADID;
- hid_t tid = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
- hid_t mem_type_id = H5I_BADID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t m_sid = H5I_INVALID_HID;
+ hid_t mem_type_id = H5I_INVALID_HID;
hsize_t count[1];
hsize_t offset[1];
hsize_t mem_size[1];
@@ -425,14 +425,14 @@ H5TBwrite_fields_name(hid_t loc_id, const char *dset_name, const char *field_nam
hsize_t nrecords, size_t type_size, const size_t *field_offset,
const size_t *field_sizes, const void *buf)
{
- hid_t did = H5I_BADID;
- hid_t tid = H5I_BADID;
- hid_t write_type_id = H5I_BADID;
- hid_t member_type_id = H5I_BADID;
- hid_t nmtype_id = H5I_BADID;
- hid_t m_sid = H5I_BADID;
- hid_t file_space_id = H5I_BADID;
- hid_t preserve_id = H5I_BADID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t write_type_id = H5I_INVALID_HID;
+ hid_t member_type_id = H5I_INVALID_HID;
+ hid_t nmtype_id = H5I_INVALID_HID;
+ hid_t m_sid = H5I_INVALID_HID;
+ hid_t file_space_id = H5I_INVALID_HID;
+ hid_t preserve_id = H5I_INVALID_HID;
hssize_t nfields;
hssize_t i, j;
hsize_t count[1];
@@ -510,10 +510,10 @@ H5TBwrite_fields_name(hid_t loc_id, const char *dset_name, const char *field_nam
/* close */
if (H5Tclose(member_type_id) < 0)
goto out;
- member_type_id = H5I_BADID;
+ member_type_id = H5I_INVALID_HID;
if (H5Tclose(nmtype_id) < 0)
goto out;
- nmtype_id = H5I_BADID;
+ nmtype_id = H5I_INVALID_HID;
} /* end if */
H5free_memory(member_name);
@@ -583,14 +583,14 @@ H5TBwrite_fields_index(hid_t loc_id, const char *dset_name, hsize_t nfields, con
hsize_t start, hsize_t nrecords, size_t type_size, const size_t *field_offset,
const size_t *field_sizes, const void *buf)
{
- hid_t did = H5I_BADID;
- hid_t tid = H5I_BADID;
- hid_t write_type_id = H5I_BADID;
- hid_t member_type_id = H5I_BADID;
- hid_t nmtype_id = H5I_BADID;
- hid_t m_sid = H5I_BADID;
- hid_t file_space_id = H5I_BADID;
- hid_t preserve_id = H5I_BADID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t write_type_id = H5I_INVALID_HID;
+ hid_t member_type_id = H5I_INVALID_HID;
+ hid_t nmtype_id = H5I_INVALID_HID;
+ hid_t m_sid = H5I_INVALID_HID;
+ hid_t file_space_id = H5I_INVALID_HID;
+ hid_t preserve_id = H5I_INVALID_HID;
hsize_t count[1];
hsize_t offset[1];
hsize_t i;
@@ -663,10 +663,10 @@ H5TBwrite_fields_index(hid_t loc_id, const char *dset_name, hsize_t nfields, con
/* close */
if (H5Tclose(member_type_id) < 0)
goto out;
- member_type_id = H5I_BADID;
+ member_type_id = H5I_INVALID_HID;
if (H5Tclose(nmtype_id) < 0)
goto out;
- nmtype_id = H5I_BADID;
+ nmtype_id = H5I_INVALID_HID;
H5free_memory(member_name);
member_name = NULL;
@@ -747,10 +747,10 @@ herr_t
H5TBread_table(hid_t loc_id, const char *dset_name, size_t type_size, const size_t *field_offset,
const size_t *field_sizes, void *dst_buf)
{
- hid_t did = H5I_BADID;
- hid_t ftype_id = H5I_BADID;
- hid_t mem_type_id = H5I_BADID;
- hid_t sid = H5I_BADID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t ftype_id = H5I_INVALID_HID;
+ hid_t mem_type_id = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dims[1];
herr_t ret_val = -1;
@@ -820,9 +820,9 @@ herr_t
H5TBread_records(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nrecords, size_t type_size,
const size_t *field_offset, const size_t *field_sizes, void *buf)
{
- hid_t did = H5I_BADID;
- hid_t ftype_id = H5I_BADID;
- hid_t mem_type_id = H5I_BADID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t ftype_id = H5I_INVALID_HID;
+ hid_t mem_type_id = H5I_INVALID_HID;
hsize_t nrecords_orig;
hsize_t nfields;
herr_t ret_val = -1;
@@ -887,13 +887,13 @@ H5TBread_fields_name(hid_t loc_id, const char *dset_name, const char *field_name
hsize_t nrecords, size_t type_size, const size_t *field_offset,
const size_t *field_sizes, void *buf)
{
- hid_t did = H5I_BADID;
- hid_t ftype_id = H5I_BADID;
- hid_t mem_type_id = H5I_BADID;
- hid_t mtype_id = H5I_BADID;
- hid_t nmtype_id = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t ftype_id = H5I_INVALID_HID;
+ hid_t mem_type_id = H5I_INVALID_HID;
+ hid_t mtype_id = H5I_INVALID_HID;
+ hid_t nmtype_id = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t m_sid = H5I_INVALID_HID;
hssize_t nfields;
hsize_t count[1];
hsize_t offset[1];
@@ -960,10 +960,10 @@ H5TBread_fields_name(hid_t loc_id, const char *dset_name, const char *field_name
/* close */
if (H5Tclose(mtype_id) < 0)
goto out;
- mtype_id = H5I_BADID;
+ mtype_id = H5I_INVALID_HID;
if (H5Tclose(nmtype_id) < 0)
goto out;
- nmtype_id = H5I_BADID;
+ nmtype_id = H5I_INVALID_HID;
j++;
} /* end if */
@@ -1044,13 +1044,13 @@ H5TBread_fields_index(hid_t loc_id, const char *dset_name, hsize_t nfields, cons
hsize_t start, hsize_t nrecords, size_t type_size, const size_t *field_offset,
const size_t *field_sizes, void *buf)
{
- hid_t did = H5I_BADID;
- hid_t tid = H5I_BADID;
- hid_t read_type_id = H5I_BADID;
- hid_t member_type_id = H5I_BADID;
- hid_t nmtype_id = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t read_type_id = H5I_INVALID_HID;
+ hid_t member_type_id = H5I_INVALID_HID;
+ hid_t nmtype_id = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t m_sid = H5I_INVALID_HID;
hsize_t count[1];
hsize_t offset[1];
hsize_t mem_size[1];
@@ -1117,10 +1117,10 @@ H5TBread_fields_index(hid_t loc_id, const char *dset_name, hsize_t nfields, cons
/* close the member type */
if (H5Tclose(member_type_id) < 0)
goto out;
- member_type_id = H5I_BADID;
+ member_type_id = H5I_INVALID_HID;
if (H5Tclose(nmtype_id) < 0)
goto out;
- nmtype_id = H5I_BADID;
+ nmtype_id = H5I_INVALID_HID;
H5free_memory(member_name);
member_name = NULL;
@@ -1198,11 +1198,11 @@ out:
herr_t
H5TBdelete_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nrecords)
{
- hid_t did = H5I_BADID;
- hid_t tid = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
- hid_t mem_type_id = H5I_BADID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t m_sid = H5I_INVALID_HID;
+ hid_t mem_type_id = H5I_INVALID_HID;
hsize_t nfields;
hsize_t ntotal_records;
hsize_t read_start;
@@ -1294,16 +1294,16 @@ H5TBdelete_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nr
/* close */
if (H5Sclose(m_sid) < 0)
goto out;
- m_sid = H5I_BADID;
+ m_sid = H5I_INVALID_HID;
if (H5Tclose(mem_type_id) < 0)
goto out;
- mem_type_id = H5I_BADID;
+ mem_type_id = H5I_INVALID_HID;
if (H5Sclose(sid) < 0)
goto out;
- sid = H5I_BADID;
+ sid = H5I_INVALID_HID;
if (H5Tclose(tid) < 0)
goto out;
- tid = H5I_BADID;
+ tid = H5I_INVALID_HID;
} /* read_nrecords */
/*-------------------------------------------------------------------------
@@ -1361,11 +1361,11 @@ herr_t
H5TBinsert_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nrecords, size_t type_size,
const size_t *field_offset, const size_t *field_sizes, void *buf)
{
- hid_t did = H5I_BADID;
- hid_t tid = H5I_BADID;
- hid_t mem_type_id = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t mem_type_id = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t m_sid = H5I_INVALID_HID;
hsize_t nfields;
hsize_t ntotal_records;
hsize_t read_nrecords;
@@ -1442,10 +1442,10 @@ H5TBinsert_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nr
/* terminate access to the dataspace */
if (H5Sclose(m_sid) < 0)
goto out;
- m_sid = H5I_BADID;
+ m_sid = H5I_INVALID_HID;
if (H5Sclose(sid) < 0)
goto out;
- sid = H5I_BADID;
+ sid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* write the "pushed down" records
@@ -1513,10 +1513,10 @@ herr_t
H5TBadd_records_from(hid_t loc_id, const char *dset_name1, hsize_t start1, hsize_t nrecords,
const char *dset_name2, hsize_t start2)
{
- hid_t did = H5I_BADID;
- hid_t tid = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t m_sid = H5I_INVALID_HID;
hsize_t count[1];
hsize_t offset[1];
hsize_t mem_size[1];
@@ -1643,24 +1643,24 @@ H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const c
const char *dset_name3)
{
/* identifiers for the 1st dataset. */
- hid_t did_1 = H5I_BADID;
- hid_t tid_1 = H5I_BADID;
- hid_t sid_1 = H5I_BADID;
- hid_t pid_1 = H5I_BADID;
+ hid_t did_1 = H5I_INVALID_HID;
+ hid_t tid_1 = H5I_INVALID_HID;
+ hid_t sid_1 = H5I_INVALID_HID;
+ hid_t pid_1 = H5I_INVALID_HID;
/* identifiers for the 2nd dataset. */
- hid_t did_2 = H5I_BADID;
- hid_t tid_2 = H5I_BADID;
- hid_t sid_2 = H5I_BADID;
- hid_t pid_2 = H5I_BADID;
+ hid_t did_2 = H5I_INVALID_HID;
+ hid_t tid_2 = H5I_INVALID_HID;
+ hid_t sid_2 = H5I_INVALID_HID;
+ hid_t pid_2 = H5I_INVALID_HID;
/* identifiers for the 3rd dataset. */
- hid_t did_3 = H5I_BADID;
- hid_t tid_3 = H5I_BADID;
- hid_t sid_3 = H5I_BADID;
- hid_t pid_3 = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
- hid_t member_type_id = H5I_BADID;
- hid_t attr_id = H5I_BADID;
+ hid_t did_3 = H5I_INVALID_HID;
+ hid_t tid_3 = H5I_INVALID_HID;
+ hid_t sid_3 = H5I_INVALID_HID;
+ hid_t pid_3 = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t m_sid = H5I_INVALID_HID;
+ hid_t member_type_id = H5I_INVALID_HID;
+ hid_t attr_id = H5I_INVALID_HID;
hsize_t count[1];
hsize_t offset[1];
hsize_t mem_size[1];
@@ -1807,17 +1807,17 @@ H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const c
if (H5Aclose(attr_id) < 0)
goto out;
- attr_id = H5I_BADID;
+ attr_id = H5I_INVALID_HID;
if (H5Tclose(member_type_id) < 0)
goto out;
- member_type_id = H5I_BADID;
+ member_type_id = H5I_INVALID_HID;
} /* end for */
/* close data space. */
if (H5Sclose(sid) < 0)
goto out;
- sid = H5I_BADID;
+ sid = H5I_INVALID_HID;
} /* end if */
/*-------------------------------------------------------------------------
@@ -1856,7 +1856,7 @@ H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const c
*/
if (H5Sclose(m_sid) < 0)
goto out;
- m_sid = H5I_BADID;
+ m_sid = H5I_INVALID_HID;
HDfree(tmp_buf);
tmp_buf = NULL;
@@ -1999,25 +1999,25 @@ H5TBinsert_field(hid_t loc_id, const char *dset_name, const char *field_name, hi
hsize_t position, const void *fill_data, const void *buf)
{
/* identifiers for the 1st, original dataset */
- hid_t did_1 = H5I_BADID;
- hid_t tid_1 = H5I_BADID;
- hid_t sid_1 = H5I_BADID;
- hid_t pid_1 = H5I_BADID;
- hid_t msid_1 = H5I_BADID;
+ hid_t did_1 = H5I_INVALID_HID;
+ hid_t tid_1 = H5I_INVALID_HID;
+ hid_t sid_1 = H5I_INVALID_HID;
+ hid_t pid_1 = H5I_INVALID_HID;
+ hid_t msid_1 = H5I_INVALID_HID;
/* identifiers for the 2nd, new dataset */
- hid_t did_2 = H5I_BADID;
- hid_t tid_2 = H5I_BADID;
- hid_t sid_2 = H5I_BADID;
- hid_t pid_2 = H5I_BADID;
- hid_t msid_2 = H5I_BADID;
+ hid_t did_2 = H5I_INVALID_HID;
+ hid_t tid_2 = H5I_INVALID_HID;
+ hid_t sid_2 = H5I_INVALID_HID;
+ hid_t pid_2 = H5I_INVALID_HID;
+ hid_t msid_2 = H5I_INVALID_HID;
/* identifiers for the 3rd, final dataset */
- hid_t did_3 = H5I_BADID;
- hid_t tid_3 = H5I_BADID;
- hid_t sid_3 = H5I_BADID;
- hid_t member_type_id = H5I_BADID;
- hid_t write_type_id = H5I_BADID;
- hid_t preserve_id = H5I_BADID;
- hid_t attr_id = H5I_BADID;
+ hid_t did_3 = H5I_INVALID_HID;
+ hid_t tid_3 = H5I_INVALID_HID;
+ hid_t sid_3 = H5I_INVALID_HID;
+ hid_t member_type_id = H5I_INVALID_HID;
+ hid_t write_type_id = H5I_INVALID_HID;
+ hid_t preserve_id = H5I_INVALID_HID;
+ hid_t attr_id = H5I_INVALID_HID;
size_t member_size;
size_t new_member_size = 0;
size_t total_size;
@@ -2157,7 +2157,7 @@ H5TBinsert_field(hid_t loc_id, const char *dset_name, const char *field_name, hi
/* close the member type */
if (H5Tclose(member_type_id) < 0)
goto out;
- member_type_id = H5I_BADID;
+ member_type_id = H5I_INVALID_HID;
} /* end else */
} /* end for */
@@ -2307,12 +2307,12 @@ H5TBinsert_field(hid_t loc_id, const char *dset_name, const char *field_name, hi
if (H5Aclose(attr_id) < 0)
goto out;
- attr_id = H5I_BADID;
+ attr_id = H5I_INVALID_HID;
/* close the member type */
if (H5Tclose(member_type_id) < 0)
goto out;
- member_type_id = H5I_BADID;
+ member_type_id = H5I_INVALID_HID;
} /* end for */
/*-------------------------------------------------------------------------
@@ -2334,11 +2334,11 @@ H5TBinsert_field(hid_t loc_id, const char *dset_name, const char *field_name, hi
if (H5Aclose(attr_id) < 0)
goto out;
- attr_id = H5I_BADID;
+ attr_id = H5I_INVALID_HID;
if (H5Tclose(member_type_id) < 0)
goto out;
- member_type_id = H5I_BADID;
+ member_type_id = H5I_INVALID_HID;
} /* end fill_data */
ret_val = 0;
@@ -2415,23 +2415,23 @@ herr_t
H5TBdelete_field(hid_t loc_id, const char *dset_name, const char *field_name)
{
/* identifiers for the 1st original dataset */
- hid_t did_1 = H5I_BADID;
- hid_t tid_1 = H5I_BADID;
- hid_t sid_1 = H5I_BADID;
- hid_t pid_1 = H5I_BADID;
+ hid_t did_1 = H5I_INVALID_HID;
+ hid_t tid_1 = H5I_INVALID_HID;
+ hid_t sid_1 = H5I_INVALID_HID;
+ hid_t pid_1 = H5I_INVALID_HID;
/* identifiers for the 2nd new dataset */
- hid_t did_2 = H5I_BADID;
- hid_t tid_2 = H5I_BADID;
- hid_t sid_2 = H5I_BADID;
- hid_t pid_2 = H5I_BADID;
+ hid_t did_2 = H5I_INVALID_HID;
+ hid_t tid_2 = H5I_INVALID_HID;
+ hid_t sid_2 = H5I_INVALID_HID;
+ hid_t pid_2 = H5I_INVALID_HID;
/* identifiers for the 3rd final dataset */
- hid_t did_3 = H5I_BADID;
- hid_t tid_3 = H5I_BADID;
- hid_t member_type_id = H5I_BADID;
- hid_t preserve_id = H5I_BADID;
- hid_t read_type_id = H5I_BADID;
- hid_t write_type_id = H5I_BADID;
- hid_t attr_id = H5I_BADID;
+ hid_t did_3 = H5I_INVALID_HID;
+ hid_t tid_3 = H5I_INVALID_HID;
+ hid_t member_type_id = H5I_INVALID_HID;
+ hid_t preserve_id = H5I_INVALID_HID;
+ hid_t read_type_id = H5I_INVALID_HID;
+ hid_t write_type_id = H5I_INVALID_HID;
+ hid_t attr_id = H5I_INVALID_HID;
size_t member_size;
size_t type_size1;
size_t type_size2;
@@ -2515,7 +2515,7 @@ H5TBdelete_field(hid_t loc_id, const char *dset_name, const char *field_name)
/* close the member type */
if (H5Tclose(member_type_id) < 0)
goto out;
- member_type_id = H5I_BADID;
+ member_type_id = H5I_INVALID_HID;
H5free_memory(member_name);
member_name = NULL;
@@ -2598,7 +2598,7 @@ H5TBdelete_field(hid_t loc_id, const char *dset_name, const char *field_name)
/* close the member type */
if (H5Tclose(member_type_id) < 0)
goto out;
- member_type_id = H5I_BADID;
+ member_type_id = H5I_INVALID_HID;
} /* end if */
H5free_memory(member_name);
@@ -2682,22 +2682,22 @@ H5TBdelete_field(hid_t loc_id, const char *dset_name, const char *field_name)
/* end access to the property list */
if (H5Pclose(preserve_id) < 0)
goto out;
- preserve_id = H5I_BADID;
+ preserve_id = H5I_INVALID_HID;
/* close the member type */
if (H5Tclose(member_type_id) < 0)
goto out;
- member_type_id = H5I_BADID;
+ member_type_id = H5I_INVALID_HID;
/* close the read type */
if (H5Tclose(read_type_id) < 0)
goto out;
- read_type_id = H5I_BADID;
+ read_type_id = H5I_INVALID_HID;
/* close the write type */
if (H5Tclose(write_type_id) < 0)
goto out;
- write_type_id = H5I_BADID;
+ write_type_id = H5I_INVALID_HID;
HDfree(tmp_buf);
tmp_buf = NULL;
@@ -2769,18 +2769,18 @@ H5TBdelete_field(hid_t loc_id, const char *dset_name, const char *field_name)
if (H5Aclose(attr_id) < 0)
goto out;
- attr_id = H5I_BADID;
+ attr_id = H5I_INVALID_HID;
/* close the member type */
if (H5Tclose(member_type_id) < 0)
goto out;
- member_type_id = H5I_BADID;
+ member_type_id = H5I_INVALID_HID;
} /* end for */
/* close data space. */
if (H5Sclose(sid_1) < 0)
goto out;
- sid_1 = H5I_BADID;
+ sid_1 = H5I_INVALID_HID;
} /* end if */
ret_val = 0;
@@ -2962,9 +2962,9 @@ out:
herr_t
H5TBget_table_info(hid_t loc_id, const char *dset_name, hsize_t *nfields, hsize_t *nrecords)
{
- hid_t tid = H5I_BADID;
- hid_t sid = H5I_BADID;
- hid_t did = H5I_BADID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
hsize_t dims[1];
int num_members;
herr_t ret_val = -1;
@@ -3008,7 +3008,7 @@ H5TBget_table_info(hid_t loc_id, const char *dset_name, hsize_t *nfields, hsize_
/* terminate access to the dataspace */
if (H5Sclose(sid) < 0)
goto out;
- sid = H5I_BADID;
+ sid = H5I_INVALID_HID;
*nrecords = dims[0];
} /* end if */
@@ -3048,11 +3048,11 @@ herr_t
H5TBget_field_info(hid_t loc_id, const char *dset_name, char *field_names[], size_t *field_sizes,
size_t *field_offsets, size_t *type_size)
{
- hid_t did = H5I_BADID; /* dataset ID */
- hid_t tid = H5I_BADID; /* file type ID */
- hid_t n_tid = H5I_BADID; /* native type ID */
- hid_t m_tid = H5I_BADID; /* member type ID */
- hid_t nm_tid = H5I_BADID; /* native member ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t tid = H5I_INVALID_HID; /* file type ID */
+ hid_t n_tid = H5I_INVALID_HID; /* native type ID */
+ hid_t m_tid = H5I_INVALID_HID; /* member type ID */
+ hid_t nm_tid = H5I_INVALID_HID; /* native member ID */
hssize_t nfields;
hssize_t i;
herr_t ret_val = -1;
@@ -3111,10 +3111,10 @@ H5TBget_field_info(hid_t loc_id, const char *dset_name, char *field_names[], siz
/* close the member types */
if (H5Tclose(m_tid) < 0)
goto out;
- m_tid = H5I_BADID;
+ m_tid = H5I_INVALID_HID;
if (H5Tclose(nm_tid) < 0)
goto out;
- nm_tid = H5I_BADID;
+ nm_tid = H5I_INVALID_HID;
} /* end for */
ret_val = 0;
@@ -3267,9 +3267,9 @@ static hid_t
H5TB_create_type(hid_t loc_id, const char *dset_name, size_t type_size, const size_t *field_offset,
const size_t *field_sizes, hid_t ftype_id)
{
- hid_t mem_type_id = H5I_BADID;
- hid_t mtype_id = H5I_BADID;
- hid_t nmtype_id = H5I_BADID;
+ hid_t mem_type_id = H5I_INVALID_HID;
+ hid_t mtype_id = H5I_INVALID_HID;
+ hid_t nmtype_id = H5I_INVALID_HID;
size_t size_native;
hsize_t nfields = 0;
char ** fnames = NULL;
@@ -3310,10 +3310,10 @@ H5TB_create_type(hid_t loc_id, const char *dset_name, size_t type_size, const si
goto out;
if (H5Tclose(mtype_id) < 0)
goto out;
- mtype_id = H5I_BADID;
+ mtype_id = H5I_INVALID_HID;
if (H5Tclose(nmtype_id) < 0)
goto out;
- nmtype_id = H5I_BADID;
+ nmtype_id = H5I_INVALID_HID;
} /* end for */
ret_val = mem_type_id;
@@ -3364,8 +3364,8 @@ herr_t
H5TB_common_append_records(hid_t dataset_id, hid_t mem_type_id, size_t nrecords, hsize_t orig_table_size,
const void *buf)
{
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t m_sid = H5I_INVALID_HID;
hsize_t count[1];
hsize_t offset[1];
hsize_t dims[1];
@@ -3429,8 +3429,8 @@ herr_t
H5TB_common_read_records(hid_t dataset_id, hid_t mem_type_id, hsize_t start, size_t nrecords,
hsize_t table_size, void *buf)
{
- hid_t sid = H5I_BADID;
- hid_t m_sid = H5I_BADID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t m_sid = H5I_INVALID_HID;
hsize_t count[1];
hsize_t offset[1];
hsize_t mem_size[1];
diff --git a/hl/test/test_image.c b/hl/test/test_image.c
index 0c7d511..dc1be96 100644
--- a/hl/test/test_image.c
+++ b/hl/test/test_image.c
@@ -650,10 +650,10 @@ test_generate(void)
HL_TESTING2("make indexed image from land data");
for (i = 0; i < n_elements; i++) {
- if (data[i] < 0)
+ if (data[i] < 0.0f)
image_data[i] = 0;
else
- image_data[i] = (unsigned char)((255 * (data[i])) / xmax);
+ image_data[i] = (unsigned char)((255 * data[i]) / xmax);
}
/* make the image */
@@ -671,10 +671,11 @@ test_generate(void)
HL_TESTING2("make indexed image from sea data");
for (i = 0; i < n_elements; i++) {
- if (data[i] > 0)
+ if (data[i] > 0.0f)
image_data[i] = 0;
- else
- image_data[i] = (unsigned char)((255 * (data[i] - xmin)) / xmin);
+ else {
+ image_data[i] = (unsigned char)((255.0f * (data[i] - xmin)) / (xmax - xmin));
+ }
}
/* make the image */
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c1e15bc..ea346b0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1009,8 +1009,7 @@ set (H5_PUBLIC_GENERATED_HEADERS
option (HDF5_GENERATE_HEADERS "Rebuild Generated Files" ON)
if (HDF5_GENERATE_HEADERS)
set_source_files_properties(${H5_GENERATED_HEADERS} PROPERTIES GENERATED TRUE)
- find_package (Perl)
- if (PERL_FOUND)
+ if (H5_PERL_FOUND)
execute_process (
COMMAND ${PERL_EXECUTABLE} ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SRC_DIR}/H5err.txt OUTPUT_VARIABLE SCRIPT_OUTPUT
)
@@ -1063,6 +1062,7 @@ if (LOCAL_BATCH_TEST)
endif ()
endif ()
+set (lib_prog_deps)
if (NOT EXISTS "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c")
add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c)
target_include_directories (H5detect PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
@@ -1070,8 +1070,11 @@ if (NOT EXISTS "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c")
TARGET_C_PROPERTIES (H5detect STATIC)
target_link_libraries (H5detect
PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib>
- PRIVATE $<$<PLATFORM_ID:Emscripten>:"-O0">
)
+ target_compile_options(H5detect
+ PRIVATE "$<$<PLATFORM_ID:Emscripten>:-O0>"
+ )
+ set (lib_prog_deps ${lib_prog_deps} H5detect)
if (HDF5_BATCH_H5DETECT)
configure_file (
@@ -1079,77 +1082,68 @@ if (NOT EXISTS "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c")
${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT} ESCAPE_QUOTES @ONLY
)
add_custom_command (
- OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
- ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
- COMMAND ${HDF5_BATCH_CMD}
- ARGS ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT}
- COMMAND ${CMAKE_COMMAND}
- ARGS -E echo "Executed batch command to create H5Tinit.c"
+ OUTPUT gen_SRCS.stamp1
+ COMMAND ${HDF5_BATCH_CMD}
+ ARGS ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT}
+ BYPRODUCTS H5Tinit.c gen_SRCS.stamp1
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E echo "Executed batch command to create H5Tinit.c"
COMMAND ${CMAKE_COMMAND}
- ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
+ ARGS -E touch gen_SRCS.stamp1
DEPENDS H5detect
WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
)
add_custom_target (gen_H5Tinit
COMMAND ${CMAKE_COMMAND} -P ${HDF5_SOURCE_DIR}/config/cmake/wait_H5Tinit.cmake
)
- if (BUILD_SHARED_LIBS)
- add_custom_command (
- OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
- ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c"
- COMMAND ${CMAKE_COMMAND}
- ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
- DEPENDS gen_H5Tinit ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit_created
- WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
- )
- set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE)
- endif ()
+ set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE)
else ()
- add_custom_command (
- OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
- ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5detect>
- ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ add_custom_command (TARGET H5detect POST_BUILD
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5detect>
+ ARGS H5Tinit.c
+ BYPRODUCTS H5Tinit.c gen_SRCS.stamp1
COMMAND ${CMAKE_COMMAND}
- ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
+ ARGS -E touch gen_SRCS.stamp1
DEPENDS H5detect
WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
+ COMMENT "Create H5Tinit.c"
)
+ set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE)
if (BUILD_SHARED_LIBS)
- add_custom_command (
- OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
- ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
+ add_custom_command (TARGET H5detect POST_BUILD
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c"
+ ARGS -E copy_if_different H5Tinit.c shared/H5Tinit.c
+ BYPRODUCTS shared/H5Tinit.c shared/shared_gen_SRCS.stamp1
COMMAND ${CMAKE_COMMAND}
- ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
- DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ ARGS -E touch shared/shared_gen_SRCS.stamp1
+ DEPENDS H5detect H5Tinit.c
WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
+ COMMENT "Copy H5Tinit.c to shared folder"
)
set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE)
endif ()
endif ()
- set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE)
else ()
add_custom_command (
- OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
+ OUTPUT gen_SRCS.stamp1
COMMAND ${CMAKE_COMMAND}
- ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
- DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ ARGS -E touch gen_SRCS.stamp1
+ DEPENDS H5Tinit.c
WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
+ COMMENT "Touch existing H5Tinit.c"
)
+ set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE)
if (BUILD_SHARED_LIBS)
add_custom_command (
- OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
- ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
+ OUTPUT shared/shared_gen_SRCS.stamp1
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c"
+ ARGS -E copy_if_different H5Tinit.c shared/H5Tinit.c
+ BYPRODUCTS shared/H5Tinit.c shared/shared_gen_SRCS.stamp1
COMMAND ${CMAKE_COMMAND}
- ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
- DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ ARGS -E touch shared/shared_gen_SRCS.stamp1
+ DEPENDS H5Tinit.c
WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
+ COMMENT "Copy existing H5Tinit.c to shared folder"
)
set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE)
endif ()
@@ -1168,8 +1162,11 @@ target_compile_definitions(H5make_libsettings PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_
TARGET_C_PROPERTIES (H5make_libsettings STATIC)
target_link_libraries (H5make_libsettings
PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib>
- PRIVATE $<$<PLATFORM_ID:Emscripten>:"-O0">
)
+target_compile_options(H5make_libsettings
+ PRIVATE "$<$<PLATFORM_ID:Emscripten>:-O0>"
+)
+set (lib_prog_deps ${lib_prog_deps} H5make_libsettings)
#-----------------------------------------------------------------------------
# Add Target to clang-format
@@ -1178,27 +1175,27 @@ if (HDF5_ENABLE_FORMATTERS)
clang_format (HDF5_SRC_LIBSETTINGS_FORMAT H5make_libsettings)
endif ()
-add_custom_command (
- OUTPUT ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c
- ${HDF5_SRC_BINARY_DIR}/gen_SRCS.stamp2
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5make_libsettings>
- ARGS ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c
+add_custom_command (TARGET H5make_libsettings POST_BUILD
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5make_libsettings>
+ ARGS H5lib_settings.c
+ BYPRODUCTS H5lib_settings.c gen_SRCS.stamp2
COMMAND ${CMAKE_COMMAND}
- ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp2
+ ARGS -E touch gen_SRCS.stamp2
DEPENDS H5make_libsettings
WORKING_DIRECTORY ${HDF5_SRC_BINARY_DIR}
+ COMMENT "Create H5lib_settings.c"
)
set_source_files_properties (${HDF5_SRC_BINARY_DIR}/H5lib_settings.c PROPERTIES GENERATED TRUE)
if (BUILD_SHARED_LIBS)
- add_custom_command (
- OUTPUT ${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c
- ${HDF5_SRC_BINARY_DIR}/shared/shared_gen_SRCS.stamp2
+ add_custom_command (TARGET H5make_libsettings POST_BUILD
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "${HDF5_SRC_BINARY_DIR}/H5lib_settings.c" "${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c"
+ ARGS -E copy_if_different H5lib_settings.c shared/H5lib_settings.c
+ BYPRODUCTS shared/H5lib_settings.c shared/shared_gen_SRCS.stamp2
COMMAND ${CMAKE_COMMAND}
- ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp2
- DEPENDS ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c
+ ARGS -E touch shared/shared_gen_SRCS.stamp2
+ DEPENDS H5make_libsettings H5lib_settings.c
WORKING_DIRECTORY ${HDF5_SRC_BINARY_DIR}
+ COMMENT "Copy H5lib_settings.c to shared folder"
)
set_source_files_properties (${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c PROPERTIES GENERATED TRUE)
endif ()
@@ -1212,7 +1209,10 @@ option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
#-----------------------------------------------------------------------------
if (NOT ONLY_SHARED_LIBS)
set (gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c)
- add_custom_target (gen_${HDF5_LIB_TARGET} ALL DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp2)
+ add_custom_target (gen_${HDF5_LIB_TARGET} ALL
+ DEPENDS ${lib_prog_deps} ${gen_SRCS} ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 ${HDF5_SRC_BINARY_DIR}/gen_SRCS.stamp2
+ COMMENT "Generation target files"
+ )
add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${H5_MODULE_HEADERS})
target_include_directories (${HDF5_LIB_TARGET}
@@ -1248,7 +1248,10 @@ endif ()
if (BUILD_SHARED_LIBS)
set (shared_gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c ${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c)
- add_custom_target (gen_${HDF5_LIBSH_TARGET} ALL DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp2)
+ add_custom_target (gen_${HDF5_LIBSH_TARGET} ALL
+ DEPENDS ${lib_prog_deps} ${shared_gen_SRCS} ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 ${HDF5_SRC_BINARY_DIR}/shared/shared_gen_SRCS.stamp2
+ COMMENT "Shared generation target files"
+ )
add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${H5_MODULE_HEADERS})
target_include_directories (${HDF5_LIBSH_TARGET}
@@ -1367,7 +1370,11 @@ install (
)
if (NOT WIN32)
- set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER})
+ if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)
+ set (_PKG_CONFIG_COMPILER ${MPI_C_COMPILER})
+ else ()
+ set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER})
+ endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5cc
@@ -1379,4 +1386,18 @@ if (NOT WIN32)
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
COMPONENT libraries
)
+ if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)
+ #legacy requires a different name
+ configure_file (
+ ${HDF_RESOURCES_DIR}/libh5cc.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/h5pcc
+ @ONLY
+ )
+ install (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/h5pcc
+ DESTINATION ${HDF5_INSTALL_BIN_DIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ COMPONENT libraries
+ )
+ endif ()
endif ()
diff --git a/src/H5.c b/src/H5.c
index 06332fa..62ea257 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -411,6 +411,7 @@ H5_term_library(void)
*/
if (pending == 0) {
pending += DOWN(AC);
+ /* Shut down the "pluggable" interfaces, before the plugin framework */
pending += DOWN(Z);
pending += DOWN(FD);
pending += DOWN(VL);
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index def070f..5b4302e 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -547,6 +547,7 @@ if (HDF5_ENABLE_FORMATTERS)
clang_format (HDF5_TEST_mirror_vfd_FORMAT mirror_vfd)
endif ()
+
##############################################################################
### A D D I T I O N A L T E S T S ###
##############################################################################
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index dfab713..e5ad962 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -888,8 +888,7 @@ if (ENABLE_EXTENDED_TESTS)
#-- Adding test for flushrefresh
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/flushrefresh_test")
- find_package (Perl)
- if (PERL_FOUND)
+ if (H5_PERL_FOUND)
add_test (
NAME H5TEST-testflushrefresh-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove flushrefresh.h5
diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake
index 4676184..b28bbd6 100644
--- a/test/ShellTests.cmake
+++ b/test/ShellTests.cmake
@@ -23,8 +23,7 @@ if (UNIX)
##############################################################################
# configure scripts to test dir
##############################################################################
- find_package (Perl)
- if (PERL_FOUND)
+ if (H5_PERL_FOUND)
configure_file(${HDF5_TEST_SOURCE_DIR}/testflushrefresh.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testflushrefresh.sh @ONLY)
endif ()
configure_file(${HDF5_TEST_SOURCE_DIR}/test_usecases.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_usecases.sh @ONLY)
@@ -198,18 +197,22 @@ if (UNIX)
# testvdsswmr.sh: vds_swmr*
add_test (H5SHELL-testflushrefresh ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testflushrefresh.sh)
set_tests_properties (H5SHELL-testflushrefresh PROPERTIES
+ ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
add_test (H5SHELL-test_usecases ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_usecases.sh)
set_tests_properties (H5SHELL-test_usecases PROPERTIES
+ ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
add_test (H5SHELL-testswmr ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testswmr.sh)
set_tests_properties (H5SHELL-testswmr PROPERTIES
+ ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
add_test (H5SHELL-testvdsswmr ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testvdsswmr.sh)
set_tests_properties (H5SHELL-testvdsswmr PROPERTIES
+ ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
diff --git a/testpar/CMakeVFDTests.cmake b/testpar/CMakeVFDTests.cmake
index 32f9337..5fac4ea 100644
--- a/testpar/CMakeVFDTests.cmake
+++ b/testpar/CMakeVFDTests.cmake
@@ -58,9 +58,9 @@ macro (ADD_VFD_TEST vfdname resultcode)
WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}/${vfdname}
)
endforeach ()
- set_tests_properties (MPI_TEST_VFD-${vfdname}-pflush1 PROPERTIES WILL_FAIL "true")
+ set_tests_properties (MPI_TEST_VFD-${vfdname}-t_pflush1 PROPERTIES WILL_FAIL "true")
#set_property (TEST MPI_TEST_t_pflush1 PROPERTY PASS_REGULAR_EXPRESSION "PASSED")
- set_tests_properties (MPI_TEST_VFD-${vfdname}-pflush2 PROPERTIES DEPENDS MPI_TEST_VFD-${vfdname}-pflush1)
+ set_tests_properties (MPI_TEST_VFD-${vfdname}-t_pflush2 PROPERTIES DEPENDS MPI_TEST_VFD-${vfdname}-t_pflush1)
endif ()
endmacro ()
diff --git a/tools/test/h5copy/testh5copy.sh.in b/tools/test/h5copy/testh5copy.sh.in
index 374e397..79b6fd5 100644
--- a/tools/test/h5copy/testh5copy.sh.in
+++ b/tools/test/h5copy/testh5copy.sh.in
@@ -13,7 +13,7 @@
#
# Tests for the h5copy tool
#
-# Pedro Vicente Nunes (pvn@hdfgroup.org), Albert Cheng (acheng@hdfgroup.org)
+# Pedro Vicente Nunes, Albert Cheng
# Thursday, July 20, 2006
#
@@ -200,6 +200,7 @@ TOOLTEST()
fi
runh5diff=no
fi
+
if [ "$3" = -o ]; then
outputfile=$4
else
@@ -219,6 +220,7 @@ TOOLTEST()
$RUNSERIAL $H5COPY_BIN $@
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -268,6 +270,7 @@ TOOLTEST_PREFILL()
$RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $grp_name -d $grp_name2
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -282,6 +285,7 @@ TOOLTEST_PREFILL()
$RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $obj_name -d $obj_name2
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -313,6 +317,7 @@ TOOLTEST_SAME()
else
runh5diff=no
fi
+
if [ "$3" = -o ]; then
outputfile=$4
else
@@ -330,6 +335,7 @@ TOOLTEST_SAME()
$RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $grp_name -d $grp_name
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -344,6 +350,7 @@ TOOLTEST_SAME()
$RUNSERIAL $H5COPY_BIN -i $outputfile -o $outputfile -v -s $grp_name -d $grp_name2
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -406,6 +413,7 @@ TOOLTEST_FAIL()
if [ "$1" = -i ]; then
inputfile=$2
fi
+
if [ "$3" = -o ]; then
outputfile=$4
fi
@@ -417,8 +425,8 @@ TOOLTEST_FAIL()
#echo "#############################"
$RUNSERIAL $H5COPY_BIN $@
) > $actualout 2> $actualerr
-
RET=$?
+
# save actualout and actualerr in case they are needed later.
cp $actualout $actualout_sav
STDOUT_FILTER $actualout
diff --git a/tools/test/h5diff/h5diff_plugin.sh.in b/tools/test/h5diff/h5diff_plugin.sh.in
index ff3d289..0ab169a 100644
--- a/tools/test/h5diff/h5diff_plugin.sh.in
+++ b/tools/test/h5diff/h5diff_plugin.sh.in
@@ -135,24 +135,24 @@ CLEAN_TESTFILES_AND_TESTDIR()
# -h print help page
while [ $# -gt 0 ]; do
case "$1" in
- -p) # reset the tool name and bin to run ph5diff tests
- TESTNAME=ph5diff
- H5DIFF=../../src/h5diff/ph5diff # The tool name
- H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary
- pmode=yes
- shift
- ;;
+ -p) # reset the tool name and bin to run ph5diff tests
+ TESTNAME=ph5diff
+ H5DIFF=../../src/h5diff/ph5diff # The tool name
+ H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary
+ pmode=yes
+ shift
+ ;;
-h) # print help page
- echo "$0 [-p] [-h]"
- echo " -p run ph5diff tests"
- echo " -h print help page"
- shift
- exit 0
- ;;
+ echo "$0 [-p] [-h]"
+ echo " -p run ph5diff tests"
+ echo " -h print help page"
+ shift
+ exit 0
+ ;;
*) # unknown option
echo "$0: Unknown option ($1)"
- exit 1
- ;;
+ exit 1
+ ;;
esac
done
@@ -218,19 +218,21 @@ TOOLTEST() {
# Run test.
TESTING $H5DIFF $@
(
- #echo "#############################"
- #echo "Expected output for '$H5DIFF $@'"
- #echo "#############################"
- cd $TESTDIR
- eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
+ #echo "#############################"
+ #echo "Expected output for '$H5DIFF $@'"
+ #echo "#############################"
+ cd $TESTDIR
+ eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
) >$actual 2>$actual_err
EXIT_CODE=$?
+
# save actual and actual_err in case they are needed later.
cp $actual $actual_sav
STDOUT_FILTER $actual
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
cat $actual_err >> $actual
+
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
@@ -260,27 +262,29 @@ TOOLTEST() {
actual_sorted=actual_sorted
sort $expect -o $expect_sorted
sort $actual -o $actual_sorted
+
# remove "EXIT CODE:" line from expect file. test for exit code
# is done by serial mode.
grep -v "EXIT CODE:" $expect_sorted > $expect_sorted.noexit
mv $expect_sorted.noexit $expect_sorted
- if $CMP $expect_sorted $actual_sorted; then
- echo " PASSED"
- else
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
- if test yes = "$verbose"; then
- echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
- $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
- echo "====The actual output ($actual_sav)"
- sed 's/^/ /' < $actual_sav
- echo "====The actual stderr ($actual_err_sav)"
- sed 's/^/ /' < $actual_err_sav
- echo "====End of actual stderr ($actual_err_sav)"
- echo ""
+
+ if $CMP $expect_sorted $actual_sorted; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ if test yes = "$verbose"; then
+ echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
+ $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
+ echo "====The actual output ($actual_sav)"
+ sed 's/^/ /' < $actual_sav
+ echo "====The actual stderr ($actual_err_sav)"
+ sed 's/^/ /' < $actual_err_sav
+ echo "====End of actual stderr ($actual_err_sav)"
+ echo ""
+ fi
fi
fi
- fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
@@ -306,18 +310,20 @@ TOOLTEST_ERR() {
# Run test.
TESTING $H5DIFF $@
(
- #echo "#############################"
- #echo "Expected output for '$H5DIFF $@'"
- #echo "#############################"
- cd $TESTDIR
- eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
+ #echo "#############################"
+ #echo "Expected output for '$H5DIFF $@'"
+ #echo "#############################"
+ cd $TESTDIR
+ eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
) >$actual 2>$actual_err
EXIT_CODE=$?
+
# save actual and actual_err in case they are needed later.
cp $actual $actual_sav
STDOUT_FILTER $actual
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
+
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
@@ -348,23 +354,24 @@ TOOLTEST_ERR() {
sort $expect_err -o $expect_sorted
sort $actual_err -o $actual_sorted
mv $expect_sorted.noexit $expect_sorted
- if $CMP $expect_sorted $actual_sorted; then
- echo " PASSED"
- else
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
- if test yes = "$verbose"; then
- echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
- $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
- echo "====The actual output ($actual_sav)"
- sed 's/^/ /' < $actual_sav
- echo "====The actual stderr ($actual_err_sav)"
- sed 's/^/ /' < $actual_err_sav
- echo "====End of actual stderr ($actual_err_sav)"
- echo ""
+
+ if $CMP $expect_sorted $actual_sorted; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ if test yes = "$verbose"; then
+ echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
+ $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
+ echo "====The actual output ($actual_sav)"
+ sed 's/^/ /' < $actual_sav
+ echo "====The actual stderr ($actual_err_sav)"
+ sed 's/^/ /' < $actual_err_sav
+ echo "====End of actual stderr ($actual_err_sav)"
+ echo ""
+ fi
fi
fi
- fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in
index ac02da2..c8f8ed2 100644
--- a/tools/test/h5diff/testh5diff.sh.in
+++ b/tools/test/h5diff/testh5diff.sh.in
@@ -500,18 +500,20 @@ TOOLTEST() {
# Run test.
TESTING $H5DIFF $@
(
- #echo "#############################"
- #echo "Expected output for '$H5DIFF $@'"
- #echo "#############################"
- cd $TESTDIR
- eval $RUNCMD $H5DIFF_BIN "$@"
+ #echo "#############################"
+ #echo "Expected output for '$H5DIFF $@'"
+ #echo "#############################"
+ cd $TESTDIR
+ eval $RUNCMD $H5DIFF_BIN "$@"
) >$actual 2>$actual_err
EXIT_CODE=$?
+
# save actual and actual_err in case they are needed later.
cp $actual $actual_sav
STDOUT_FILTER $actual
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
+
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
@@ -545,23 +547,24 @@ TOOLTEST() {
# is done by serial mode.
grep -v "EXIT CODE:" $expect_sorted > $expect_sorted.noexit
mv $expect_sorted.noexit $expect_sorted
- if $CMP $expect_sorted $actual_sorted; then
- echo " PASSED"
- else
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
- if test yes = "$verbose"; then
- echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
- $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
- echo "====The actual output ($actual_sav)"
- sed 's/^/ /' < $actual_sav
- echo "====The actual stderr ($actual_err_sav)"
- sed 's/^/ /' < $actual_err_sav
- echo "====End of actual stderr ($actual_err_sav)"
- echo ""
+
+ if $CMP $expect_sorted $actual_sorted; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ if test yes = "$verbose"; then
+ echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
+ $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
+ echo "====The actual output ($actual_sav)"
+ sed 's/^/ /' < $actual_sav
+ echo "====The actual stderr ($actual_err_sav)"
+ sed 's/^/ /' < $actual_err_sav
+ echo "====End of actual stderr ($actual_err_sav)"
+ echo ""
+ fi
fi
fi
- fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
@@ -1199,6 +1202,11 @@ TOOLTEST h5diff_800.txt -v h5diff_dset1.h5 h5diff_dset2.h5 /g1/array /g1/array
TOOLTEST h5diff_801.txt -v h5diff_dset1.h5 h5diff_dset3.h5 /g1/array /g1/array
# ##############################################################################
+# # dataset subsets
+# ##############################################################################
+#TRILABS_227 TOOLTEST h5diff_830.txt --enable-error-stack -v h5diff_dset1.h5 h5diff_dset2.h5 /g1/array3D[0,0,0;2,2,1;2,2,2;] /g1/array3D[0,0,0;2,2,1;2,2,2;]
+
+# ##############################################################################
# VDS tests
# ##############################################################################
TOOLTEST h5diff_v1.txt -v 1_vds.h5 2_vds.h5
diff --git a/tools/test/h5dump/h5dump_plugin.sh.in b/tools/test/h5dump/h5dump_plugin.sh.in
index 6a97fd1..a552f60 100644
--- a/tools/test/h5dump/h5dump_plugin.sh.in
+++ b/tools/test/h5dump/h5dump_plugin.sh.in
@@ -181,8 +181,8 @@ TOOLTEST() {
# Run test.
TESTING $H5DUMP $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $H5DUMP_BIN "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $H5DUMP_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -192,24 +192,24 @@ TOOLTEST() {
STDERR_FILTER $actual_err
cat $actual_err >> $actual
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual > /dev/null 2>&1 ; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
}
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index d5bd568..686ecfb 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -465,14 +465,14 @@ TESTING() {
TOOLTEST() {
# check if caseless compare and diff requested
if [ "$1" = ignorecase ]; then
- caseless="-i"
- # replace cmp with diff which runs much longer.
- xCMP="$DIFF -i"
- shift
+ caseless="-i"
+ # replace cmp with diff which runs much longer.
+ xCMP="$DIFF -i"
+ shift
else
- caseless=""
- # stick with faster cmp if ignorecase is not requested.
- xCMP="$CMP"
+ caseless=""
+ # stick with faster cmp if ignorecase is not requested.
+ xCMP="$CMP"
fi
expect="$TESTDIR/$1"
@@ -485,8 +485,8 @@ TOOLTEST() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -495,24 +495,24 @@ TOOLTEST() {
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $xCMP $expect $actual > /dev/null 2>&1 ; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
}
@@ -534,41 +534,41 @@ TOOLTEST2() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
nerrors="`expr $nerrors + 1`"
- elif $CMP $expectdata $actualdata; then
- echo " PASSED"
- else
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expectdata $actualdata; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ fi
+ else
echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
- fi
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actualdata $actual_err
+ rm -f $actual $actualdata $actual_err
fi
}
@@ -592,56 +592,55 @@ TOOLTEST2A() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
nerrors="`expr $nerrors + 1`"
- elif $DIFF $expectdata $actualdata; then
- if [ ! -f $expectmeta ]; then
- # Create the expect meta file if it doesn't yet exist.
- echo " CREATED"
- cp $actualmeta $expectmeta
- echo " Expected metafile (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expectmeta $actualmeta; then
- echo " PASSED"
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $DIFF $expectdata $actualdata; then
+ if [ ! -f $expectmeta ]; then
+ # Create the expect meta file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualmeta $expectmeta
+ echo " Expected metafile (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expectmeta $actualmeta; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected metafile (*.ddl) differs from actual metafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectmeta $actualmeta |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected metafile (*.ddl) differs from actual metafile (*.txt)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectmeta $actualmeta |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
fi
- else
+ else
echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
- fi
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actualdata $actual_err $actualmeta
+ rm -f $actual $actualdata $actual_err $actualmeta
fi
-
}
# same as TOOLTEST2 but only compares the generated data file to the expected data file
@@ -658,28 +657,28 @@ TOOLTEST2B() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
- echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expectdata $actualdata; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actualdata $actual_err
+ rm -f $actual $actualdata $actual_err
fi
}
@@ -699,8 +698,8 @@ TOOLTEST3() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -719,23 +718,23 @@ TOOLTEST3() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -757,8 +756,8 @@ TOOLTEST4() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -777,30 +776,30 @@ TOOLTEST4() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- if $CMP $expect_err $actual_ext; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.err) differs from actual result (*.oerr)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
- fi
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -822,8 +821,8 @@ TOOLTEST5() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -842,33 +841,62 @@ TOOLTEST5() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- if $CMP $expect_err $actual_ext; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.err) differs from actual result (*.oerr)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
- fi
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
+ fi
+}
+
+# same as TOOLTEST1 but expects h5dump to fail
+#
+TOOLTEST_FAIL() {
+
+ infile=$1
+ expect="$TESTDIR/`basename $1 exp`.ddl"
+ actual="$TESTDIR/`basename $1 .exp`.out"
+
+ # Run test.
+ TESTING $DUMPER $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@" $infile
+ ) >&$actual
+ RET=$?
+ # Segfault occurred
+ if [ $RET == 139 ] ; then
+ nerrors="`expr $nerrors + 1`"
+ echo "*FAILED - test on $infile failed with segmentation fault"
+ # Should fail but didn't
+ elif [ $RET == 0 ] ; then
+ nerrors="`expr $nerrors + 1`"
+ echo "*FAILED - test on $infile did not fail as expected"
+ else
+ echo " PASSED"
fi
}
+
# ADD_HELP_TEST
TOOLTEST_HELP() {
@@ -880,27 +908,27 @@ TOOLTEST_HELP() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect-CREATED
- echo " Expected output (*.txt) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect-CREATED
+ echo " Expected output (*.txt) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected output (*.txt) differs from actual output (*.out)"
- nerrors="`expr $nerrors + 1`"
+ echo "*FAILED*"
+ echo " Expected output (*.txt) differs from actual output (*.out)"
+ nerrors="`expr $nerrors + 1`"
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
}
@@ -920,14 +948,16 @@ GREPTEST()
# Run test.
TESTING $DUMPER -p $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
) >$actual 2>$actual_err
+
if [ "$txttype" = "ERRTXT" ]; then
$GREP "$expectdata" $actual_err > /dev/null
else
$GREP "$expectdata" $actual > /dev/null
fi
+
if [ $? -eq 0 ]; then
echo " PASSED"
else
@@ -937,7 +967,7 @@ GREPTEST()
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
}
@@ -956,14 +986,16 @@ GREPTEST2()
# Run test.
TESTING $DUMPER -p $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
) >$actual 2>$actual_err
+
if [ "$txttype" = "ERRTXT" ]; then
$GREP "$expectdata" $actual_err > /dev/null
else
$GREP "$expectdata" $actual > /dev/null
fi
+
if [ $? -eq 0 ]; then
echo " PASSED"
else
@@ -973,21 +1005,21 @@ GREPTEST2()
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
}
# Print a "SKIP" message
SKIP() {
- TESTING $DUMPER $@
+ TESTING $DUMPER $@
echo " -SKIP-"
}
# Print a line-line message left justified in a field of 70 characters
#
PRINT_H5DIFF() {
- SPACES=" "
- echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
}
@@ -997,10 +1029,11 @@ DIFFTEST()
{
PRINT_H5DIFF $@
(
- cd $TESTDIR
- $RUNSERIAL $H5DIFF_BIN "$@" -q
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN "$@" -q
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
@@ -1014,8 +1047,8 @@ DIFFTEST()
# beginning with the word "Verifying".
#
PRINT_H5IMPORT() {
- SPACES=" "
- echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Call the h5import tool
@@ -1025,15 +1058,16 @@ IMPORTTEST()
# remove the output hdf5 file if it exists
hdf5_file="$TESTDIR/$5"
if [ -f $hdf5_file ]; then
- rm -f $hdf5_file
+ rm -f $hdf5_file
fi
PRINT_H5IMPORT $@
(
- cd $TESTDIR
- $RUNSERIAL $H5IMPORT_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $H5IMPORT_BIN "$@"
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
@@ -1138,9 +1172,9 @@ TOOLTEST tcomp-4.ddl --enable-error-stack tcompound_complex.h5
TOOLTEST tcompound_complex2.ddl --enable-error-stack tcompound_complex2.h5
# tests for bitfields and opaque data types
if test $WORDS_BIGENDIAN != "yes"; then
-TOOLTEST tbitnopaque_le.ddl --enable-error-stack tbitnopaque.h5
+ TOOLTEST tbitnopaque_le.ddl --enable-error-stack tbitnopaque.h5
else
-TOOLTEST tbitnopaque_be.ddl --enable-error-stack tbitnopaque.h5
+ TOOLTEST tbitnopaque_be.ddl --enable-error-stack tbitnopaque.h5
fi
#test for the nested compound type
@@ -1318,12 +1352,12 @@ TOOLTEST tallfilters.ddl --enable-error-stack -H -p -d all tfilters.h5
TOOLTEST tuserfilter.ddl --enable-error-stack -H -p -d myfilter tfilters.h5
if test $USE_FILTER_DEFLATE = "yes" ; then
- # data read internal filters
- TOOLTEST treadintfilter.ddl --enable-error-stack -d deflate -d shuffle -d fletcher32 -d nbit -d scaleoffset tfilters.h5
- if test $USE_FILTER_SZIP = "yes"; then
- # data read
- TOOLTEST treadfilter.ddl --enable-error-stack -d all -d szip tfilters.h5
- fi
+ # data read internal filters
+ TOOLTEST treadintfilter.ddl --enable-error-stack -d deflate -d shuffle -d fletcher32 -d nbit -d scaleoffset tfilters.h5
+ if test $USE_FILTER_SZIP = "yes"; then
+ # data read
+ TOOLTEST treadfilter.ddl --enable-error-stack -d all -d szip tfilters.h5
+ fi
fi
# test for displaying objects with very long names
@@ -1380,9 +1414,9 @@ TOOLTEST tbin4.ddl --enable-error-stack -d double -b FILE -o out4.bin tbin
# Clean up binary output files
if test -z "$HDF5_NOCLEANUP"; then
- rm -f out[1-4].bin
- rm -f out1.h5
- rm -f out3.h5
+ rm -f out[1-4].bin
+ rm -f out1.h5
+ rm -f out3.h5
fi
# test for dataset region references
@@ -1394,7 +1428,7 @@ TOOLTEST2 tbinregR.exp --enable-error-stack -d /Dataset1 -s 0 -R -y -o tbinregR.
# Clean up text output files
if test -z "$HDF5_NOCLEANUP"; then
- rm -f tbinregR.txt
+ rm -f tbinregR.txt
fi
# tests for group creation order
diff --git a/tools/test/h5dump/testh5dumppbits.sh.in b/tools/test/h5dump/testh5dumppbits.sh.in
index 2c8a0c9..6689749 100644
--- a/tools/test/h5dump/testh5dumppbits.sh.in
+++ b/tools/test/h5dump/testh5dumppbits.sh.in
@@ -236,26 +236,25 @@ TOOLTEST() {
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
-
}
@@ -274,36 +273,36 @@ TOOLTEST2() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
nerrors="`expr $nerrors + 1`"
- elif $CMP $expectdata $actualdata; then
- echo " PASSED"
- else
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expectdata $actualdata; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ fi
+ else
echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
- fi
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
@@ -328,8 +327,8 @@ TOOLTEST3() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -348,23 +347,23 @@ TOOLTEST3() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -385,8 +384,8 @@ TOOLTEST4() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -405,30 +404,30 @@ TOOLTEST4() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- if $CMP $expect_err $actual_ext; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.err) differs from actual result (*.oerr)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
- fi
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -442,8 +441,8 @@ SKIP() {
# Print a line-line message left justified in a field of 70 characters
#
PRINT_H5DIFF() {
- SPACES=" "
- echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
}
@@ -453,10 +452,11 @@ DIFFTEST()
{
PRINT_H5DIFF $@
(
- cd $TESTDIR
- $RUNSERIAL $H5DIFF_BIN "$@" -q
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN "$@" -q
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
@@ -470,8 +470,8 @@ DIFFTEST()
# beginning with the word "Verifying".
#
PRINT_H5IMPORT() {
- SPACES=" "
- echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Call the h5import tool
@@ -481,22 +481,22 @@ IMPORTTEST()
# remove the output hdf5 file if it exists
hdf5_file="$TESTDIR/$5"
if [ -f $hdf5_file ]; then
- rm -f $hdf5_file
+ rm -f $hdf5_file
fi
PRINT_H5IMPORT $@
(
- cd $TESTDIR
- $RUNSERIAL $H5IMPORT_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $H5IMPORT_BIN "$@"
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
-
}
diff --git a/tools/test/h5dump/testh5dumpvds.sh.in b/tools/test/h5dump/testh5dumpvds.sh.in
index 8381063..f2c486e 100644
--- a/tools/test/h5dump/testh5dumpvds.sh.in
+++ b/tools/test/h5dump/testh5dumpvds.sh.in
@@ -205,8 +205,8 @@ TOOLTEST() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -216,26 +216,25 @@ TOOLTEST() {
STDERR_FILTER $actual_err
cat $actual_err >> $actual
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
-
}
@@ -254,42 +253,42 @@ TOOLTEST2() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
cat $actual_err >> $actual
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
nerrors="`expr $nerrors + 1`"
- elif $CMP $expectdata $actualdata; then
- echo " PASSED"
- else
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expectdata $actualdata; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ fi
+ else
echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
- fi
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actualdata $actual_err
+ rm -f $actual $actualdata $actual_err
fi
}
@@ -309,8 +308,8 @@ TOOLTEST3() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -326,27 +325,27 @@ TOOLTEST3() {
-e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \
-e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
-e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
- $actual_err > $actual_ext
+ $actual_err > $actual_ext
cat $actual_ext >> $actual
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -367,8 +366,8 @@ TOOLTEST4() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -384,47 +383,46 @@ TOOLTEST4() {
-e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \
-e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
-e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
- $actual_err > $actual_ext
+ $actual_err > $actual_ext
#cat $actual_ext >> $actual
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
elif $CMP $expect $actual; then
- if $CMP $expect_err $actual_ext; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.err) differs from actual result (*.oerr)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
- fi
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
-
}
# Print a "SKIP" message
SKIP() {
- TESTING $DUMPER $@
+ TESTING $DUMPER $@
echo " -SKIP-"
}
# Print a line-line message left justified in a field of 70 characters
#
PRINT_H5DIFF() {
- SPACES=" "
- echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
}
@@ -434,25 +432,25 @@ DIFFTEST()
{
PRINT_H5DIFF $@
(
- cd $TESTDIR
- $RUNSERIAL $H5DIFF_BIN "$@" -q
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN "$@" -q
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
-
}
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Verifying".
#
PRINT_H5IMPORT() {
- SPACES=" "
- echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Call the h5import tool
@@ -462,22 +460,22 @@ IMPORTTEST()
# remove the output hdf5 file if it exists
hdf5_file="$TESTDIR/$5"
if [ -f $hdf5_file ]; then
- rm -f $hdf5_file
+ rm -f $hdf5_file
fi
PRINT_H5IMPORT $@
(
- cd $TESTDIR
- $RUNSERIAL $H5IMPORT_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $H5IMPORT_BIN "$@"
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
-
}
@@ -491,7 +489,7 @@ COPY_TESTFILES_TO_TESTDIR
####### test for dataset vds ######
- # Data read
+# Data read
if test $USE_FILTER_DEFLATE = "yes" ; then
TOOLTEST tvds-1.ddl --enable-error-stack 1_vds.h5
TOOLTEST tvds-2.ddl --enable-error-stack 2_vds.h5
@@ -504,7 +502,7 @@ if test $USE_FILTER_DEFLATE = "yes" ; then
TOOLTEST vds-gap2.ddl --vds-gap-size=2 --enable-error-stack vds-eiger.h5
fi
- # Layout read
+# Layout read
if test $USE_FILTER_DEFLATE = "yes" ; then
TOOLTEST tvds_layout-1.ddl -p --enable-error-stack 1_vds.h5
TOOLTEST tvds_layout-2.ddl -p --enable-error-stack 2_vds.h5
diff --git a/tools/test/h5dump/testh5dumpxml.sh.in b/tools/test/h5dump/testh5dumpxml.sh.in
index 2eda110..447c819 100644
--- a/tools/test/h5dump/testh5dumpxml.sh.in
+++ b/tools/test/h5dump/testh5dumpxml.sh.in
@@ -262,36 +262,35 @@ TOOLTEST() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
-
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.xml) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.xml) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.xml) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.xml) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
}
# Print a "SKIP" message
SKIP() {
- TESTING $DUMPER $@
- echo " -SKIP-"
+ TESTING $DUMPER $@
+ echo " -SKIP-"
}
diff --git a/tools/test/h5jam/getub.c b/tools/test/h5jam/getub.c
index a21c2af..a9b4437 100644
--- a/tools/test/h5jam/getub.c
+++ b/tools/test/h5jam/getub.c
@@ -138,14 +138,15 @@ main(int argc, const char *argv[])
} /* end if */
/* close things and exit */
+ HDfree(filename);
HDfree(buf);
HDclose(fd);
return EXIT_SUCCESS;
error:
- if (buf)
- HDfree(buf);
+ HDfree(filename);
+ HDfree(buf);
if (fd >= 0)
HDclose(fd);
return EXIT_FAILURE;
diff --git a/tools/test/h5ls/h5ls_plugin.sh.in b/tools/test/h5ls/h5ls_plugin.sh.in
index 2d45f59..29e982d 100644
--- a/tools/test/h5ls/h5ls_plugin.sh.in
+++ b/tools/test/h5ls/h5ls_plugin.sh.in
@@ -139,8 +139,8 @@ CLEAN_TESTFILES_AND_TESTDIR()
# Print a $* message left justified in a field of 70 characters
#
MESSAGE() {
- SPACES=" "
- echo "$* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo "$* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Print a line-line message left justified in a field of 70 characters
@@ -206,7 +206,7 @@ TOOLTEST() {
echo ""
fi
elif [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
cp $actual $expect
echo " Expected result (*.ls) missing"
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in
index fadc143..8f3ed8c 100644
--- a/tools/test/h5repack/h5repack.sh.in
+++ b/tools/test/h5repack/h5repack.sh.in
@@ -271,6 +271,12 @@ SKIP() {
echo " -SKIP-"
}
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
# Call the h5diff tool
#
DIFFTEST()
@@ -620,6 +626,7 @@ VERIFY_INVALIDBOUNDS()
# -----------------------------------------------------------------------------
# Expect h5diff to fail
+# Use only by VERIFY_EXTERNAL_CONSOLIDATION
# -----------------------------------------------------------------------------
DIFFFAIL()
{
@@ -629,7 +636,7 @@ DIFFFAIL()
$RUNSERIAL $H5DIFF_BIN -q "$@"
)
RET=$?
- if [ $RET == 0 ] ; then
+ if [ $RET -eq 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
else
@@ -1356,44 +1363,28 @@ TOOLTEST_STAT SPT $arg
# layout options (these files have no filters)
#########################################################
VERIFY_LAYOUT_DSET dset2_chunk_20x10 h5repack_layout.h5 dset2 CHUNKED --layout dset2:CHUNK=20x10
-
VERIFY_LAYOUT_ALL chunk_20x10 h5repack_layout.h5 CHUNKED -l CHUNK=20x10
-
VERIFY_LAYOUT_DSET dset2_conti h5repack_layout.h5 dset2 CONTIGUOUS -l dset2:CONTI
-
VERIFY_LAYOUT_ALL conti h5repack_layout.h5 CONTIGUOUS -l CONTI
-
VERIFY_LAYOUT_DSET dset2_compa h5repack_layout.h5 dset2 COMPACT -l dset2:COMPA
-
VERIFY_LAYOUT_ALL compa h5repack_layout.h5 COMPACT -l COMPA
-
TOOLTESTM dset2_chunk_20x10-errstk h5repack_layout.h5 --layout=dset2:CHUNK=20x10x5 --enable-error-stack
################################################################
# layout conversions (file has no filters)
###############################################################
-
VERIFY_LAYOUT_DSET dset_compa_conti h5repack_layout.h5 dset_compact CONTIGUOUS -l dset_compact:CONTI
-
VERIFY_LAYOUT_DSET dset_compa_chunk h5repack_layout.h5 dset_compact CHUNKED -l dset_compact:CHUNK=2x5
-
VERIFY_LAYOUT_DSET dset_compa_compa h5repack_layout.h5 dset_compact COMPACT -l dset_compact:COMPA
-
VERIFY_LAYOUT_DSET dset_conti_compa h5repack_layout.h5 dset_contiguous COMPACT -l dset_contiguous:COMPA
-
VERIFY_LAYOUT_DSET dset_conti_chunk h5repack_layout.h5 dset_contiguous CHUNKED -l dset_contiguous:CHUNK=3x6
-
VERIFY_LAYOUT_DSET dset_conti_conti h5repack_layout.h5 dset_contiguous CONTIGUOUS -l dset_contiguous:CONTI
-
VERIFY_LAYOUT_DSET chunk_compa h5repack_layout.h5 dset_chunk COMPACT -l dset_chunk:COMPA
-
VERIFY_LAYOUT_DSET chunk_conti h5repack_layout.h5 dset_chunk CONTIGUOUS -l dset_chunk:CONTI
-
VERIFY_LAYOUT_DSET chunk_18x13 h5repack_layout.h5 dset_chunk CHUNKED -l dset_chunk:CHUNK=18x13
# test convert small size dataset ( < 1k) to compact layout without -m
VERIFY_LAYOUT_DSET contig_small_compa h5repack_layout2.h5 contig_small COMPACT -l contig_small:COMPA
-
VERIFY_LAYOUT_DSET contig_small_fixed_compa h5repack_layout2.h5 chunked_small_fixed COMPACT -l chunked_small_fixed:COMPA
#---------------------------------------------------------------------------
@@ -1421,6 +1412,7 @@ VERIFY_LAYOUT_DSET chunk2compa h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk
# chunk dim is bigger than dataset dim. ( dset size < 64k )
VERIFY_LAYOUT_DSET error1 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE
# chunk dim is bigger than dataset dim. ( dset size > 64k )
+
VERIFY_LAYOUT_DSET error2 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE
# chunk dims are smaller than dataset dims. ( dset size < 64k )
@@ -1435,7 +1427,6 @@ TOOLTEST error4 h5repack_layout3.h5 -f NONE
# (dset size < 64K) and with unlimited max dims on a condition as follow.
# (HDFFV-8214)
#--------------------------------------------------------------------------
-
# chunk dim is bigger than dataset dim. should succeed.
VERIFY_LAYOUT_DSET ckdim_biger h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI
# chunk dim is smaller than dataset dim. should succeed.
@@ -1466,7 +1457,6 @@ else
fi
# several global filters
-
arg="h5repack_layout.h5 --filter GZIP=1 --filter SHUF"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
@@ -1562,9 +1552,15 @@ else
VERIFY_LAYOUT_VDS vds_conti 4_vds.h5 vds_dset CONTIGUOUS -l vds_dset:CONTI
fi
-#########################################################
-# Testing version bounds
-#########################################################
+################################################################
+# reference new api conversions
+###############################################################
+#TOOLTEST_DUMP attrregion tattrreg.h5
+#TOOLTEST_DUMP dataregion tdatareg.h5
+
+##############################################################################
+### V E R S I O N B O U N D S T E S T S
+##############################################################################
# -j 0 -k 2, superblock will be 0
VERIFY_SUPERBLOCK 0 2 0 h5repack_layout.h5 -j 0 -k 2 h5repack_layout.h5
# -j 1 -k 2, superblock will be 2
@@ -1574,9 +1570,9 @@ VERIFY_SUPERBLOCK 2 2 3 h5repack_layout.h5 -j 2 -k 2 h5repack_layout.h5
# -j 0 -k 1, file cannot be opened
VERIFY_INVALIDBOUNDS 0 1 bounds_latest_latest.h5
-########################################
-# Testing external storage
-########################################
+##############################################################################
+### E X T E R N A L S T O R A G E T E S T S
+##############################################################################
VERIFY_EXTERNAL_CONSOLIDATION -l CONTI
# Clean up temporary files/directories
diff --git a/tools/test/misc/h5perf_gentest.c b/tools/test/misc/h5perf_gentest.c
index a3a781b..332e49c 100644
--- a/tools/test/misc/h5perf_gentest.c
+++ b/tools/test/misc/h5perf_gentest.c
@@ -14,7 +14,7 @@
creates a large number of attributes, groups, and datasets by specifying
-a, -g, -d options respectively. Using "-h" option to see details.
- Programmer: Peter Cao <xcao@hdfgroup.org>, Jan. 2013
+ Programmer: Peter Cao, Jan. 2013
****************************************************************************/
#include "hdf5.h"
@@ -128,7 +128,7 @@ main(int argc, char *argv[])
Return: Non-negative on success/Negative on failure
- Programmer: Peter Cao <xcao@hdfgroup.org>, Jan. 2013
+ Programmer: Peter Cao, Jan. 2013
****************************************************************************/
herr_t
create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsize_t nrows, hsize_t dim0,
diff --git a/tools/test/misc/h5repart_gentest.c b/tools/test/misc/h5repart_gentest.c
index dc228f3..b068985 100644
--- a/tools/test/misc/h5repart_gentest.c
+++ b/tools/test/misc/h5repart_gentest.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu<slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* June 1, 2005
*
* Purpose: Generate a family file of 1024 bytes for each member
diff --git a/tools/test/misc/testh5mkgrp.sh.in b/tools/test/misc/testh5mkgrp.sh.in
index 9f3c4f7..5cd852a 100644
--- a/tools/test/misc/testh5mkgrp.sh.in
+++ b/tools/test/misc/testh5mkgrp.sh.in
@@ -13,7 +13,7 @@
#
# Tests for the h5mkgrp tool
#
-# Quincey Koziol (koziol@hdfgroup.org)
+# Quincey Koziol
# Tuesday, February 13, 2007
#
@@ -150,10 +150,11 @@ TOOLTEST()
{
TESTING $H5MKGRP $@
(
- cd $TESTDIR
- $RUNSERIAL $H5MKGRP_BIN $@
+ cd $TESTDIR
+ $RUNSERIAL $H5MKGRP_BIN $@
) > output.out
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -164,7 +165,7 @@ TOOLTEST()
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f output.out
+ rm -f output.out
fi
fi
}
@@ -181,8 +182,8 @@ H5LSTEST()
# any unexpected output from that stream too.
VERIFY_H5LS $@
(
- cd $TESTDIR
- $RUNSERIAL $H5LS_BIN $H5LS_ARGS $@
+ cd $TESTDIR
+ $RUNSERIAL $H5LS_BIN $H5LS_ARGS $@
) 2>&1 |sed 's/Modified:.*/Modified: XXXX-XX-XX XX:XX:XX XXX/' >$actual
# save actual in case it is needed later.
@@ -190,25 +191,25 @@ H5LSTEST()
STDOUT_FILTER $actual
STDERR_FILTER $actual
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ls) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.ls) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
- fi
-
- # Clean up output file
- if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_sav
- fi
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ls) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ls) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_sav
+ fi
}
# Single run of tool
@@ -258,30 +259,30 @@ CMPTEST()
# any unexpected output from that stream too.
TESTING $H5MKGRP $@
(
- cd $TESTDIR
- $RUNSERIAL $H5MKGRP_BIN $@
+ cd $TESTDIR
+ $RUNSERIAL $H5MKGRP_BIN $@
) >$actual 2>$actual_err
cat $actual_err >> $actual
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.txt) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.txt) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
- fi
-
- # Clean up output file
- if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
- fi
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.txt) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.txt) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err
+ fi
}
##############################################################################
diff --git a/tools/test/perform/chunk.c b/tools/test/perform/chunk.c
index 397954a..ada2ed3 100644
--- a/tools/test/perform/chunk.c
+++ b/tools/test/perform/chunk.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <robb@arborea.spizella.com>
+ * Programmer: Robb Matzke
* Thursday, May 14, 1998
*
* Purpose: Checks the effect of various I/O request sizes and raw data
diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c
index c4bdb4b..fcaa337 100644
--- a/tools/test/perform/chunk_cache.c
+++ b/tools/test/perform/chunk_cache.c
@@ -98,7 +98,7 @@ create_dset1(hid_t file)
hid_t dcpl = H5I_INVALID_HID;
hsize_t dims[RANK] = {DSET1_DIM1, DSET1_DIM2};
hsize_t chunk_dims[RANK] = {CHUNK1_DIM1, CHUNK1_DIM2};
- int ** data; /* data for writing */
+ int ** data = NULL; /* data for writing */
/* Create the data space. */
if ((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0)
@@ -134,6 +134,7 @@ create_dset1(hid_t file)
H5Dclose(dataset);
H5Pclose(dcpl);
H5Sclose(dataspace);
+ HDfree(data);
return 0;
error:
@@ -144,6 +145,7 @@ error:
H5Sclose(dataspace);
}
H5E_END_TRY;
+ HDfree(data);
return 1;
}
@@ -160,7 +162,7 @@ create_dset2(hid_t file)
hid_t dcpl = H5I_INVALID_HID;
hsize_t dims[RANK] = {DSET2_DIM1, DSET2_DIM2};
hsize_t chunk_dims[RANK] = {CHUNK2_DIM1, CHUNK2_DIM2};
- int ** data; /* data for writing */
+ int ** data = NULL; /* data for writing */
/* Create the data space. */
if ((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0)
@@ -195,6 +197,7 @@ create_dset2(hid_t file)
H5Dclose(dataset);
H5Pclose(dcpl);
H5Sclose(dataspace);
+ HDfree(data);
return 0;
@@ -206,6 +209,7 @@ error:
H5Sclose(dataspace);
}
H5E_END_TRY;
+ HDfree(data);
return 1;
}
@@ -259,11 +263,11 @@ check_partial_chunks_perf(hid_t file)
end_t = H5_get_time();
if ((end_t - start_t) > (double)0.0f)
- printf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %lu\n",
+ printf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %zu\n",
(end_t - start_t), nbytes_global);
else
printf("1. Partial chunks: no total read time because timer is not available; number of bytes being "
- "read from file is %lu\n",
+ "read from file is %zu\n",
nbytes_global);
H5Dclose(dataset);
@@ -337,11 +341,11 @@ check_hash_value_perf(hid_t file)
end_t = H5_get_time();
if ((end_t - start_t) > (double)0.0f)
- printf("2. Hash value: total read time is %lf; number of bytes being read from file is %lu\n",
+ printf("2. Hash value: total read time is %lf; number of bytes being read from file is %zu\n",
(end_t - start_t), nbytes_global);
else
printf("2. Hash value: no total read time because timer is not available; number of bytes being read "
- "from file is %lu\n",
+ "from file is %zu\n",
nbytes_global);
H5Dclose(dataset);
diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c
index 08c0d7d..68eaa3a 100644
--- a/tools/test/perform/iopipe.c
+++ b/tools/test/perform/iopipe.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Thursday, March 12, 1998
*/
diff --git a/tools/test/perform/overhead.c b/tools/test/perform/overhead.c
index ec8c281..dba8220 100644
--- a/tools/test/perform/overhead.c
+++ b/tools/test/perform/overhead.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, September 28, 1998
*
* Purpose: Creates a chunked dataset and measures the storage overhead.
diff --git a/tools/test/perform/perf_meta.c b/tools/test/perform/perf_meta.c
index f9e1a7f..d8ed9ec 100644
--- a/tools/test/perform/perf_meta.c
+++ b/tools/test/perform/perf_meta.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* Friday, Oct 3, 2004
*
* Purpose: Tests performance of metadata
@@ -818,8 +818,10 @@ main(int argc, char **argv)
goto error;
#ifdef H5_HAVE_PARALLEL
if (facc_type != FACC_DEFAULT && MAINPROCESS)
-#endif /*H5_HAVE_PARALLEL*/
printf("All metadata performance tests passed.\n");
+#else
+ printf("All metadata performance tests passed.\n");
+#endif /*H5_HAVE_PARALLEL*/
return 0;
diff --git a/tools/test/perform/pio_perf.h b/tools/test/perform/pio_perf.h
index 027b553..24621da 100644
--- a/tools/test/perform/pio_perf.h
+++ b/tools/test/perform/pio_perf.h
@@ -10,8 +10,8 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifndef PIO_PERF_H__
-#define PIO_PERF_H__
+#ifndef PIO_PERF_H
+#define PIO_PERF_H
#ifndef STANDALONE
#include "io_timer.h"
@@ -97,4 +97,4 @@ extern results do_pio(parameters param);
}
#endif /* __cplusplus */
-#endif /* PIO_PERF_H__ */
+#endif /* PIO_PERF_H */
diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h
index 5a3f16d..7c1ac42 100644
--- a/tools/test/perform/pio_standalone.h
+++ b/tools/test/perform/pio_standalone.h
@@ -10,8 +10,8 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifndef PIO_STANDALONE_H__
-#define PIO_PERF_H__
+#ifndef PIO_STANDALONE_H
+#define PIO_STANDALONE_H
/* Header file for building h5perf by standalone mode.
* Created: Christian Chilan, 2005/5/18.
@@ -356,7 +356,7 @@ H5_DLL int c99_snprintf(char *str, size_t size, const char *format, ...);
#endif
/* sprintf() variable arguments */
#define HDsprintf sprintf /*varargs*/
-#define HDsqrt(X) sqrt(X)
+#define HDsqrt(X) sqrt(X)
#ifdef H5_HAVE_RAND_R
H5_DLL void HDsrand(unsigned int seed);
#define HDsrandom(S) HDsrand(S)
@@ -429,25 +429,25 @@ H5_DLL int64_t HDstrtoll(const char *s, const char **rest, int base);
#else
#define HDunlink(S) unlink(S)
#endif
-#define HDutime(S, T) utime(S, T)
-#define HDva_arg(A, T) va_arg(A, T)
-#define HDva_end(A) va_end(A)
-#define HDva_start(A, P) va_start(A, P)
-#define HDvasprintf(RET, FMT, A) vasprintf(RET, FMT, A)
-#define HDvfprintf(F, FMT, A) vfprintf(F, FMT, A)
-#define HDvprintf(FMT, A) vprintf(FMT, A)
-#define HDvsprintf(S, FMT, A) vsprintf(S, FMT, A)
+#define HDutime(S, T) utime(S, T)
+#define HDva_arg(A, T) va_arg(A, T)
+#define HDva_end(A) va_end(A)
+#define HDva_start(A, P) va_start(A, P)
+#define HDvasprintf(RET, FMT, A) vasprintf(RET, FMT, A)
+#define HDvfprintf(F, FMT, A) vfprintf(F, FMT, A)
+#define HDvprintf(FMT, A) vprintf(FMT, A)
+#define HDvsprintf(S, FMT, A) vsprintf(S, FMT, A)
#ifdef H5_HAVE_WIN32_API
H5_DLL int c99_vsnprintf(char *str, size_t size, const char *format, va_list ap);
#define HDvsnprintf c99_vsnprintf
#else
#define HDvsnprintf(S, N, FMT, A) vsnprintf(S, N, FMT, A)
#endif
-#define HDwait(W) wait(W)
-#define HDwaitpid(P, W, O) waitpid(P, W, O)
-#define HDwcstombs(S, P, Z) wcstombs(S, P, Z)
-#define HDwctomb(S, C) wctomb(S, C)
-#define HDwrite(F, M, Z) write(F, M, Z)
+#define HDwait(W) wait(W)
+#define HDwaitpid(P, W, O) waitpid(P, W, O)
+#define HDwcstombs(S, P, Z) wcstombs(S, P, Z)
+#define HDwctomb(S, C) wctomb(S, C)
+#define HDwrite(F, M, Z) write(F, M, Z)
/*
* And now for a couple non-Posix functions... Watch out for systems that