diff options
author | kmu <kmu@hdfgroup.org> | 2020-01-14 17:28:27 (GMT) |
---|---|---|
committer | kmu <kmu@hdfgroup.org> | 2020-01-14 17:28:27 (GMT) |
commit | d46ea2d08af456f1cfaf6c6fd3060f39b92be8de (patch) | |
tree | 3b7ce8804ae917fd71e995a39b4ccb08d2aa7169 /tools/test/h5repack | |
parent | 156baee37112996291f9ff07760be047d0e03c76 (diff) | |
parent | 71b817038d8cd82163cf71119873b2ba65a2c81b (diff) | |
download | hdf5-d46ea2d08af456f1cfaf6c6fd3060f39b92be8de.zip hdf5-d46ea2d08af456f1cfaf6c6fd3060f39b92be8de.tar.gz hdf5-d46ea2d08af456f1cfaf6c6fd3060f39b92be8de.tar.bz2 |
merge and fix conflicts
Diffstat (limited to 'tools/test/h5repack')
5 files changed, 103 insertions, 3 deletions
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index c8db1c3..0c761e2 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -85,6 +85,9 @@ ${HDF5_TOOLS_DIR}/testfiles/tfamily00009.h5 ${HDF5_TOOLS_DIR}/testfiles/tfamily00010.h5 ${HDF5_TOOLS_DIR}/testfiles/tordergr.h5 + # reference conversion files + ${HDF5_TOOLS_DIR}/testfiles/tattrreg.h5 + ${HDF5_TOOLS_DIR}/testfiles/tdatareg.h5 # tools/testfiles/vds ${HDF5_TOOLS_DIR}/testfiles/vds/1_a.h5 ${HDF5_TOOLS_DIR}/testfiles/vds/1_b.h5 @@ -148,6 +151,9 @@ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/3_1_vds.h5-vds_chunk2x5x8-v ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_compa-v ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_conti-v + # refs + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/attrregion.tattrreg.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/dataregion.tdatareg.h5 ) foreach (h5_file ${LIST_HDF5_TEST_FILES}) @@ -1468,6 +1474,12 @@ endif () ADD_H5_VERIFY_VDS (vds_conti ${TESTTYPE} 0 ${FILEV4} vds_dset CONTIGUOUS -l vds_dset:CONTI) +################################################################ +# reference new api conversions +############################################################### +ADD_H5_DMP_TEST (attrregion "TEST" 0 tattrreg.h5) +ADD_H5_DMP_TEST (dataregion "TEST" 0 tdatareg.h5) + ############################################################################## ### V E R S I O N B O U N D S T E S T S ############################################################################## diff --git a/tools/test/h5repack/h5repackgentest.c b/tools/test/h5repack/h5repackgentest.c index 87ca31c..7c0e7f1 100644 --- a/tools/test/h5repack/h5repackgentest.c +++ b/tools/test/h5repack/h5repackgentest.c @@ -266,7 +266,7 @@ generate_uint8be(hbool_t external) { for (i = 0, n = 0; i < dims[0]; i++) { for (j = 0; j < dims[1]; j++) { for (k = 0; k < dims[2]; k++, n++) { - wdata[n] = n * ((n & 1) ? (-1) : (1)); + wdata[n] = (uint8_t)((n & 1) ? -n : n); } } } @@ -296,7 +296,7 @@ generate_f32le(hbool_t external) { /* Generate values */ for (i = 0, k = 0, n = 0; i < dims[0]; i++) { for (j = 0; j < dims[1]; j++, k++, n++) { - wdata[k] = n * 801.1 * ((k % 5 == 1) ? (-1) : (1)); + wdata[k] = (float)(n * 801.1 * ((k % 5 == 1) ? (-1) : (1))); } } diff --git a/tools/test/h5repack/testfiles/attrregion.tattrreg.h5.ddl b/tools/test/h5repack/testfiles/attrregion.tattrreg.h5.ddl new file mode 100644 index 0000000..5a141aa --- /dev/null +++ b/tools/test/h5repack/testfiles/attrregion.tattrreg.h5.ddl @@ -0,0 +1,46 @@ +HDF5 "out-attrregion.tattrreg.h5" { +GROUP "/" { + DATASET "Dataset1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 0 + OFFSET 18446744073709551615 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + ATTRIBUTE "Attribute1" { + DATATYPE H5T_REFERENCE { H5T_STD_REF_DSETREG } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + } + } + DATASET "Dataset2" { + DATATYPE H5T_STD_U8BE + DATASPACE SIMPLE { ( 10, 10 ) / ( 10, 10 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 100 + OFFSET 2048 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + } +} +} diff --git a/tools/test/h5repack/testfiles/dataregion.tdatareg.h5.ddl b/tools/test/h5repack/testfiles/dataregion.tdatareg.h5.ddl new file mode 100644 index 0000000..bd31118 --- /dev/null +++ b/tools/test/h5repack/testfiles/dataregion.tdatareg.h5.ddl @@ -0,0 +1,42 @@ +HDF5 "out-dataregion.tdatareg.h5" { +GROUP "/" { + DATASET "Dataset1" { + DATATYPE H5T_REFERENCE { H5T_STD_REF_DSETREG } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 48 + OFFSET 6244 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_UNDEFINED + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + } + DATASET "Dataset2" { + DATATYPE H5T_STD_U8BE + DATASPACE SIMPLE { ( 10, 10 ) / ( 10, 10 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 100 + OFFSET 2048 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_UNDEFINED + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + } +} +} diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst b/tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst index 4e69148..9e83ff8 100644 --- a/tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst +++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst @@ -44,4 +44,4 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): #000: (file name) line (number) in do_copy_objects(): H5Dcreate2 failed major: Failure in tools library - minor: error in function + minor: function info |