summaryrefslogtreecommitdiffstats
path: root/tools/test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test')
-rw-r--r--tools/test/h5diff/h5diffgentest.c2
-rw-r--r--tools/test/h5dump/CMakeTests.cmake2
-rw-r--r--tools/test/h5import/h5importtest.c28
-rw-r--r--tools/test/h5repack/CMakeTests.cmake6
-rw-r--r--tools/test/h5repack/h5repack.sh.in17
-rw-r--r--tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl14
6 files changed, 34 insertions, 35 deletions
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index 118a3a7..7cefeea 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -442,7 +442,6 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
write_dset(gid1, 2, dims2, "d2", H5T_NATIVE_DOUBLE, data14);
}
-#if H5_SIZEOF_LONG_DOUBLE != 0
{
/*-------------------------------------------------------------------------
@@ -454,7 +453,6 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
write_dset(gid1, 2, dims2, "ld", H5T_NATIVE_LDOUBLE, data15);
}
-#endif
/*-------------------------------------------------------------------------
* NaNs in H5T_NATIVE_FLOAT
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake
index a8984de..c0f279d 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -412,7 +412,7 @@
# --------------------------------------------------------------------
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tbin1.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl" "h5dump_std_files")
- if (WIN32)
+ if (WIN32 AND CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION VERSION_LESS 10.0.18362.0)
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}")
diff --git a/tools/test/h5import/h5importtest.c b/tools/test/h5import/h5importtest.c
index e49125b..7dbf762 100644
--- a/tools/test/h5import/h5importtest.c
+++ b/tools/test/h5import/h5importtest.c
@@ -46,11 +46,9 @@ main(void)
int rowo4i = 11, colo4i = 21, plno4i = 51;
int rowi4i = 1, coli4i = 2, plni4i = 5;
-#ifdef H5_SIZEOF_LONG_LONG
long long row4i64[3], col4i64[4], pln4i64[5];
long long rowo4i64 = (long long)11, colo4i64 = (long long)21, plno4i64 = (long long)51;
long long rowi4i64 = (long long)1, coli4i64 = (long long)2, plni4i64 = (long long)5;
-#endif
short b16i3[5][3][4];
short row4i16[3], col4i16[4], pln4i16[5];
@@ -101,11 +99,9 @@ main(void)
col4i[0] = colo4i;
pln4i[0] = plno4i;
-#ifdef H5_SIZEOF_LONG_LONG
row4i64[0] = rowo4i64;
col4i64[0] = colo4i64;
pln4i64[0] = plno4i64;
-#endif
row4i16[0] = rowo4i16;
col4i16[0] = colo4i16;
@@ -116,33 +112,27 @@ main(void)
pln4i8[0] = plno4i8;
for (i = 1; i < nrow; i++) {
- row4[i] = row4[i - 1] + rowi4;
- row8[i] = row8[i - 1] + rowi8;
- row4i[i] = row4i[i - 1] + rowi4i;
-#ifdef H5_SIZEOF_LONG_LONG
+ row4[i] = row4[i - 1] + rowi4;
+ row8[i] = row8[i - 1] + rowi8;
+ row4i[i] = row4i[i - 1] + rowi4i;
row4i64[i] = row4i64[i - 1] + rowi4i64;
-#endif
row4i16[i] = (short)(row4i16[i - 1] + rowi4i16);
row4i8[i] = (char)(row4i8[i - 1] + rowi4i8);
}
for (j = 1; j < ncol; j++) {
- col4[j] = col4[j - 1] + coli4;
- col8[j] = col8[j - 1] + coli8;
- col4i[j] = col4i[j - 1] + coli4i;
-#ifdef H5_SIZEOF_LONG_LONG
+ col4[j] = col4[j - 1] + coli4;
+ col8[j] = col8[j - 1] + coli8;
+ col4i[j] = col4i[j - 1] + coli4i;
col4i64[j] = col4i64[j - 1] + coli4i64;
-#endif
col4i16[j] = (short)(col4i16[j - 1] + coli4i16);
col4i8[j] = (char)(col4i8[j - 1] + coli4i8);
}
for (k = 1; k < npln; k++) {
- pln4[k] = pln4[k - 1] + plni4;
- pln8[k] = pln8[k - 1] + plni8;
- pln4i[k] = pln4i[k - 1] + plni4i;
-#ifdef H5_SIZEOF_LONG_LONG
+ pln4[k] = pln4[k - 1] + plni4;
+ pln8[k] = pln8[k - 1] + plni8;
+ pln4i[k] = pln4i[k - 1] + plni4i;
pln4i64[k] = pln4i64[k - 1] + plni4i64;
-#endif
pln4i16[k] = (short)(pln4i16[k - 1] + plni4i16);
pln4i8[k] = (char)(pln4i8[k - 1] + plni4i8);
}
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index 037287d..397c3ac 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -1544,7 +1544,7 @@
# the references in attribute of compund or vlen datatype
ADD_H5_TEST (HDFFV-5932 "TEST" ${FILE_ATTR_REF})
-# Add test for memory leak in attirbute. This test is verified by CTEST.
+# Add test for memory leak in attribute. This test is verified by CTEST.
# 1. leak from vlen string
# 2. leak from compound type without reference member
# (HDFFV-7840, )
@@ -1552,12 +1552,12 @@
ADD_H5_TEST (HDFFV-7840 "TEST" h5diff_attr1.h5)
# test CVE-2018-17432 fix
- set (arg h5repack_CVE-2018-17432.h5 h5repack__CVE-2018-17432_out.h5 --low=1 --high=2 -f GZIP=8 -l dset1:CHUNK=5x6)
+ set (arg h5repack_CVE-2018-17432.h5 --low=1 --high=2 -f GZIP=8 -l dset1:CHUNK=5x6)
set (TESTTYPE "TEST")
ADD_H5_FILTER_TEST (HDFFV-10590 "" ${TESTTYPE} 1 ${arg})
# test CVE-2018-14460 fix
- set (arg h5repack_CVE-2018-14460.h5 h5repack_CVE-2018-14460_out.h5)
+ set (arg h5repack_CVE-2018-14460.h5)
set (TESTTYPE "TEST")
ADD_H5_FILTER_TEST (HDFFV-11223 "" ${TESTTYPE} 1 ${arg})
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in
index 3756a95..1e54670 100644
--- a/tools/test/h5repack/h5repack.sh.in
+++ b/tools/test/h5repack/h5repack.sh.in
@@ -885,13 +885,24 @@ TOOLTEST_FAIL()
(
cd $TESTDIR
$ENVCMD $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
- ) >$actual
+ ) >&$actual
RET=$?
- if [ $RET == 0 ] ; then
+
+ # Normally h5repack of files tested with this function are expected
+ # to return not 0, but if the command results in "Segmentation fault"
+ # or "core dumped" it is a failure regardless of the return value.
+ failure=`grep -e 'Segmentation fault' -e 'core dumped' $actual`
+ if [ "$failure" != "" ]; then
nerrors="`expr $nerrors + 1`"
echo " FAILED"
+ echo " $failure"
else
- echo " PASSED"
+ if [ $RET == 0 ] ; then
+ nerrors="`expr $nerrors + 1`"
+ echo " FAILED"
+ else
+ echo " PASSED"
+ fi
fi
rm -f $outfile
}
diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl
index eeb0f2d..15ae813 100644
--- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl
+++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl
@@ -11,7 +11,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 0 }
+ PARAMS { 9 1 13 1 }
}
}
FILLVALUE {
@@ -33,7 +33,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 0 }
+ PARAMS { 9 1 13 1 }
}
}
FILLVALUE {
@@ -55,7 +55,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 0 }
+ PARAMS { 9 1 13 1 }
}
}
FILLVALUE {
@@ -77,7 +77,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 0 }
+ PARAMS { 9 1 13 1 }
}
}
FILLVALUE {
@@ -99,7 +99,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 0 }
+ PARAMS { 9 1 13 1 }
}
}
FILLVALUE {
@@ -121,7 +121,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 0 }
+ PARAMS { 9 1 13 1 }
}
}
FILLVALUE {
@@ -143,7 +143,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 13 0 }
+ PARAMS { 9 1 13 1 }
}
}
FILLVALUE {