summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5diff_array.c47
-rw-r--r--tools/lib/h5diff_util.c2
-rw-r--r--tools/lib/h5tools.c14
-rw-r--r--tools/lib/h5tools_str.c2
-rw-r--r--tools/lib/h5tools_utils.c1
-rw-r--r--tools/src/h5dump/h5dump.c3
-rw-r--r--tools/src/h5import/h5import.c38
-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
13 files changed, 65 insertions, 111 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 2d6c66c..1b0d36f 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -24,12 +24,8 @@
*-------------------------------------------------------------------------
*/
-#define F_FORMAT "%-15g %-15g %-15g\n"
-
-#if H5_SIZEOF_LONG_DOUBLE != 0
-#define LD_FORMAT "%-15Lg %-15Lg %-15Lg\n"
-#endif
-
+#define F_FORMAT "%-15g %-15g %-15g\n"
+#define LD_FORMAT "%-15Lg %-15Lg %-15Lg\n"
#define I_FORMAT "%-15d %-15d %-15d\n"
#define S_FORMAT "%-16s %-17s\n"
#define UI_FORMAT "%-15u %-15u %-15u\n"
@@ -39,12 +35,8 @@
#define ULLI_FORMAT "%-15" H5_PRINTF_LL_WIDTH "u %-15" H5_PRINTF_LL_WIDTH "u %-15" H5_PRINTF_LL_WIDTH "u\n"
/* with -p option */
-#define F_FORMAT_P "%-15.10g %-15.10g %-15.10g %-14.10g\n"
-
-#if H5_SIZEOF_LONG_DOUBLE != 0
-#define LD_FORMAT_P "%-15.10Lg %-15.10Lg %-15.10Lg %-14.10Lg\n"
-#endif
-
+#define F_FORMAT_P "%-15.10g %-15.10g %-15.10g %-14.10g\n"
+#define LD_FORMAT_P "%-15.10Lg %-15.10Lg %-15.10Lg %-14.10Lg\n"
#define I_FORMAT_P "%-15d %-15d %-15d %-14f\n"
#define UI_FORMAT_P "%-15u %-15u %-15u %-14f\n"
#define LI_FORMAT_P "%-15ld %-15ld %-15ld %-14f\n"
@@ -56,12 +48,8 @@
#define SPACES " "
/* not comparable */
-#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.10Lg %-15.10Lg %-15.10Lg not comparable\n"
-#endif
-
+#define F_FORMAT_P_NOTCOMP "%-15.10g %-15.10g %-15.10g not comparable\n"
+#define LD_FORMAT_P_NOTCOMP "%-15.10Lg %-15.10Lg %-15.10Lg not comparable\n"
#define I_FORMAT_P_NOTCOMP "%-15d %-15d %-15d not comparable\n"
#define UI_FORMAT_P_NOTCOMP "%-15u %-15u %-15u not comparable\n"
#define LI_FORMAT_P_NOTCOMP "%-15ld %-15ld %-15ld not comparable\n"
@@ -145,9 +133,7 @@ static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, h
diff_opt_t *opts);
static hbool_t equal_float(float value, float expected, diff_opt_t *opts);
static hbool_t equal_double(double value, double expected, diff_opt_t *opts);
-#if H5_SIZEOF_LONG_DOUBLE != 0
static hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *opts);
-#endif
static int print_data(diff_opt_t *opts);
static void print_pos(diff_opt_t *opts, hsize_t elemtno, size_t u);
@@ -162,10 +148,8 @@ static hsize_t diff_float_element(unsigned char *mem1, unsigned char *mem2, hsiz
diff_opt_t *opts);
static hsize_t diff_double_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
diff_opt_t *opts);
-#if H5_SIZEOF_LONG_DOUBLE != 0
static hsize_t diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
diff_opt_t *opts);
-#endif
static hsize_t diff_schar_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
diff_opt_t *opts);
static hsize_t diff_uchar_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
@@ -191,12 +175,7 @@ static hsize_t diff_ullong_element(unsigned char *mem1, unsigned char *mem2, hsi
*-------------------------------------------------------------------------
*/
-#if H5_SIZEOF_LONG_DOUBLE != 0
typedef enum dtype_t { FLT_FLOAT, FLT_DOUBLE, FLT_LDOUBLE } dtype_t;
-#else
-
-typedef enum dtype_t { FLT_FLOAT, FLT_DOUBLE } dtype_t;
-#endif
/*-------------------------------------------------------------------------
* XCAO, 11/10/2010
@@ -278,7 +257,6 @@ diff_array(void *_mem1, void *_mem2, diff_opt_t *opts, hid_t container1_id, hid_
return nfound;
} /* nelmts */
}
-#if H5_SIZEOF_LONG_DOUBLE != 0
else if (H5Tequal(opts->m_tid, H5T_NATIVE_LDOUBLE)) {
for (i = 0; i < opts->hs_nelmts; i++) {
nfound += diff_ldouble_element(mem1, mem2, i, opts);
@@ -289,7 +267,6 @@ diff_array(void *_mem1, void *_mem2, diff_opt_t *opts, hid_t container1_id, hid_
return nfound;
} /* nelmts */
}
-#endif
break;
case H5T_INTEGER:
@@ -1620,6 +1597,9 @@ character_compare_opt(unsigned char *mem1, unsigned char *mem2, hsize_t elemtno,
hbool_t both_zero = FALSE;
double per;
+ /* both_zero is set in the PER_UNSIGN macro but not used in this function */
+ (void)both_zero;
+
HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char));
HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char));
H5TOOLS_START_DEBUG(" %d=%d", temp1_uchar, temp2_uchar);
@@ -2034,7 +2014,6 @@ diff_double_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
* Return: number of differences found
*-------------------------------------------------------------------------
*/
-#if H5_SIZEOF_LONG_DOUBLE != 0
static hsize_t
diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, diff_opt_t *opts)
@@ -2070,7 +2049,7 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
/* both not NaN, do the comparison */
if (!isnan1 && !isnan2) {
- if (ABS(temp1_double - temp2_double) > opts->delta) {
+ if ((double)ABS(temp1_double - temp2_double) > opts->delta) {
opts->print_percentage = 0;
print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
@@ -2163,7 +2142,7 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
}
nfound++;
}
- else if (per > opts->percent && ABS(temp1_double - temp2_double) > opts->delta) {
+ else if (per > opts->percent && (double)ABS(temp1_double - temp2_double) > opts->delta) {
opts->print_percentage = 1;
print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
@@ -2200,7 +2179,6 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
return nfound;
}
-#endif /* H5_SIZEOF_LONG_DOUBLE */
/*-------------------------------------------------------------------------
* Function: diff_schar_element
@@ -3203,7 +3181,6 @@ equal_double(double value, double expected, diff_opt_t *opts)
*-------------------------------------------------------------------------
*/
-#if H5_SIZEOF_LONG_DOUBLE != 0
static hbool_t
equal_ldouble(long double value, long double expected, diff_opt_t *opts)
{
@@ -3244,8 +3221,6 @@ equal_ldouble(long double value, long double expected, diff_opt_t *opts)
return FALSE;
}
-#endif /* #if H5_SIZEOF_LONG_DOUBLE !=0 */
-
/*-------------------------------------------------------------------------
* Function: equal_float
*
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c
index e487a12..c40de9d 100644
--- a/tools/lib/h5diff_util.c
+++ b/tools/lib/h5diff_util.c
@@ -133,10 +133,8 @@ print_type(hid_t type)
parallel_print("H5T_NATIVE_FLOAT");
else if (H5Tequal(type, H5T_NATIVE_DOUBLE))
parallel_print("H5T_NATIVE_DOUBLE");
-#if H5_SIZEOF_LONG_DOUBLE != 0
else if (H5Tequal(type, H5T_NATIVE_LDOUBLE))
parallel_print("H5T_NATIVE_LDOUBLE");
-#endif
else
parallel_print("undefined float");
break;
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 5e60941..78e5c48 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1903,15 +1903,21 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
hid_t region_id = H5I_INVALID_HID;
hid_t region_space = H5I_INVALID_HID;
H5S_sel_type region_type;
+ H5R_ref_t tref;
+
+ if (size > sizeof(tref))
+ H5TOOLS_THROW((-1), "unexpectedly large ref");
+
+ HDmemset(&tref, 0, sizeof(tref));
for (block_index = 0; block_index < block_nelmts; block_index++) {
mem = ((unsigned char *)_mem) + block_index * size;
- if ((region_id = H5Ropen_object((H5R_ref_t *)mem, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ HDmemcpy(&tref, mem, size);
+ if ((region_id = H5Ropen_object(&tref, H5P_DEFAULT, H5P_DEFAULT)) < 0)
H5TOOLS_INFO("H5Ropen_object H5T_STD_REF failed");
else {
- if ((region_space = H5Ropen_region((H5R_ref_t *)mem, H5P_DEFAULT, H5P_DEFAULT)) >=
- 0) {
- if (!h5tools_is_zero(mem, H5Tget_size(H5T_STD_REF))) {
+ if ((region_space = H5Ropen_region(&tref, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ if (!h5tools_is_zero(&tref, H5Tget_size(H5T_STD_REF))) {
region_type = H5Sget_select_type(region_space);
if (region_type == H5S_SEL_POINTS)
render_bin_output_region_points(region_space, region_id, stream,
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index abc0058..3cd12bb 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -705,7 +705,6 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
HDmemcpy(&tempdouble, vp, sizeof(double));
h5tools_str_append(str, OPT(info->fmt_double, "%g"), tempdouble);
-#if H5_SIZEOF_LONG_DOUBLE != 0
}
else if (sizeof(long double) == nsize) {
/* if (H5Tequal(type, H5T_NATIVE_LDOUBLE)) */
@@ -713,7 +712,6 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
HDmemcpy(&templdouble, vp, sizeof(long double));
h5tools_str_append(str, "%Lg", templdouble);
-#endif
}
else {
size_t i;
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index f2407bf..ea9812b 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -450,6 +450,7 @@ free_table(table_t *table)
HDfree(table->objs[u].objname);
HDfree(table->objs);
+ HDfree(table);
}
#ifdef H5DUMP_DEBUG
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 36114ba..2901241 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -453,11 +453,8 @@ table_list_free(void)
/* Free each table */
free_table(table_list.tables[u].group_table);
- HDfree(table_list.tables[u].group_table);
free_table(table_list.tables[u].dset_table);
- HDfree(table_list.tables[u].dset_table);
free_table(table_list.tables[u].type_table);
- HDfree(table_list.tables[u].type_table);
}
/* Free the table list */
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index 6517e43..7272dff 100644
--- a/tools/src/h5import/h5import.c
+++ b/tools/src/h5import/h5import.c
@@ -467,14 +467,12 @@ readIntegerData(FILE *strm, struct Input *in)
H5DT_INT16 temp16;
H5DT_INT32 *in32;
H5DT_INT32 temp32;
-#ifdef H5_SIZEOF_LONG_LONG
H5DT_INT64 *in64;
H5DT_INT64 temp64;
char buffer[256];
-#endif
- hsize_t len = 1;
- hsize_t i;
- int j;
+ hsize_t len = 1;
+ hsize_t i;
+ int j;
const char *err1 = "Unable to get integer value from file.\n";
const char *err2 = "Unrecognized input class type.\n";
@@ -589,7 +587,6 @@ readIntegerData(FILE *strm, struct Input *in)
}
break;
-#ifdef H5_SIZEOF_LONG_LONG
case 64:
in64 = (H5DT_INT64 *)in->data;
switch (in->inputClass) {
@@ -626,7 +623,6 @@ readIntegerData(FILE *strm, struct Input *in)
return (-1);
}
break;
-#endif /* ifdef H5_SIZEOF_LONG_LONG */
default:
(void)HDfprintf(stderr, "%s", err3);
@@ -643,17 +639,15 @@ readUIntegerData(FILE *strm, struct Input *in)
H5DT_UINT16 temp16;
H5DT_UINT32 *in32;
H5DT_UINT32 temp32;
-#ifdef H5_SIZEOF_LONG_LONG
H5DT_UINT64 *in64;
H5DT_UINT64 temp64;
char buffer[256];
-#endif
- hsize_t len = 1;
- hsize_t i;
- int j;
- const char *err1 = "Unable to get unsigned integer value from file.\n";
- const char *err2 = "Unrecognized input class type.\n";
- const char *err3 = "Invalid input size.\n";
+ hsize_t len = 1;
+ hsize_t i;
+ int j;
+ const char * err1 = "Unable to get unsigned integer value from file.\n";
+ const char * err2 = "Unrecognized input class type.\n";
+ const char * err3 = "Invalid input size.\n";
for (j = 0; j < in->rank; j++)
len *= in->sizeOfDimension[j];
@@ -760,7 +754,6 @@ readUIntegerData(FILE *strm, struct Input *in)
}
break;
-#ifdef H5_SIZEOF_LONG_LONG
case 64:
in64 = (H5DT_UINT64 *)in->data;
switch (in->inputClass) {
@@ -797,7 +790,6 @@ readUIntegerData(FILE *strm, struct Input *in)
return (-1);
}
break;
-#endif /* ifdef H5_SIZEOF_LONG_LONG */
default:
(void)HDfprintf(stderr, "%s", err3);
@@ -2457,9 +2449,6 @@ validateConfigurationParameters(struct Input *in)
const char *err4a = "OUTPUT-ARCHITECTURE cannot be STD if OUTPUT-CLASS is floating point (FP).\n";
const char *err4b = "OUTPUT-ARCHITECTURE cannot be IEEE if OUTPUT-CLASS is integer (IN).\n";
const char *err5 = "For OUTPUT-CLASS FP, valid values for OUTPUT-SIZE are (32, 64) .\n";
-#ifndef H5_SIZEOF_LONG_LONG
- const char *err6 = "No support for reading 64-bit integer (INPUT-CLASS: IN, TEXTIN, UIN, TEXTUIN files\n";
-#endif
/* for class STR other parameters are ignored */
if (in->inputClass == 5) /* STR */
@@ -2505,13 +2494,6 @@ validateConfigurationParameters(struct Input *in)
return (-1);
}
-#ifndef H5_SIZEOF_LONG_LONG
- if (in->inputSize == 64 &&
- (in->inputClass == 0 || in->inputClass == 4 || in->inputClass == 6 || in->inputClass == 7)) {
- (void)HDfprintf(stderr, "%s", err6);
- return -1;
- }
-#endif
return (0);
}
@@ -3250,7 +3232,6 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
-#if H5_SIZEOF_LONG_DOUBLE != 0
else if (!HDstrcmp(buffer, "H5T_NATIVE_LDOUBLE")) {
in->inputSize = H5_SIZEOF_LONG_DOUBLE;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3263,7 +3244,6 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
-#endif
else if (!HDstrcmp(buffer, "H5T_TIME: not yet implemented")) {
kindex = -1;
}
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 {