summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitattributes1
-rw-r--r--MANIFEST4
-rw-r--r--config/cmake/hdf5-config-version.cmake.in2
-rw-r--r--release_docs/RELEASE.txt7
-rw-r--r--tools/lib/h5diff_array.c6
-rw-r--r--tools/test/h5dump/CMakeTests.cmake11
-rw-r--r--tools/test/h5dump/h5dumpgentest.c1
-rw-r--r--tools/test/h5dump/testh5dump.sh.in5
-rw-r--r--tools/testfiles/tldouble.wddl11
-rwxr-xr-xtools/testfiles/tldouble_scalar.ddl26
-rw-r--r--tools/testfiles/tldouble_scalar.h5bin0 -> 2144 bytes
-rwxr-xr-xtools/testfiles/tldouble_scalar.wddl26
12 files changed, 93 insertions, 7 deletions
diff --git a/.gitattributes b/.gitattributes
index f72b49c..e01442a 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -785,6 +785,7 @@ tools/testfiles/tints4dimsStride2.ddl -text
tools/testfiles/tintsattrs.h5 -text svneol=unset#application/x-hdf
tools/testfiles/tlarge_objname.h5 -text
tools/testfiles/tldouble.h5 -text
+tools/testfiles/tldouble_scalar.h5 -text
tools/testfiles/tlonglinks.h5 -text
tools/testfiles/tloop.h5 -text
tools/testfiles/tloop2.h5 -text
diff --git a/MANIFEST b/MANIFEST
index 6605812..b484ce5 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2021,7 +2021,11 @@
./tools/testfiles/tlarge_objname.ddl
./tools/testfiles/tlarge_objname.h5
./tools/testfiles/tldouble.ddl
+./tools/testfiles/tldouble.wddl
./tools/testfiles/tldouble.h5
+./tools/testfiles/tldouble_scalar.ddl
+./tools/testfiles/tldouble_scalar.wddl
+./tools/testfiles/tldouble_scalar.h5
./tools/testfiles/tlonglinks.ddl
./tools/testfiles/tlonglinks.h5
./tools/testfiles/tloop-1.ddl
diff --git a/config/cmake/hdf5-config-version.cmake.in b/config/cmake/hdf5-config-version.cmake.in
index 8e93dc6..20ce630 100644
--- a/config/cmake/hdf5-config-version.cmake.in
+++ b/config/cmake/hdf5-config-version.cmake.in
@@ -33,7 +33,7 @@ else()
endif()
if((PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) AND
- (PACKAGE_FIND_VERSION_MINOR STREQUAL CVF_VERSION_MINOR))
+ (PACKAGE_FIND_VERSION_MINOR STRLESS_EQUAL CVF_VERSION_MINOR))
set(PACKAGE_VERSION_COMPATIBLE TRUE)
else()
set(PACKAGE_VERSION_COMPATIBLE FALSE)
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index bf4a273..0549394 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -877,6 +877,13 @@ Bug Fixes since HDF5-1.12.0 release
Tools
-----
+ - Fixed tools display of long double.
+
+ Long doubles were not being display correctly. Changed the printf
+ specifier from %Lf to %Lg.
+
+ (ADB - 2021/03/12, HDFFV-11113)
+
- Fixed tools argument parsing.
Tools parsing used the length of the option from the long array to match
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 41f4761..77b6a5e 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -27,7 +27,7 @@
#define F_FORMAT "%-15g %-15g %-15g\n"
#if H5_SIZEOF_LONG_DOUBLE != 0
-#define LD_FORMAT "%-15Lf %-15Lf %-15Lf\n"
+#define LD_FORMAT "%-15Lg %-15Lg %-15Lg\n"
#endif
#define I_FORMAT "%-15d %-15d %-15d\n"
@@ -42,7 +42,7 @@
#define F_FORMAT_P "%-15.10g %-15.10g %-15.10g %-14.10g\n"
#if H5_SIZEOF_LONG_DOUBLE != 0
-#define LD_FORMAT_P "%-15.10Lf %-15.10Lf %-15.10Lf %-14.10Lf\n"
+#define LD_FORMAT_P "%-15.10Lg %-15.10Lg %-15.10Lg %-14.10Lg\n"
#endif
#define I_FORMAT_P "%-15d %-15d %-15d %-14f\n"
@@ -59,7 +59,7 @@
#define F_FORMAT_P_NOTCOMP "%-15.10g %-15.10g %-15.10g not comparable\n"
#if H5_SIZEOF_LONG_DOUBLE != 0
-#define LD_FORMAT_P_NOTCOMP "%-15.10Lf %-15.10Lf %-15.10Lf not comparable\n"
+#define LD_FORMAT_P_NOTCOMP "%-15.10Lg %-15.10Lg %-15.10Lg not comparable\n"
#endif
#define I_FORMAT_P_NOTCOMP "%-15d %-15d %-15d not comparable\n"
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake
index f54da76..4b61569 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -127,7 +127,8 @@
${HDF5_TOOLS_DIR}/testfiles/tintsattrs.ddl
${HDF5_TOOLS_DIR}/testfiles/tintsnodata.ddl
${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl
+ #${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl #special handling on windows
+ #${HDF5_TOOLS_DIR}/testfiles/tldouble_scalar.ddl #special handling on windows
${HDF5_TOOLS_DIR}/testfiles/tlonglinks.ddl
${HDF5_TOOLS_DIR}/testfiles/tloop-1.ddl
${HDF5_TOOLS_DIR}/testfiles/tmulti.ddl
@@ -294,6 +295,7 @@
${HDF5_TOOLS_DIR}/testfiles/tintsnodata.h5
${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.h5
${HDF5_TOOLS_DIR}/testfiles/tldouble.h5
+ ${HDF5_TOOLS_DIR}/testfiles/tldouble_scalar.h5
${HDF5_TOOLS_DIR}/testfiles/tlonglinks.h5
${HDF5_TOOLS_DIR}/testfiles/tloop.h5
${HDF5_TOOLS_DIR}/testfiles/tmulti-b.h5
@@ -409,8 +411,12 @@
configure_file(${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp NEWLINE_STYLE CRLF)
#file (READ ${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp TEST_STREAM)
#file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tldouble.wddl" "${PROJECT_BINARY_DIR}/testfiles/std/tldouble.ddl" "h5dump_std_files")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tldouble_scalar.wddl" "${PROJECT_BINARY_DIR}/testfiles/std/tldouble_scalar.ddl" "h5dump_std_files")
else ()
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp" "${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp" "h5dump_std_files")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/tldouble.ddl" "h5dump_std_files")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tldouble_scalar.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/tldouble_scalar.ddl" "h5dump_std_files")
endif ()
add_custom_target(h5dump_std_files ALL COMMENT "Copying files needed by h5dump_std tests" DEPENDS ${h5dump_std_files_list})
@@ -1085,7 +1091,8 @@
ADD_H5_TEST (zerodim 0 --enable-error-stack zerodim.h5)
# test for long double (some systems do not have long double)
-# ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5)
+ ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5)
+ ADD_H5_TEST (tldouble_scalar 0 -p --enable-error-stack tldouble_scalar.h5)
# test for vms
ADD_H5_TEST (tvms 0 --enable-error-stack tvms.h5)
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index 35e1d6a..1c2bf6f 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -11138,6 +11138,7 @@ main(void)
gent_aindices();
gent_longlinks();
gent_ldouble();
+ gent_ldouble_scalar();
gent_binary();
gent_bigdims();
gent_hyperslab();
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index 8f478b0..f985da5 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -143,6 +143,7 @@ $SRC_H5DUMP_TESTFILES/tintsattrs.h5
$SRC_H5DUMP_TESTFILES/tints4dims.h5
$SRC_H5DUMP_TESTFILES/tlarge_objname.h5
$SRC_H5DUMP_TESTFILES/tldouble.h5
+$SRC_H5DUMP_TESTFILES/tldouble_scalar.h5
$SRC_H5DUMP_TESTFILES/tlonglinks.h5
$SRC_H5DUMP_TESTFILES/tloop.h5
$SRC_H5DUMP_TESTFILES/tmulti-b.h5
@@ -288,6 +289,7 @@ $SRC_H5DUMP_TESTFILES/tints4dimsStride2.ddl
$SRC_H5DUMP_TESTFILES/tintsattrs.ddl
$SRC_H5DUMP_TESTFILES/tlarge_objname.ddl
$SRC_H5DUMP_TESTFILES/tldouble.ddl
+$SRC_H5DUMP_TESTFILES/tldouble_scalar.ddl
$SRC_H5DUMP_TESTFILES/tlonglinks.ddl
$SRC_H5DUMP_TESTFILES/tloop-1.ddl
$SRC_H5DUMP_TESTFILES/tmulti.ddl
@@ -1351,7 +1353,8 @@ TOOLTEST tgrpnullspace.ddl -p --enable-error-stack tgrpnullspace.h5
TOOLTEST zerodim.ddl --enable-error-stack zerodim.h5
# test for long double (some systems do not have long double)
-#TOOLTEST tldouble.ddl --enable-error-stack tldouble.h5
+TOOLTEST tldouble.ddl --enable-error-stack tldouble.h5
+TOOLTEST tldouble_scalar.ddl -p --enable-error-stack tldouble_scalar.h5
# test for vms
TOOLTEST tvms.ddl --enable-error-stack tvms.h5
diff --git a/tools/testfiles/tldouble.wddl b/tools/testfiles/tldouble.wddl
new file mode 100644
index 0000000..4793b4d
--- /dev/null
+++ b/tools/testfiles/tldouble.wddl
@@ -0,0 +1,11 @@
+HDF5 "tldouble.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE 128-bit little-endian floating-point
+ DATASPACE SIMPLE { ( 3 ) / ( 3 ) }
+ DATA {
+ (0): 1, 2, 3
+ }
+ }
+}
+}
diff --git a/tools/testfiles/tldouble_scalar.ddl b/tools/testfiles/tldouble_scalar.ddl
new file mode 100755
index 0000000..45f0b45
--- /dev/null
+++ b/tools/testfiles/tldouble_scalar.ddl
@@ -0,0 +1,26 @@
+HDF5 "tldouble_scalar.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE H5T_ARRAY { [6] H5T_NATIVE_LDOUBLE }
+ DATASPACE SCALAR
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 96
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ DATA {
+ (0): [ 0, 1, 2, 3, 4, 5 ]
+ }
+ }
+}
+}
diff --git a/tools/testfiles/tldouble_scalar.h5 b/tools/testfiles/tldouble_scalar.h5
new file mode 100644
index 0000000..0344ea0
--- /dev/null
+++ b/tools/testfiles/tldouble_scalar.h5
Binary files differ
diff --git a/tools/testfiles/tldouble_scalar.wddl b/tools/testfiles/tldouble_scalar.wddl
new file mode 100755
index 0000000..0c17c31
--- /dev/null
+++ b/tools/testfiles/tldouble_scalar.wddl
@@ -0,0 +1,26 @@
+HDF5 "tldouble_scalar.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE H5T_ARRAY { [6] 128-bit little-endian floating-point }
+ DATASPACE SCALAR
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 96
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ DATA {
+ (0): [ 0, 1, 2, 3, 4, 5 ]
+ }
+ }
+}
+}