summaryrefslogtreecommitdiffstats
path: root/tools/test
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2020-01-14 17:28:27 (GMT)
committerkmu <kmu@hdfgroup.org>2020-01-14 17:28:27 (GMT)
commitd46ea2d08af456f1cfaf6c6fd3060f39b92be8de (patch)
tree3b7ce8804ae917fd71e995a39b4ccb08d2aa7169 /tools/test
parent156baee37112996291f9ff07760be047d0e03c76 (diff)
parent71b817038d8cd82163cf71119873b2ba65a2c81b (diff)
downloadhdf5-d46ea2d08af456f1cfaf6c6fd3060f39b92be8de.zip
hdf5-d46ea2d08af456f1cfaf6c6fd3060f39b92be8de.tar.gz
hdf5-d46ea2d08af456f1cfaf6c6fd3060f39b92be8de.tar.bz2
merge and fix conflicts
Diffstat (limited to 'tools/test')
-rw-r--r--tools/test/h5diff/CMakeTests.cmake22
-rw-r--r--tools/test/h5diff/dynlib_diff.c4
-rw-r--r--tools/test/h5diff/testfiles/h5diff_58.txt4
-rw-r--r--tools/test/h5diff/testfiles/h5diff_58_ref.txt37
-rw-r--r--tools/test/h5diff/testfiles/h5diff_reg.txt15
-rw-r--r--tools/test/h5diff/testh5diff.sh.in22
-rw-r--r--tools/test/h5dump/CMakeTests.cmake39
-rw-r--r--tools/test/h5dump/dynlib_dump.c4
-rw-r--r--tools/test/h5dump/errfiles/tarray1_big.err57
-rw-r--r--tools/test/h5dump/errfiles/tattrregR.err38
-rw-r--r--tools/test/h5dump/errfiles/tdataregR.err38
-rw-r--r--tools/test/h5dump/h5dumpgentest.c20
-rw-r--r--tools/test/h5dump/testh5dump.sh.in46
-rw-r--r--tools/test/h5ls/CMakeTests.cmake2
-rw-r--r--tools/test/h5ls/dynlib_ls.c4
-rw-r--r--tools/test/h5repack/CMakeTests.cmake12
-rw-r--r--tools/test/h5repack/h5repackgentest.c4
-rw-r--r--tools/test/h5repack/testfiles/attrregion.tattrreg.h5.ddl46
-rw-r--r--tools/test/h5repack/testfiles/dataregion.tdatareg.h5.ddl42
-rw-r--r--tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst2
-rw-r--r--tools/test/misc/CMakeTestsMkgrp.cmake2
-rw-r--r--tools/test/perform/CMakeLists.txt16
-rw-r--r--tools/test/perform/pio_engine.c6
-rw-r--r--tools/test/perform/pio_perf.c4
-rw-r--r--tools/test/perform/pio_perf.h3
-rw-r--r--tools/test/perform/pio_standalone.c135
-rw-r--r--tools/test/perform/sio_perf.h3
27 files changed, 477 insertions, 150 deletions
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index 57bcd12..347f796 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -94,6 +94,17 @@
${HDF5_TOOLS_DIR}/testfiles/vds/5_vds.h5
# tools/testfiles
${HDF5_TOOLS_DIR}/testfiles/tvlstr.h5
+ #STD_REF_OBJ files
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_attr.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_compat.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_ext1.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_ext2.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_grp.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_obj_del.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_obj.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_param.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_reg_1d.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_reg.h5
)
set (LIST_OTHER_TEST_FILES
@@ -201,6 +212,7 @@
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_56.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_57.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_58.txt
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_58_ref.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_59.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_500.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_501.txt
@@ -282,6 +294,7 @@
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_90.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_8625.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_8639.txt
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_reg.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_ud.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_udfail.err
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_udfail.txt
@@ -1044,7 +1057,10 @@ ADD_H5_TEST (h5diff_56 1 -v ${FILE4} ${FILE4} dset6a dset6b)
ADD_H5_TEST (h5diff_57 0 -v ${FILE4} ${FILE4} dset7a dset7b)
# 5.8 (region reference)
-ADD_H5_TEST (h5diff_58 1 -v ${FILE7} ${FILE8} refreg)
+ADD_H5_TEST (h5diff_58 1 -v2 ${FILE7} ${FILE8} refreg)
+ADD_H5_TEST (h5diff_58_ref 1 -v2 ${FILE7} ${FILE8} /g1/reference2D)
+# STD_REF_OBJ
+ADD_H5_TEST (h5diff_reg 0 -v2 trefer_attr.h5 trefer_ext2.h5 Dataset3 Dataset3)
# test for both dset and attr with same type but with different size
# ( HDDFV-7942 )
@@ -1484,8 +1500,6 @@ ADD_H5_TEST (h5diff_485 0 -v --exclude-path "/group1" h5diff_exclude3-1.h5 h5dif
ADD_H5_TEST (h5diff_486 0 -v --exclude-path "/group1" h5diff_exclude3-2.h5 h5diff_exclude3-1.h5)
ADD_H5_TEST (h5diff_487 1 -v --exclude-path "/group1/dset" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5)
-
-
# ##############################################################################
# # diff various multiple vlen and fixed strings in a compound type dataset
# ##############################################################################
@@ -1524,7 +1538,7 @@ ADD_H5_TEST (h5diff_800 1 -v ${FILE7} ${FILE8} /g1/array /g1/array)
ADD_H5_TEST (h5diff_801 1 -v ${FILE7} ${FILE8A} /g1/array /g1/array)
# ##############################################################################
-# VDS tests
+# # VDS tests
# ##############################################################################
ADD_H5_TEST (h5diff_v1 0 -v ${FILEV1} ${FILEV2})
ADD_H5_TEST (h5diff_v2 0 -r ${FILEV1} ${FILEV2})
diff --git a/tools/test/h5diff/dynlib_diff.c b/tools/test/h5diff/dynlib_diff.c
index 571452e..661a6dc 100644
--- a/tools/test/h5diff/dynlib_diff.c
+++ b/tools/test/h5diff/dynlib_diff.c
@@ -69,7 +69,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Subtract the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp - MULTIPLIER;
+ *int_ptr = (int8_t)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -78,7 +78,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Add the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp + MULTIPLIER;
+ *int_ptr = (int8_t)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/test/h5diff/testfiles/h5diff_58.txt b/tools/test/h5diff/testfiles/h5diff_58.txt
index d27a0c9..da147bc 100644
--- a/tools/test/h5diff/testfiles/h5diff_58.txt
+++ b/tools/test/h5diff/testfiles/h5diff_58.txt
@@ -1,3 +1,4 @@
+
dataset: </refreg> and </refreg>
Referenced dataset 10784 10784
------------------------------------------------------------
@@ -8,4 +9,7 @@ point #1 (2,2) (3,3)
point #3 (1,6) (2,5)
point #4 (2,8) (1,7)
4 differences found
+ obj1 obj2
+ --------------------------------------
+Attributes status: 0 common, 0 only in obj1, 0 only in obj2
EXIT CODE: 1
diff --git a/tools/test/h5diff/testfiles/h5diff_58_ref.txt b/tools/test/h5diff/testfiles/h5diff_58_ref.txt
new file mode 100644
index 0000000..6fa2299
--- /dev/null
+++ b/tools/test/h5diff/testfiles/h5diff_58_ref.txt
@@ -0,0 +1,37 @@
+
+dataset: </g1/reference2D> and </g1/reference2D>
+size: [2] [2]
+position difference
+------------------------------------------------------------
+[ 0 ] 1 0 1
+[ 1 ] 2 0 2
+size: [2] [2]
+position difference
+------------------------------------------------------------
+[ 0 ] 1 0 1
+[ 1 ] 2 0 2
+size: [2] [2]
+position difference
+------------------------------------------------------------
+[ 0 ] 1 0 1
+[ 1 ] 2 0 2
+size: [2] [2]
+position difference
+------------------------------------------------------------
+[ 0 ] 1 0 1
+[ 1 ] 2 0 2
+size: [2] [2]
+position difference
+------------------------------------------------------------
+[ 0 ] 1 0 1
+[ 1 ] 2 0 2
+size: [2] [2]
+position difference
+------------------------------------------------------------
+[ 0 ] 1 0 1
+[ 1 ] 2 0 2
+12 differences found
+ obj1 obj2
+ --------------------------------------
+Attributes status: 0 common, 0 only in obj1, 0 only in obj2
+EXIT CODE: 1
diff --git a/tools/test/h5diff/testfiles/h5diff_reg.txt b/tools/test/h5diff/testfiles/h5diff_reg.txt
new file mode 100644
index 0000000..d4f5415
--- /dev/null
+++ b/tools/test/h5diff/testfiles/h5diff_reg.txt
@@ -0,0 +1,15 @@
+
+dataset: </Dataset3> and </Dataset3>
+attribute: <Attr1 of <(null)>> and <Attr1 of <(null)>>
+0 differences found
+Warning: Cannot open referenced attribute: attribute 1
+Warning: Cannot open referenced attribute: attribute 2
+attribute: <Attr2 of <(null)>> and <Attr2 of <(null)>>
+0 differences found
+attribute: <Attr3 of <(null)>> and <Attr3 of <(null)>>
+0 differences found
+0 differences found
+ obj1 obj2
+ --------------------------------------
+Attributes status: 0 common, 0 only in obj1, 0 only in obj2
+EXIT CODE: 0
diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in
index 557d2ff..2d490a8 100644
--- a/tools/test/h5diff/testh5diff.sh.in
+++ b/tools/test/h5diff/testh5diff.sh.in
@@ -150,6 +150,19 @@ $SRC_TOOLS_TESTFILES/vds/5_c.h5
$SRC_TOOLS_TESTFILES/vds/5_vds.h5
"
+LIST_HDF5_STD_REF_OBJ_TEST_FILES="
+$SRC_TOOLS_TESTFILES/trefer_attr.h5
+$SRC_TOOLS_TESTFILES/trefer_compat.h5
+$SRC_TOOLS_TESTFILES/trefer_ext1.h5
+$SRC_TOOLS_TESTFILES/trefer_ext2.h5
+$SRC_TOOLS_TESTFILES/trefer_grp.h5
+$SRC_TOOLS_TESTFILES/trefer_obj_del.h5
+$SRC_TOOLS_TESTFILES/trefer_obj.h5
+$SRC_TOOLS_TESTFILES/trefer_param.h5
+$SRC_TOOLS_TESTFILES/trefer_reg_1d.h5
+$SRC_TOOLS_TESTFILES/trefer_reg.h5
+"
+
LIST_OTHER_TEST_FILES="
$SRC_H5DIFF_TESTFILES/h5diff_10.txt
$SRC_H5DIFF_TESTFILES/h5diff_100.txt
@@ -259,6 +272,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_55.txt
$SRC_H5DIFF_TESTFILES/h5diff_56.txt
$SRC_H5DIFF_TESTFILES/h5diff_57.txt
$SRC_H5DIFF_TESTFILES/h5diff_58.txt
+$SRC_H5DIFF_TESTFILES/h5diff_58_ref.txt
$SRC_H5DIFF_TESTFILES/h5diff_59.txt
$SRC_H5DIFF_TESTFILES/h5diff_500.txt
$SRC_H5DIFF_TESTFILES/h5diff_501.txt
@@ -338,6 +352,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_80.txt
$SRC_H5DIFF_TESTFILES/h5diff_90.txt
$SRC_H5DIFF_TESTFILES/h5diff_8625.txt
$SRC_H5DIFF_TESTFILES/h5diff_8639.txt
+$SRC_H5DIFF_TESTFILES/h5diff_reg.txt
$SRC_H5DIFF_TESTFILES/h5diff_v1.txt
$SRC_H5DIFF_TESTFILES/h5diff_v2.txt
$SRC_H5DIFF_TESTFILES/h5diff_v3.txt
@@ -347,7 +362,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_vlstr.txt
#
# copy test files and expected output files from source dirs to test dir
#
-COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_HDF5_VDS_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_HDF5_TEST_FILES_XML $LIST_OTHER_TEST_FILES_XML"
+COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_HDF5_VDS_TEST_FILES $LIST_HDF5_STD_REF_OBJ_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_HDF5_TEST_FILES_XML $LIST_OTHER_TEST_FILES_XML"
COPY_TESTFILES_TO_TESTDIR()
{
@@ -691,7 +706,10 @@ TOOLTEST h5diff_56.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset6a dset6b
TOOLTEST h5diff_57.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset7a dset7b
# 5.8 (region reference)
-TOOLTEST h5diff_58.txt -v h5diff_dset1.h5 h5diff_dset2.h5 refreg
+TOOLTEST h5diff_58.txt -v2 h5diff_dset1.h5 h5diff_dset2.h5 refreg
+TOOLTEST h5diff_58_ref.txt -v2 h5diff_dset1.h5 h5diff_dset2.h5 /g1/reference2D
+# STD_REF_OBJ
+TOOLTEST h5diff_reg.txt -v2 trefer_attr.h5 trefer_ext2.h5 Dataset3 Dataset3
# test for both dset and attr with same type but with different size
# ( HDDFV-7942 )
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake
index 6299821..2e731f3 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -198,6 +198,16 @@
${HDF5_TOOLS_DIR}/testfiles/h5dump-help.txt
${HDF5_TOOLS_DIR}/testfiles/out3.h5import
${HDF5_TOOLS_DIR}/testfiles/zerodim.ddl
+ #STD_REF_OBJ files
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_attrR.ddl
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_compatR.ddl
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_extR.ddl
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_grpR.ddl
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_obj_delR.ddl
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_objR.ddl
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_paramR.ddl
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_reg_1dR.ddl
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_regR.ddl
)
set (HDF5_N_REFERENCE_FILES
tall-3
@@ -322,6 +332,18 @@
${HDF5_TOOLS_DIR}/testfiles/tvms.h5
${HDF5_TOOLS_DIR}/testfiles/t128bit_float.h5
${HDF5_TOOLS_DIR}/testfiles/zerodim.h5
+ #STD_REF_OBJ files
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_attr.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_compat.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_ext1.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_ext2.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_grp.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_obj_del.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_obj.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_param.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_reg_1d.h5
+ ${HDF5_TOOLS_DIR}/testfiles/trefer_reg.h5
+
)
set (HDF5_ERROR_REFERENCE_TEST_FILES
${PROJECT_SOURCE_DIR}/errfiles/filter_fail.err
@@ -892,7 +914,7 @@
# test for files with array data
ADD_H5_TEST (tarray1 0 --enable-error-stack tarray1.h5)
# # added for bug# 2092 - tarray1_big.h5
- ADD_H5ERR_MASK_TEST (tarray1_big 0 "Undefined reference pointer" --enable-error-stack -R tarray1_big.h5)
+ ADD_H5ERR_MASK_TEST (tarray1_big 0 "NULL token size" --enable-error-stack -R tarray1_big.h5)
ADD_H5_TEST (tarray2 0 --enable-error-stack tarray2.h5)
ADD_H5_TEST (tarray3 0 --enable-error-stack tarray3.h5)
ADD_H5_TEST (tarray4 0 --enable-error-stack tarray4.h5)
@@ -1103,11 +1125,22 @@
# test for dataset region references
ADD_H5_TEST (tdatareg 0 --enable-error-stack tdatareg.h5)
- ADD_H5ERR_MASK_TEST (tdataregR 0 "Undefined reference pointer" --enable-error-stack -R tdatareg.h5)
+ ADD_H5ERR_MASK_TEST (tdataregR 0 "NULL token size" --enable-error-stack -R tdatareg.h5)
ADD_H5_TEST (tattrreg 0 --enable-error-stack tattrreg.h5)
- ADD_H5ERR_MASK_TEST (tattrregR 0 "Undefined reference pointer" -R --enable-error-stack tattrreg.h5)
+ ADD_H5ERR_MASK_TEST (tattrregR 0 "NULL token size" -R --enable-error-stack tattrreg.h5)
ADD_H5_EXPORT_TEST (tbinregR tdatareg.h5 0 --enable-error-stack -d /Dataset1 -s 0 -R -y -o)
+ # test for 1.12 region references
+ ADD_H5_TEST (trefer_attrR 0 --enable-error-stack -R trefer_attr.h5)
+ ADD_H5_TEST (trefer_compatR 0 --enable-error-stack -R trefer_compat.h5)
+ ADD_H5_TEST (trefer_extR 0 --enable-error-stack -R trefer_ext2.h5)
+ ADD_H5_TEST (trefer_grpR 0 --enable-error-stack -R trefer_grp.h5)
+ ADD_H5_TEST (trefer_obj_delR 0 --enable-error-stack -R trefer_obj_del.h5)
+ ADD_H5_TEST (trefer_objR 0 --enable-error-stack -R trefer_obj.h5)
+ ADD_H5_TEST (trefer_paramR 0 --enable-error-stack -R trefer_param.h5)
+ ADD_H5_TEST (trefer_regR 0 --enable-error-stack -R trefer_reg.h5)
+ ADD_H5_TEST (trefer_reg_1dR 0 --enable-error-stack -R trefer_reg_1d.h5)
+
# tests for group creation order
# "1" tracked, "2" name, root tracked
ADD_H5_TEST (tordergr1 0 --enable-error-stack --group=1 --sort_by=creation_order --sort_order=ascending tordergr.h5)
diff --git a/tools/test/h5dump/dynlib_dump.c b/tools/test/h5dump/dynlib_dump.c
index 571452e..661a6dc 100644
--- a/tools/test/h5dump/dynlib_dump.c
+++ b/tools/test/h5dump/dynlib_dump.c
@@ -69,7 +69,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Subtract the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp - MULTIPLIER;
+ *int_ptr = (int8_t)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -78,7 +78,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Add the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp + MULTIPLIER;
+ *int_ptr = (int8_t)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/test/h5dump/errfiles/tarray1_big.err b/tools/test/h5dump/errfiles/tarray1_big.err
index ff22495..a20b0b7 100644
--- a/tools/test/h5dump/errfiles/tarray1_big.err
+++ b/tools/test/h5dump/errfiles/tarray1_big.err
@@ -1,58 +1,31 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
+ #000: (file name) line (number) in H5Rget_obj_type3(): unable to get object token
major: References
- minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
- major: Virtual Object Layer
- minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
- major: Virtual Object Layer
- minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to dereference object
+ minor: Can't get value
+ #001: (file name) line (number) in H5R__get_obj_token(): NULL token size
major: References
- minor: Can't open object
- #004: (file name) line (number) in H5R__dereference(): Undefined reference pointer
- major: Invalid arguments to routine
- minor: Bad value
+ minor: Unable to copy object
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
+ #000: (file name) line (number) in H5Rget_obj_type3(): unable to get object token
major: References
- minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
- major: Virtual Object Layer
- minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
- major: Virtual Object Layer
- minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to dereference object
+ minor: Can't get value
+ #001: (file name) line (number) in H5R__get_obj_token(): NULL token size
major: References
- minor: Can't open object
- #004: (file name) line (number) in H5R__dereference(): Undefined reference pointer
- major: Invalid arguments to routine
- minor: Bad value
+ minor: Unable to copy object
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
+ #000: (file name) line (number) in H5Rget_obj_type3(): unable to get object token
major: References
- minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
- major: Virtual Object Layer
- minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
- major: Virtual Object Layer
- minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to dereference object
+ minor: Can't get value
+ #001: (file name) line (number) in H5R__get_obj_token(): NULL token size
major: References
- minor: Can't open object
- #004: (file name) line (number) in H5R__dereference(): Undefined reference pointer
- major: Invalid arguments to routine
- minor: Bad value
+ minor: Unable to copy object
H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
- #000: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
+ #000: (file name) line (number) in h5tools_dump_data(): H5Rget_obj_type3 H5R_OBJECT1 failed
major: Failure in tools library
minor: error in function
- #001: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
+ #001: (file name) line (number) in h5tools_dump_data(): H5Rget_obj_type3 H5R_OBJECT1 failed
major: Failure in tools library
minor: error in function
- #002: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
+ #002: (file name) line (number) in h5tools_dump_data(): H5Rget_obj_type3 H5R_OBJECT1 failed
major: Failure in tools library
minor: error in function
diff --git a/tools/test/h5dump/errfiles/tattrregR.err b/tools/test/h5dump/errfiles/tattrregR.err
index 8a1539c..fa2014a 100644
--- a/tools/test/h5dump/errfiles/tattrregR.err
+++ b/tools/test/h5dump/errfiles/tattrregR.err
@@ -1,39 +1,21 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
+ #000: (file name) line (number) in H5Rget_obj_type3(): unable to get object token
major: References
- minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
- major: Virtual Object Layer
- minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
- major: Virtual Object Layer
- minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to dereference object
+ minor: Can't get value
+ #001: (file name) line (number) in H5R__get_obj_token(): NULL token size
major: References
- minor: Can't open object
- #004: (file name) line (number) in H5R__dereference(): Undefined reference pointer
- major: Invalid arguments to routine
- minor: Bad value
+ minor: Unable to copy object
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
+ #000: (file name) line (number) in H5Rget_obj_type3(): unable to get object token
major: References
- minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
- major: Virtual Object Layer
- minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
- major: Virtual Object Layer
- minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to dereference object
+ minor: Can't get value
+ #001: (file name) line (number) in H5R__get_obj_token(): NULL token size
major: References
- minor: Can't open object
- #004: (file name) line (number) in H5R__dereference(): Undefined reference pointer
- major: Invalid arguments to routine
- minor: Bad value
+ minor: Unable to copy object
H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
- #000: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
+ #000: (file name) line (number) in h5tools_dump_data(): H5Rget_obj_type3 H5R_OBJECT1 failed
major: Failure in tools library
minor: error in function
- #001: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
+ #001: (file name) line (number) in h5tools_dump_data(): H5Rget_obj_type3 H5R_OBJECT1 failed
major: Failure in tools library
minor: error in function
diff --git a/tools/test/h5dump/errfiles/tdataregR.err b/tools/test/h5dump/errfiles/tdataregR.err
index 8a1539c..fa2014a 100644
--- a/tools/test/h5dump/errfiles/tdataregR.err
+++ b/tools/test/h5dump/errfiles/tdataregR.err
@@ -1,39 +1,21 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
+ #000: (file name) line (number) in H5Rget_obj_type3(): unable to get object token
major: References
- minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
- major: Virtual Object Layer
- minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
- major: Virtual Object Layer
- minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to dereference object
+ minor: Can't get value
+ #001: (file name) line (number) in H5R__get_obj_token(): NULL token size
major: References
- minor: Can't open object
- #004: (file name) line (number) in H5R__dereference(): Undefined reference pointer
- major: Invalid arguments to routine
- minor: Bad value
+ minor: Unable to copy object
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
+ #000: (file name) line (number) in H5Rget_obj_type3(): unable to get object token
major: References
- minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
- major: Virtual Object Layer
- minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
- major: Virtual Object Layer
- minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to dereference object
+ minor: Can't get value
+ #001: (file name) line (number) in H5R__get_obj_token(): NULL token size
major: References
- minor: Can't open object
- #004: (file name) line (number) in H5R__dereference(): Undefined reference pointer
- major: Invalid arguments to routine
- minor: Bad value
+ minor: Unable to copy object
H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
- #000: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
+ #000: (file name) line (number) in h5tools_dump_data(): H5Rget_obj_type3 H5R_OBJECT1 failed
major: Failure in tools library
minor: error in function
- #001: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
+ #001: (file name) line (number) in h5tools_dump_data(): H5Rget_obj_type3 H5R_OBJECT1 failed
major: Failure in tools library
minor: error in function
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index 5d4c21b..310b1ed 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -2565,7 +2565,7 @@ static void gent_bitfields(void)
goto error;
for(i = 0; i < sizeof buf; i++)
- buf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ buf[i] = (uint8_t)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
if(H5Sclose(space) < 0) goto error;
@@ -2579,7 +2579,7 @@ static void gent_bitfields(void)
(dset = H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
for(i = 0; i < sizeof buf; i++)
- buf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ buf[i] = (uint8_t)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
if(H5Sclose(space) < 0) goto error;
@@ -9814,7 +9814,7 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for (i = 0; i < nelmts; i++) {
- buf[i] = (uint8_t)0xff ^ (uint8_t)i;
+ buf[i] = (uint8_t)(0xff ^ i);
}
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
H5Dclose(dset);
@@ -9829,7 +9829,7 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for (i = 0; i < nelmts; i++) {
- buf2[i] = (uint16_t)0xffff ^ (uint16_t)(i * 16);
+ buf2[i] = (uint16_t)(0xffff ^ (i * 16));
}
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
H5Dclose(dset);
@@ -9879,7 +9879,7 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "opaque_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for(i = 0; i < nelmts; i++)
- buf[i] = (uint8_t)0xff ^ (uint8_t)i;
+ H5_CHECKED_ASSIGN(buf[i], uint8_t, 0xff ^ i, size_t);
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
H5Dclose(dset);
}
@@ -9895,7 +9895,7 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "opaque_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for(i = 0; i < nelmts; i++)
- buf2[i] = (uint16_t)0xffff ^ (uint16_t)(i * 16);
+ H5_CHECKED_ASSIGN(buf2[i], uint16_t, 0xffff ^ (i * 16), size_t);
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
H5Dclose(dset);
@@ -9918,8 +9918,8 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "compound_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for(i = 0; i < nelmts; i++) {
- buf5[i].a = (uint8_t)0xff ^ (uint8_t)i;
- buf5[i].b = (uint16_t)0xffff ^ (uint16_t)(i * 16);
+ H5_CHECKED_ASSIGN(buf5[i].a, uint8_t, 0xff ^ i, size_t);
+ H5_CHECKED_ASSIGN(buf5[i].b, uint16_t, 0xffff ^ (i * 16), size_t);
buf5[i].c = (uint32_t)0xffffffff ^ (uint32_t)(i * 32);
buf5[i].d = (uint64_t)0xffffffffffffffff ^ (uint64_t)(i * 64);
}
@@ -10488,7 +10488,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Subtract the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp - MULTIPLIER;
+ *int_ptr = (int8_t)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -10497,7 +10497,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Add the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp + MULTIPLIER;
+ *int_ptr = (int8_t)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index 141715c..53c8927 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -923,7 +923,43 @@ GREPTEST()
cd $TESTDIR
$ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
) >$actual 2>$actual_err
- if [[ "$txttype" = "ERRTXT" ]]; then
+ if [ "$txttype" = "ERRTXT" ]; then
+ $GREP "$expectdata" $actual_err > /dev/null
+ else
+ $GREP "$expectdata" $actual > /dev/null
+ fi
+ if [ $? -eq 0 ]; then
+ echo " PASSED"
+ else
+ echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err
+ fi
+}
+
+# Call the h5dump tool and grep for a value but disables plugin filter loading
+# txttype ERRTXT greps test error output, otherwise greps test output
+GREPTEST2()
+{
+ txttype=$1
+ expectdata=$2
+ actual=$TESTDIR/$3
+ actual_err="$TESTDIR/`basename $3 .ddl`.oerr"
+ shift
+ shift
+ shift
+
+ # Run test.
+ TESTING $DUMPER -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
@@ -1143,7 +1179,7 @@ TOOLTEST tvlenstr_array.ddl --enable-error-stack tvlenstr_array.h5
# test for files with array data
TOOLTEST tarray1.ddl --enable-error-stack tarray1.h5
# # added for bug# 2092 - tarray1_big.h
-GREPTEST ERRTXT "Undefined reference pointer" tarray1_big.ddl --enable-error-stack -R tarray1_big.h5
+GREPTEST ERRTXT "NULL token size" tarray1_big.ddl --enable-error-stack -R tarray1_big.h5
TOOLTEST tarray2.ddl --enable-error-stack tarray2.h5
TOOLTEST tarray3.ddl --enable-error-stack tarray3.h5
TOOLTEST tarray4.ddl --enable-error-stack tarray4.h5
@@ -1351,9 +1387,9 @@ fi
# test for dataset region references
TOOLTEST tdatareg.ddl --enable-error-stack tdatareg.h5
-GREPTEST ERRTXT "Undefined reference pointer" tdataregR.ddl --enable-error-stack -R tdatareg.h5
+GREPTEST ERRTXT "NULL token size" tdataregR.ddl --enable-error-stack -R tdatareg.h5
TOOLTEST tattrreg.ddl --enable-error-stack tattrreg.h5
-GREPTEST ERRTXT "Undefined reference pointer" tattrregR.ddl --enable-error-stack -R tattrreg.h5
+GREPTEST ERRTXT "NULL token size" tattrregR.ddl --enable-error-stack -R tattrreg.h5
TOOLTEST2 tbinregR.exp --enable-error-stack -d /Dataset1 -s 0 -R -y -o tbinregR.txt tdatareg.h5
# Clean up text output files
@@ -1390,7 +1426,7 @@ TOOLTEST4 textlinkfar.ddl --enable-error-stack textlinkfar.h5
TOOLTEST4 textlink.ddl --enable-error-stack textlink.h5
# test for error stack display (BZ2048)
-TOOLTEST5 filter_fail.ddl --enable-error-stack filter_fail.h5
+GREPTEST2 ERRTXT "filter plugins disabled" filter_fail.ddl --enable-error-stack filter_fail.h5
# test for -o -y for dataset with attributes
TOOLTEST2 tall-6.exp --enable-error-stack -y -o tall-6.txt -d /g1/g1.1/dset1.1.1 tall.h5
diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake
index 2f3f3ab..7ff17ff 100644
--- a/tools/test/h5ls/CMakeTests.cmake
+++ b/tools/test/h5ls/CMakeTests.cmake
@@ -168,7 +168,7 @@
macro (ADD_H5_ERR_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls> ${ARGN})
+ add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_ext}> ${ARGN})
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (${resultcode} EQUAL 1)
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
diff --git a/tools/test/h5ls/dynlib_ls.c b/tools/test/h5ls/dynlib_ls.c
index 571452e..661a6dc 100644
--- a/tools/test/h5ls/dynlib_ls.c
+++ b/tools/test/h5ls/dynlib_ls.c
@@ -69,7 +69,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Subtract the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp - MULTIPLIER;
+ *int_ptr = (int8_t)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -78,7 +78,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Add the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp + MULTIPLIER;
+ *int_ptr = (int8_t)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
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
diff --git a/tools/test/misc/CMakeTestsMkgrp.cmake b/tools/test/misc/CMakeTestsMkgrp.cmake
index 11fa3f2..c947e0e 100644
--- a/tools/test/misc/CMakeTestsMkgrp.cmake
+++ b/tools/test/misc/CMakeTestsMkgrp.cmake
@@ -96,7 +96,7 @@
macro (ADD_H5_CMP resultfile resultcode)
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5MKGRP_CMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp> ${ARGN})
+ add_test (NAME H5MKGRP_CMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp${tgt_ext}> ${ARGN})
else ()
add_test (
NAME H5MKGRP_CMP-${resultfile}-clear-objects
diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt
index 38dd605..a01a88f 100644
--- a/tools/test/perform/CMakeLists.txt
+++ b/tools/test/perform/CMakeLists.txt
@@ -21,20 +21,21 @@ endif ()
set_target_properties (h5perf_serial PROPERTIES FOLDER perform)
if (HDF5_BUILD_PERFORM_STANDALONE)
- #-- Adding test for h5perf_serial_alone
+ #-- Adding test for h5perf_serial_alone - io_timer.c includes
set (h5perf_serial_alone_SOURCES
+ ${HDF5_TOOLS_DIR}/lib/io_timer.c
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/sio_perf.c
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/sio_engine.c
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/sio_standalone.c
)
add_executable (h5perf_serial_alone ${h5perf_serial_alone_SOURCES})
- target_include_directories (h5perf_serial_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (h5perf_serial_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TOOLS_DIR}/lib;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (h5perf_serial_alone STATIC)
- target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
else ()
TARGET_C_PROPERTIES (h5perf_serial_alone SHARED)
- target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
endif ()
set_target_properties (h5perf_serial_alone PROPERTIES FOLDER perform)
set_property (TARGET h5perf_serial_alone
@@ -169,18 +170,19 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING)
if (HDF5_BUILD_PERFORM_STANDALONE)
#-- Adding test for h5perf
set (h5perf_alone_SOURCES
+ ${HDF5_TOOLS_DIR}/lib/io_timer.c
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/pio_perf.c
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/pio_engine.c
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/pio_standalone.c
)
add_executable (h5perf_alone ${h5perf_alone_SOURCES})
- target_include_directories (h5perf_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (h5perf_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TOOLS_DIR}/lib;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (h5perf_alone STATIC)
- target_link_libraries (h5perf_alone PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
else ()
TARGET_C_PROPERTIES (h5perf_alone SHARED)
- target_link_libraries (h5perf_alone PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
endif ()
set_target_properties (h5perf_alone PROPERTIES FOLDER perform)
set_property (TARGET h5perf_alone
diff --git a/tools/test/perform/pio_engine.c b/tools/test/perform/pio_engine.c
index 44f9b0a..653c28f 100644
--- a/tools/test/perform/pio_engine.c
+++ b/tools/test/perform/pio_engine.c
@@ -199,7 +199,7 @@ do_pio(parameters param)
bsize = buf_size; /* Actual buffer size */
}
else {
- snbytes = (off_t)sqrt(nbytes); /* General dataset size */
+ snbytes = (off_t)sqrt((double)nbytes); /* General dataset size */
bsize = buf_size * blk_size; /* Actual buffer size */
}
@@ -592,7 +592,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
/* nbytes is always the number of bytes per dataset (1D or 2D). If the
dataspace is 2D, snbytes is the size of a side of the dataset square.
*/
- snbytes = (off_t)sqrt(nbytes);
+ snbytes = (off_t)sqrt((double)nbytes);
/* Contiguous Pattern: */
if (!parms->interleaved) {
@@ -1568,7 +1568,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
/* nbytes is always the number of bytes per dataset (1D or 2D). If the
dataspace is 2D, snbytes is the size of a side of the 'dataset square'.
*/
- snbytes = (off_t)sqrt(nbytes);
+ snbytes = (off_t)sqrt((double)nbytes);
bsize = buf_size * blk_size;
diff --git a/tools/test/perform/pio_perf.c b/tools/test/perform/pio_perf.c
index 9f4d116..5977731 100644
--- a/tools/test/perform/pio_perf.c
+++ b/tools/test/perform/pio_perf.c
@@ -1155,9 +1155,9 @@ report_parameters(struct options *opts)
recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "\n");
HDfprintf(output, "rank %d: File size=", rank);
- recover_size_and_print((long long)(pow(opts->num_bpp * opts->min_num_procs,2)
+ recover_size_and_print((long long)(pow((double)(opts->num_bpp * opts->min_num_procs),2)
* opts->num_dsets), ":");
- recover_size_and_print((long long)(pow(opts->num_bpp * opts->max_num_procs,2)
+ recover_size_and_print((long long)(pow((double)(opts->num_bpp * opts->max_num_procs),2)
* opts->num_dsets), "\n");
HDfprintf(output, "rank %d: Transfer buffer size=", rank);
diff --git a/tools/test/perform/pio_perf.h b/tools/test/perform/pio_perf.h
index 7605f20..55d721e 100644
--- a/tools/test/perform/pio_perf.h
+++ b/tools/test/perform/pio_perf.h
@@ -13,12 +13,13 @@
#ifndef PIO_PERF_H__
#define PIO_PERF_H__
-#include "io_timer.h"
#ifndef STANDALONE
+#include "io_timer.h"
#include "h5test.h"
#include "h5tools.h"
#include "h5tools_utils.h"
#else
+#include "io_timer.h"
#include "pio_standalone.h"
#endif
diff --git a/tools/test/perform/pio_standalone.c b/tools/test/perform/pio_standalone.c
index 022e390..8cdca85 100644
--- a/tools/test/perform/pio_standalone.c
+++ b/tools/test/perform/pio_standalone.c
@@ -18,6 +18,9 @@
#include "pio_perf.h"
+#ifdef STANDALONE
+MPI_Info h5_io_info_g=MPI_INFO_NULL;/* MPI INFO object for IO */
+#endif
/** From h5tools_utils.c **/
@@ -162,8 +165,134 @@ print_version(const char *progname)
H5_VERS_SUBRELEASE[0] ? "-" : "", H5_VERS_SUBRELEASE);
}
-#ifdef H5_HAVE_PARALLEL
-MPI_Info h5_io_info_g=MPI_INFO_NULL;/* MPI INFO object for IO */
-#endif
+#ifdef STANDALONE
+/*
+ * Function: h5_set_info_object
+ * Purpose: Process environment variables setting to set up MPI Info
+ * object.
+ * Return: 0 if all is fine; otherwise non-zero.
+ * Programmer: Albert Cheng, 2002/05/21.
+ * Modifications:
+ * Bill Wendling, 2002/05/31
+ * Modified so that the HDF5_MPI_INFO environment variable can
+ * be a semicolon separated list of "key=value" pairings. Most
+ * of the code is to remove any whitespaces which might be
+ * surrounding the "key=value" pairs.
+ */
+int
+h5_set_info_object(void)
+{
+ char *envp; /* environment pointer */
+ int ret_value=0;
+
+ /* handle any MPI INFO hints via $HDF5_MPI_INFO */
+ if ((envp = HDgetenv("HDF5_MPI_INFO")) != NULL){
+ char *next, *valp;
+
+ valp = envp = next = HDstrdup(envp);
+
+ if (!valp) return 0;
+
+ /* create an INFO object if not created yet */
+ if (h5_io_info_g == MPI_INFO_NULL)
+ MPI_Info_create(&h5_io_info_g);
+
+ do {
+ size_t len;
+ char *key_val, *endp, *namep;
+
+ if (*valp == ';')
+ valp++;
+
+ /* copy key/value pair into temporary buffer */
+ len = strcspn(valp, ";");
+ next = &valp[len];
+ key_val = (char *)HDcalloc(1, len + 1);
+
+ /* increment the next pointer past the terminating semicolon */
+ if (*next == ';')
+ ++next;
+
+ namep = HDstrncpy(key_val, valp, len);
+
+ /* pass up any beginning whitespaces */
+ while (*namep && (*namep == ' ' || *namep == '\t'))
+ namep++;
+
+ if (!*namep) continue; /* was all white space, so move to next k/v pair */
+
+ /* eat up any ending white spaces */
+ endp = &namep[HDstrlen(namep) - 1];
+
+ while (endp && (*endp == ' ' || *endp == '\t'))
+ *endp-- = '\0';
+
+ /* find the '=' */
+ valp = HDstrchr(namep, '=');
+ if (valp != NULL) { /* it's a valid key/value pairing */
+ char *tmp_val = valp + 1;
+
+ /* change '=' to \0, move valp down one */
+ *valp-- = '\0';
+
+ /* eat up ending whitespace on the "key" part */
+ while (*valp == ' ' || *valp == '\t')
+ *valp-- = '\0';
+
+ valp = tmp_val;
+
+ /* eat up beginning whitespace on the "value" part */
+ while (*valp == ' ' || *valp == '\t')
+ *valp++ = '\0';
+
+ /* actually set the darned thing */
+ if (MPI_SUCCESS != MPI_Info_set(h5_io_info_g, namep, valp)) {
+ HDprintf("MPI_Info_set failed\n");
+ ret_value = -1;
+ }
+ }
+
+ valp = next;
+ HDfree(key_val);
+ } while (next && *next);
+
+ HDfree(envp);
+ }
+
+ return ret_value;
+}
+
+
+/*
+ * Function: h5_dump_info_object
+ * Purpose: Display content of an MPI Info object
+ * Return: void
+ * Programmer: Albert Cheng 2002/05/21
+ * Modifications:
+ */
+void
+h5_dump_info_object(MPI_Info info)
+{
+ char key[MPI_MAX_INFO_KEY+1];
+ char value[MPI_MAX_INFO_VAL+1];
+ int flag;
+ int i, nkeys;
+
+ HDprintf("Dumping MPI Info Object (up to %d bytes per item):\n", MPI_MAX_INFO_VAL);
+ if (info==MPI_INFO_NULL){
+ HDprintf("object is MPI_INFO_NULL\n");
+ }
+ else {
+ MPI_Info_get_nkeys(info, &nkeys);
+ HDprintf("object has %d items\n", nkeys);
+ for (i=0; i<nkeys; i++){
+ MPI_Info_get_nthkey(info, i, key);
+ MPI_Info_get(info, key, MPI_MAX_INFO_VAL, value, &flag);
+ HDprintf("%s=%s\n", key, value);
+ }
+
+ }
+}
+#endif /* STANDALONE */
diff --git a/tools/test/perform/sio_perf.h b/tools/test/perform/sio_perf.h
index 83caf54..d26c78b 100644
--- a/tools/test/perform/sio_perf.h
+++ b/tools/test/perform/sio_perf.h
@@ -13,12 +13,13 @@
#ifndef SIO_PERF_H__
#define SIO_PERF_H__
-#include "io_timer.h"
#ifndef STANDALONE
+#include "io_timer.h"
#include "h5test.h"
#include "h5tools.h"
#include "h5tools_utils.h"
#else
+#include "io_timer.h"
#include "sio_standalone.h"
#endif