summaryrefslogtreecommitdiffstats
path: root/tools/test/h5diff
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/h5diff
parent156baee37112996291f9ff07760be047d0e03c76 (diff)
parent71b817038d8cd82163cf71119873b2ba65a2c81b (diff)
downloadhdf5-d46ea2d08af456f1cfaf6c6fd3060f39b92be8de.zip
hdf5-d46ea2d08af456f1cfaf6c6fd3060f39b92be8de.tar.gz
hdf5-d46ea2d08af456f1cfaf6c6fd3060f39b92be8de.tar.bz2
merge and fix conflicts
Diffstat (limited to 'tools/test/h5diff')
-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
6 files changed, 96 insertions, 8 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 )