summaryrefslogtreecommitdiffstats
path: root/tools/h5diff
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-04-06 02:57:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-04-06 02:57:06 (GMT)
commitd5a62239587f7cc5de301fa5c6b0919807689818 (patch)
tree40a36d60dd8ac2d10a45886869cc53d3fdc9181e /tools/h5diff
parentebf3d99b955c705217227fb7f8ae4405e941399a (diff)
downloadhdf5-d5a62239587f7cc5de301fa5c6b0919807689818.zip
hdf5-d5a62239587f7cc5de301fa5c6b0919807689818.tar.gz
hdf5-d5a62239587f7cc5de301fa5c6b0919807689818.tar.bz2
[svn-r22254] Description:
Bring r22085:22251 from trunk to revise_chunks branch. Also tackle some testing issues in test/objcopy.c test and clean up some warnings. Tested on: FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, w/threadsafe, in production mode Linux/PPC 2.6 (ostrich) w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-ia64 2.6 (ember) w/Intel compilers, w/paralle, C++ & FORTRAN, in production mode Mac OS X/32 10.7.3 (amazon) in debug mode Mac OS X/32 10.7.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode Mac OS X/32 10.7.3 (amazon) w/parallel, in debug mode
Diffstat (limited to 'tools/h5diff')
-rw-r--r--tools/h5diff/CMakeLists.txt30
-rw-r--r--tools/h5diff/h5diffgentest.c263
-rw-r--r--[-rwxr-xr-x]tools/h5diff/testfiles/h5diff_101w.txt0
-rw-r--r--[-rwxr-xr-x]tools/h5diff/testfiles/h5diff_102w.txt0
-rw-r--r--tools/h5diff/testfiles/h5diff_20.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_21.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_22.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_222.txt3
-rw-r--r--tools/h5diff/testfiles/h5diff_223.txt4
-rw-r--r--tools/h5diff/testfiles/h5diff_224.txt4
-rw-r--r--[-rwxr-xr-x]tools/h5diff/testfiles/h5diff_300.txt0
-rw-r--r--tools/h5diff/testfiles/h5diff_485.txt11
-rw-r--r--tools/h5diff/testfiles/h5diff_486.txt11
-rw-r--r--tools/h5diff/testfiles/h5diff_487.txt12
-rw-r--r--tools/h5diff/testfiles/h5diff_505.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_507.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_509.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_515.txt7
-rw-r--r--tools/h5diff/testfiles/h5diff_517.txt7
-rw-r--r--[-rwxr-xr-x]tools/h5diff/testfiles/h5diff_enum_invalid_values.h5bin2192 -> 2192 bytes
-rw-r--r--tools/h5diff/testfiles/h5diff_exclude3-1.h5bin0 -> 4792 bytes
-rw-r--r--tools/h5diff/testfiles/h5diff_exclude3-2.h5bin0 -> 2176 bytes
-rw-r--r--[-rwxr-xr-x]tools/h5diff/testfiles/h5diff_links.h5bin2536 -> 2536 bytes
-rw-r--r--tools/h5diff/testfiles/non_comparables1.h5bin6568 -> 8628 bytes
-rw-r--r--tools/h5diff/testfiles/non_comparables2.h5bin6584 -> 8644 bytes
-rwxr-xr-xtools/h5diff/testh5diff.sh22
26 files changed, 370 insertions, 16 deletions
diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt
index f178f19..da2aaf9 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -84,6 +84,8 @@ IF (BUILD_TESTING)
h5diff_220.txt
h5diff_221.txt
h5diff_222.txt
+ h5diff_223.txt
+ h5diff_224.txt
h5diff_21.txt
h5diff_22.txt
h5diff_23.txt
@@ -139,6 +141,9 @@ IF (BUILD_TESTING)
h5diff_482.txt
h5diff_483.txt
h5diff_484.txt
+ h5diff_485.txt
+ h5diff_486.txt
+ h5diff_487.txt
h5diff_50.txt
h5diff_51.txt
h5diff_52.txt
@@ -253,6 +258,8 @@ IF (BUILD_TESTING)
h5diff_exclude1-2.h5
h5diff_exclude2-1.h5
h5diff_exclude2-2.h5
+ h5diff_exclude3-1.h5
+ h5diff_exclude3-2.h5
h5diff_comp_vl_strs.h5
h5diff_attr_v_level1.h5
h5diff_attr_v_level2.h5
@@ -490,6 +497,9 @@ IF (BUILD_TESTING)
# different structure and obj names
SET (EXCLUDE_FILE2_1 h5diff_exclude2-1.h5)
SET (EXCLUDE_FILE2_2 h5diff_exclude2-2.h5)
+ # Only one file contains unique objs. Common objs are same.
+ SET (EXCLUDE_FILE3_1 h5diff_exclude3-1.h5)
+ SET (EXCLUDE_FILE3_2 h5diff_exclude3-2.h5)
# compound type with multiple vlen string types
SET (COMP_VL_STRS_FILE h5diff_comp_vl_strs.h5)
# container types (array,vlen) with multiple nested compound types
@@ -569,6 +579,10 @@ IF (BUILD_TESTING)
h5diff_221.out.err
h5diff_222.out
h5diff_222.out.err
+ h5diff_223.out
+ h5diff_223.out.err
+ h5diff_224.out
+ h5diff_224.out.err
h5diff_21.out
h5diff_21.out.err
h5diff_22.out
@@ -1156,6 +1170,12 @@ ADD_H5_TEST (h5diff_221 1 -c non_comparables1.h5 non_comparables2.h5 /g2)
# All the rest comparables should display differences
ADD_H5_TEST (h5diff_222 1 -c non_comparables1.h5 non_comparables2.h5)
+# non-comparable test for common objects (same name) with different object types
+# (HDFFV-7644)
+ADD_H5_TEST (h5diff_223 0 -c non_comparables1.h5 non_comparables2.h5 /diffobjtypes)
+# swap files
+ADD_H5_TEST (h5diff_224 0 -c non_comparables2.h5 non_comparables1.h5 /diffobjtypes)
+
# ##############################################################################
# # Links compare without --follow-symlinks nor --no-dangling-links
# ##############################################################################
@@ -1359,6 +1379,16 @@ ADD_H5_TEST (h5diff_483 1 -v --exclude-path "/group1" ${EXCLUDE_FILE2_1} ${EXCLU
# Exclude from group compare
ADD_H5_TEST (h5diff_484 0 -v --exclude-path "/dset3" ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2} /group1)
+#
+# Only one file contains unique objs. Common objs are same.
+# (HDFFV-7837)
+#
+ADD_H5_TEST (h5diff_485 0 -v --exclude-path "/group1" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5)
+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
# ##############################################################################
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index 0b5d68f..eb4931d 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -79,6 +79,9 @@ hsize_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024);
/* different structure and obj names */
#define EXCLUDE_FILE2_1 "h5diff_exclude2-1.h5"
#define EXCLUDE_FILE2_2 "h5diff_exclude2-2.h5"
+/* only one file has unique objs */
+#define EXCLUDE_FILE3_1 "h5diff_exclude3-1.h5"
+#define EXCLUDE_FILE3_2 "h5diff_exclude3-2.h5"
/* compound type with multiple vlen string types */
#define COMP_VL_STRS_FILE "h5diff_comp_vl_strs.h5"
/* attribute compre with verbose level */
@@ -146,6 +149,7 @@ static int test_group_recurse(const char *fname1, const char *fname2);
static int test_group_recurse2(void);
static int test_exclude_obj1(const char *fname1, const char *fname2);
static int test_exclude_obj2(const char *fname1, const char *fname2);
+static int test_exclude_obj3(const char *fname1, const char *fname2);
static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new);
static int test_attributes_verbose_level(const char *fname1, const char *fname2);
static int test_enums(const char *fname);
@@ -153,7 +157,8 @@ static void test_comps_array (const char *fname, const char *dset, const char *a
static void test_comps_vlen (const char *fname, const char *dset,const char *attr, int diff, int is_file_new);
static void test_comps_array_vlen (const char *fname, const char *dset, const char *attr, int diff, int is_file_new);
static void test_comps_vlen_arry (const char *fname, const char *dset,const char *attr, int diff, int is_file_new);
-static void test_non_comparables (const char *fname, int diff);
+static void test_data_nocomparables (const char *fname, int diff);
+static void test_objs_nocomparables (const char *fname1, const char *fname2);
/* called by test_attributes() and test_datasets() */
static void write_attr_in(hid_t loc_id,const char* dset_name,hid_t fid,int make_diffs);
@@ -225,6 +230,7 @@ int main(void)
test_exclude_obj1(EXCLUDE_FILE1_1, EXCLUDE_FILE1_2);
test_exclude_obj2(EXCLUDE_FILE2_1, EXCLUDE_FILE2_2);
+ test_exclude_obj3(EXCLUDE_FILE3_1, EXCLUDE_FILE3_2);
/* diff various multiple vlen and fixlen string types in a compound dataset */
test_comp_vlen_strings(COMP_VL_STRS_FILE, "group", 1);
@@ -257,8 +263,11 @@ int main(void)
* comparable datasets and attributes. All the comparables should display
* differences.
*/
- test_non_comparables(NON_COMPARBLES1,0);
- test_non_comparables(NON_COMPARBLES2,5);
+ test_data_nocomparables(NON_COMPARBLES1,0);
+ test_data_nocomparables(NON_COMPARBLES2,5);
+
+ /* common objects (same name) with different object types. HDFFV-7644 */
+ test_objs_nocomparables(NON_COMPARBLES1, NON_COMPARBLES2);
return 0;
}
@@ -3445,6 +3454,100 @@ out:
/*-------------------------------------------------------------------------
*
+* Purpose: Create test files for excluding obj.
+* Only one file contains unique objs. Common objs are same.
+* Test : exclude unique objs to verify the rest are same
+* - HDFFV-7837
+*
+* Programmer: Jonathan Kim (Mar, 19, 2012)
+*
+*-------------------------------------------------------------------------*/
+static int test_exclude_obj3(const char *fname1, const char *fname2)
+{
+ hid_t fid1=0;
+ hid_t fid2=0;
+ hid_t gid1=0;
+ hsize_t dims2[2] = {2,4};
+ int data1[4][2] = {{0,0},{0,0},{0,0},{0,0}};
+ herr_t status = SUCCEED;
+
+ /*-----------------------------------------------------------------------
+ * Create file(s)
+ *------------------------------------------------------------------------*/
+ fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ if (fid1 < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ status = FAIL;
+ goto out;
+ }
+
+ fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ if (fid2 < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
+ status = FAIL;
+ goto out;
+ }
+
+
+ /*-----------------------------------------------------------------------
+ * Group
+ *------------------------------------------------------------------------*/
+ /* file1 */
+ gid1 = H5Gcreate2(fid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (gid1 < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ status = FAIL;
+ goto out;
+ }
+
+ /*-----------------------------------------------------------------------
+ * Datasets
+ *------------------------------------------------------------------------*/
+ /* file1 */
+ status = write_dset(fid1,2,dims2,"dset1",H5T_NATIVE_INT,data1);
+ if (status == FAIL)
+ {
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ status = FAIL;
+ goto out;
+ }
+
+ status = write_dset(gid1,2,dims2,"dset",H5T_NATIVE_INT,data1);
+ if (status == FAIL)
+ {
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ status = FAIL;
+ goto out;
+ }
+
+ /* file2 */
+ status = write_dset(fid2,2,dims2,"dset1",H5T_NATIVE_INT,data1);
+ if (status == FAIL)
+ {
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ status = FAIL;
+ goto out;
+ }
+
+out:
+ /*-----------------------------------------------------------------------
+ * Close
+ *-----------------------------------------------------------------------*/
+ if(fid1)
+ H5Fclose(fid1);
+ if(fid2)
+ H5Fclose(fid2);
+ if(gid1)
+ H5Gclose(gid1);
+
+ return status;
+}
+
+/*-------------------------------------------------------------------------
+*
* Purpose: Create test files for multiple variable length string/string array
* along with fixed length string/string array types in
* a compound type dataset.
@@ -4789,7 +4892,7 @@ static void test_comps_vlen_arry (const char * fname, const char *dset, const ch
/*-------------------------------------------------------------------------
-* Function: test_non_comparables
+* Function: test_data_nocomparables
*
* Purpose:
* Create test files with non-comparable dataset and attributes with
@@ -4798,7 +4901,7 @@ static void test_comps_vlen_arry (const char * fname, const char *dset, const ch
*
*-------------------------------------------------------------------------*/
#define DIM_ARRY 3
-static void test_non_comparables (const char * fname, int make_diffs)
+static void test_data_nocomparables (const char * fname, int make_diffs)
{
hid_t fid=0;
hid_t gid1=0;
@@ -4818,7 +4921,6 @@ static void test_non_comparables (const char * fname, int make_diffs)
int rank_attr;
char data1_str[DIM_ARRY][STR_SIZE]= {"ab","cd","ef"};
herr_t status = SUCCEED;
- int i;
void *dset_data_ptr1=NULL;
void *dset_data_ptr2=NULL;
void *dset_data_ptr3=NULL;
@@ -5001,6 +5103,155 @@ out:
}
/*-------------------------------------------------------------------------
+* Function: test_objs_nocomparables
+*
+* Purpose:
+* Create test files with common objects (same name) but different object
+* types.
+* h5diff should show non-comparable output from these common objects.
+*-------------------------------------------------------------------------*/
+static void test_objs_nocomparables(const char *fname1, const char *fname2)
+{
+ herr_t status = SUCCEED;
+ hid_t fid1=0;
+ hid_t fid2=0;
+ hid_t topgid1=0;
+ hid_t topgid2=0;
+ hid_t gid1=0;
+ hid_t did1=0;
+ hid_t tid1=0;
+ hid_t gid2=0;
+ hid_t did2=0;
+ hid_t tid2=0;
+ hsize_t dims[1] = {DIM_ARRY};
+ int data1[DIM_ARRY] = {1,1,1};
+ int data2[DIM_ARRY] = {2,2,2};
+
+ /*-----------------------------------------------------------------------
+ * Open file(s) to add objects
+ *------------------------------------------------------------------------*/
+ /* file1 */
+ fid1 = H5Fopen (fname1, H5F_ACC_RDWR, H5P_DEFAULT);
+ if (fid1 < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Fopen failed.\n", fname1);
+ status = FAIL;
+ goto out;
+ }
+
+ /* file2 */
+ fid2 = H5Fopen (fname2, H5F_ACC_RDWR, H5P_DEFAULT);
+ if (fid2 < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Fopen failed.\n", fname2);
+ status = FAIL;
+ goto out;
+ }
+
+ /*-----------------------------------------------------------------------
+ * in file1 : add member objects
+ *------------------------------------------------------------------------*/
+ /* parent group */
+ topgid1 = H5Gcreate2(fid1, "diffobjtypes", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (topgid1 < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ status = FAIL;
+ goto out;
+ }
+
+ /* dataset */
+ status = write_dset(topgid1, 1, dims,"obj1", H5T_NATIVE_INT, data1);
+ if (status == FAIL)
+ {
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname1);
+ goto out;
+ }
+
+ /* group */
+ gid1 = H5Gcreate2(topgid1, "obj2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (gid1 < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
+ status = FAIL;
+ goto out;
+ }
+
+ /* committed type */
+ tid1 = H5Tcopy(H5T_NATIVE_INT);
+ status = H5Tcommit2(topgid1, "obj3", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (status < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname1);
+ goto out;
+ }
+
+ /*-----------------------------------------------------------------------
+ * in file2 : add member objects
+ *------------------------------------------------------------------------*/
+ /* parent group */
+ topgid2 = H5Gcreate2(fid2, "diffobjtypes", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (topgid2 < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ status = FAIL;
+ goto out;
+ }
+
+ /* group */
+ gid2 = H5Gcreate2(topgid2, "obj1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (gid2 < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2);
+ status = FAIL;
+ goto out;
+ }
+
+ /* committed type */
+ tid2 = H5Tcopy(H5T_NATIVE_INT);
+ status = H5Tcommit2(topgid2, "obj2", tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (status < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname2);
+ goto out;
+ }
+
+ /* dataset */
+ status = write_dset(topgid2, 1, dims,"obj3", H5T_NATIVE_INT, data2);
+ if (status == FAIL)
+ {
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname2);
+ goto out;
+ }
+
+out:
+ /*-----------------------------------------------------------------------
+ * Close IDs
+ *-----------------------------------------------------------------------*/
+ if(fid1)
+ H5Fclose(fid1);
+ if(fid2)
+ H5Fclose(fid2);
+ if(topgid1)
+ H5Gclose(topgid1);
+ if(topgid2)
+ H5Gclose(topgid2);
+ if(did1)
+ H5Dclose(did1);
+ if(did2)
+ H5Dclose(did2);
+ if(gid1)
+ H5Gclose(gid1);
+ if(gid2)
+ H5Gclose(gid2);
+ if(tid1)
+ H5Tclose(tid1);
+ if(tid2)
+ H5Tclose(tid2);
+
+}
+
+/*-------------------------------------------------------------------------
* Function: write_attr_in
*
* Purpose: write attributes in LOC_ID (dataset, group, named datatype)
diff --git a/tools/h5diff/testfiles/h5diff_101w.txt b/tools/h5diff/testfiles/h5diff_101w.txt
index d1f49da..d1f49da 100755..100644
--- a/tools/h5diff/testfiles/h5diff_101w.txt
+++ b/tools/h5diff/testfiles/h5diff_101w.txt
diff --git a/tools/h5diff/testfiles/h5diff_102w.txt b/tools/h5diff/testfiles/h5diff_102w.txt
index dda3581..dda3581 100755..100644
--- a/tools/h5diff/testfiles/h5diff_102w.txt
+++ b/tools/h5diff/testfiles/h5diff_102w.txt
diff --git a/tools/h5diff/testfiles/h5diff_20.txt b/tools/h5diff/testfiles/h5diff_20.txt
index 3edb543..09c20cb 100644
--- a/tools/h5diff/testfiles/h5diff_20.txt
+++ b/tools/h5diff/testfiles/h5diff_20.txt
@@ -1,4 +1,4 @@
-</dset> is of type H5G_DATASET and </g1> is of type H5G_GROUP
+Not comparable: </dset> is of type H5G_DATASET and </g1> is of type H5G_GROUP
--------------------------------
Some objects are not comparable
--------------------------------
diff --git a/tools/h5diff/testfiles/h5diff_21.txt b/tools/h5diff/testfiles/h5diff_21.txt
index 1479457..1c625fe 100644
--- a/tools/h5diff/testfiles/h5diff_21.txt
+++ b/tools/h5diff/testfiles/h5diff_21.txt
@@ -1,4 +1,4 @@
-</dset> is of type H5G_DATASET and </l1> is of type H5G_LINK
+Not comparable: </dset> is of type H5G_DATASET and </l1> is of type H5G_LINK
--------------------------------
Some objects are not comparable
--------------------------------
diff --git a/tools/h5diff/testfiles/h5diff_22.txt b/tools/h5diff/testfiles/h5diff_22.txt
index 3ccb06b..2ef22d0 100644
--- a/tools/h5diff/testfiles/h5diff_22.txt
+++ b/tools/h5diff/testfiles/h5diff_22.txt
@@ -1,4 +1,4 @@
-</dset> is of type H5G_DATASET and </t1> is of type H5G_TYPE
+Not comparable: </dset> is of type H5G_DATASET and </t1> is of type H5G_TYPE
--------------------------------
Some objects are not comparable
--------------------------------
diff --git a/tools/h5diff/testfiles/h5diff_222.txt b/tools/h5diff/testfiles/h5diff_222.txt
index bdecb8a..53c9464 100644
--- a/tools/h5diff/testfiles/h5diff_222.txt
+++ b/tools/h5diff/testfiles/h5diff_222.txt
@@ -1,3 +1,6 @@
+Not comparable: </diffobjtypes/obj1> is of type H5G_DATASET and </diffobjtypes/obj1> is of type H5G_GROUP
+Not comparable: </diffobjtypes/obj2> is of type H5G_GROUP and </diffobjtypes/obj2> is of type H5G_TYPE
+Not comparable: </diffobjtypes/obj3> is of type H5G_TYPE and </diffobjtypes/obj3> is of type H5G_DATASET
Not comparable: </g1/dset1> is of class H5T_INTEGER and </g1/dset1> is of class H5T_STRING
attribute: <attr of </g1/dset1>> and <attr of </g1/dset1>>
3 differences found
diff --git a/tools/h5diff/testfiles/h5diff_223.txt b/tools/h5diff/testfiles/h5diff_223.txt
new file mode 100644
index 0000000..c8e0f65
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_223.txt
@@ -0,0 +1,4 @@
+Not comparable: </diffobjtypes/obj1> is of type H5G_DATASET and </diffobjtypes/obj1> is of type H5G_GROUP
+Not comparable: </diffobjtypes/obj2> is of type H5G_GROUP and </diffobjtypes/obj2> is of type H5G_TYPE
+Not comparable: </diffobjtypes/obj3> is of type H5G_TYPE and </diffobjtypes/obj3> is of type H5G_DATASET
+EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_224.txt b/tools/h5diff/testfiles/h5diff_224.txt
new file mode 100644
index 0000000..a4ebedb
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_224.txt
@@ -0,0 +1,4 @@
+Not comparable: </diffobjtypes/obj1> is of type H5G_GROUP and </diffobjtypes/obj1> is of type H5G_DATASET
+Not comparable: </diffobjtypes/obj2> is of type H5G_TYPE and </diffobjtypes/obj2> is of type H5G_GROUP
+Not comparable: </diffobjtypes/obj3> is of type H5G_DATASET and </diffobjtypes/obj3> is of type H5G_TYPE
+EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_300.txt b/tools/h5diff/testfiles/h5diff_300.txt
index e51643f..e51643f 100755..100644
--- a/tools/h5diff/testfiles/h5diff_300.txt
+++ b/tools/h5diff/testfiles/h5diff_300.txt
diff --git a/tools/h5diff/testfiles/h5diff_485.txt b/tools/h5diff/testfiles/h5diff_485.txt
new file mode 100644
index 0000000..4175809
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_485.txt
@@ -0,0 +1,11 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /dset1
+
+group : </> and </>
+0 differences found
+dataset: </dset1> and </dset1>
+0 differences found
+EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_486.txt b/tools/h5diff/testfiles/h5diff_486.txt
new file mode 100644
index 0000000..4175809
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_486.txt
@@ -0,0 +1,11 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /dset1
+
+group : </> and </>
+0 differences found
+dataset: </dset1> and </dset1>
+0 differences found
+EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_487.txt b/tools/h5diff/testfiles/h5diff_487.txt
new file mode 100644
index 0000000..8555a71
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_487.txt
@@ -0,0 +1,12 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /dset1
+ x /group1
+
+group : </> and </>
+0 differences found
+dataset: </dset1> and </dset1>
+0 differences found
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_505.txt b/tools/h5diff/testfiles/h5diff_505.txt
index a220730..607b99b 100644
--- a/tools/h5diff/testfiles/h5diff_505.txt
+++ b/tools/h5diff/testfiles/h5diff_505.txt
@@ -1,4 +1,4 @@
-</grp1> is of type H5G_GROUP and </slink_grp1> is of type H5G_LINK
+Not comparable: </grp1> is of type H5G_GROUP and </slink_grp1> is of type H5G_LINK
--------------------------------
Some objects are not comparable
--------------------------------
diff --git a/tools/h5diff/testfiles/h5diff_507.txt b/tools/h5diff/testfiles/h5diff_507.txt
index 6176f3f..06b7fe6 100644
--- a/tools/h5diff/testfiles/h5diff_507.txt
+++ b/tools/h5diff/testfiles/h5diff_507.txt
@@ -1,4 +1,4 @@
-</grp1> is of type H5G_GROUP and </elink_grp1> is of type H5G_UDLINK
+Not comparable: </grp1> is of type H5G_GROUP and </elink_grp1> is of type H5G_UDLINK
--------------------------------
Some objects are not comparable
--------------------------------
diff --git a/tools/h5diff/testfiles/h5diff_509.txt b/tools/h5diff/testfiles/h5diff_509.txt
index a51ab35..2e3e87a 100644
--- a/tools/h5diff/testfiles/h5diff_509.txt
+++ b/tools/h5diff/testfiles/h5diff_509.txt
@@ -1,4 +1,4 @@
-</slink_grp1> is of type H5G_LINK and </elink_grp1> is of type H5G_UDLINK
+Not comparable: </slink_grp1> is of type H5G_LINK and </elink_grp1> is of type H5G_UDLINK
--------------------------------
Some objects are not comparable
--------------------------------
diff --git a/tools/h5diff/testfiles/h5diff_515.txt b/tools/h5diff/testfiles/h5diff_515.txt
index 077d463..263441d 100644
--- a/tools/h5diff/testfiles/h5diff_515.txt
+++ b/tools/h5diff/testfiles/h5diff_515.txt
@@ -17,8 +17,11 @@ dataset: </dset1> and </dset1>
0 differences found
group : </g1> and </g1>
0 differences found
-group : </g1/g2> and </g1/g2>
-0 differences found
+Not comparable: </g1/g2> is of type H5G_GROUP and </g1/g2> is of type H5G_UDLINK
link : </soft_dset1> and </soft_dset1>
0 differences found
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_517.txt b/tools/h5diff/testfiles/h5diff_517.txt
index 1b6e24f..91c69fb 100644
--- a/tools/h5diff/testfiles/h5diff_517.txt
+++ b/tools/h5diff/testfiles/h5diff_517.txt
@@ -10,6 +10,9 @@ group1 group2
group : </g1> and </g1>
0 differences found
-group : </g1/g2> and </g1/g2>
-0 differences found
+Not comparable: </g1/g2> is of type H5G_GROUP and </g1/g2> is of type H5G_UDLINK
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_enum_invalid_values.h5 b/tools/h5diff/testfiles/h5diff_enum_invalid_values.h5
index dd02db9..dd02db9 100755..100644
--- a/tools/h5diff/testfiles/h5diff_enum_invalid_values.h5
+++ b/tools/h5diff/testfiles/h5diff_enum_invalid_values.h5
Binary files differ
diff --git a/tools/h5diff/testfiles/h5diff_exclude3-1.h5 b/tools/h5diff/testfiles/h5diff_exclude3-1.h5
new file mode 100644
index 0000000..f9cc83d
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_exclude3-1.h5
Binary files differ
diff --git a/tools/h5diff/testfiles/h5diff_exclude3-2.h5 b/tools/h5diff/testfiles/h5diff_exclude3-2.h5
new file mode 100644
index 0000000..f811905
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_exclude3-2.h5
Binary files differ
diff --git a/tools/h5diff/testfiles/h5diff_links.h5 b/tools/h5diff/testfiles/h5diff_links.h5
index 8af66a6..8af66a6 100755..100644
--- a/tools/h5diff/testfiles/h5diff_links.h5
+++ b/tools/h5diff/testfiles/h5diff_links.h5
Binary files differ
diff --git a/tools/h5diff/testfiles/non_comparables1.h5 b/tools/h5diff/testfiles/non_comparables1.h5
index 71b65c8..7dbb45d 100644
--- a/tools/h5diff/testfiles/non_comparables1.h5
+++ b/tools/h5diff/testfiles/non_comparables1.h5
Binary files differ
diff --git a/tools/h5diff/testfiles/non_comparables2.h5 b/tools/h5diff/testfiles/non_comparables2.h5
index 188ceb9..a5e7014 100644
--- a/tools/h5diff/testfiles/non_comparables2.h5
+++ b/tools/h5diff/testfiles/non_comparables2.h5
Binary files differ
diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh
index 005510f..c84c2b6 100755
--- a/tools/h5diff/testh5diff.sh
+++ b/tools/h5diff/testh5diff.sh
@@ -113,6 +113,8 @@ $SRC_H5DIFF_TESTFILES/h5diff_exclude1-1.h5
$SRC_H5DIFF_TESTFILES/h5diff_exclude1-2.h5
$SRC_H5DIFF_TESTFILES/h5diff_exclude2-1.h5
$SRC_H5DIFF_TESTFILES/h5diff_exclude2-2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_exclude3-1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_exclude3-2.h5
$SRC_H5DIFF_TESTFILES/h5diff_comp_vl_strs.h5
$SRC_H5DIFF_TESTFILES/compounds_array_vlen1.h5
$SRC_H5DIFF_TESTFILES/compounds_array_vlen2.h5
@@ -156,6 +158,8 @@ $SRC_H5DIFF_TESTFILES/h5diff_208.txt
$SRC_H5DIFF_TESTFILES/h5diff_220.txt
$SRC_H5DIFF_TESTFILES/h5diff_221.txt
$SRC_H5DIFF_TESTFILES/h5diff_222.txt
+$SRC_H5DIFF_TESTFILES/h5diff_223.txt
+$SRC_H5DIFF_TESTFILES/h5diff_224.txt
$SRC_H5DIFF_TESTFILES/h5diff_21.txt
$SRC_H5DIFF_TESTFILES/h5diff_22.txt
$SRC_H5DIFF_TESTFILES/h5diff_23.txt
@@ -212,6 +216,9 @@ $SRC_H5DIFF_TESTFILES/h5diff_481.txt
$SRC_H5DIFF_TESTFILES/h5diff_482.txt
$SRC_H5DIFF_TESTFILES/h5diff_483.txt
$SRC_H5DIFF_TESTFILES/h5diff_484.txt
+$SRC_H5DIFF_TESTFILES/h5diff_485.txt
+$SRC_H5DIFF_TESTFILES/h5diff_486.txt
+$SRC_H5DIFF_TESTFILES/h5diff_487.txt
$SRC_H5DIFF_TESTFILES/h5diff_50.txt
$SRC_H5DIFF_TESTFILES/h5diff_51.txt
$SRC_H5DIFF_TESTFILES/h5diff_52.txt
@@ -824,6 +831,12 @@ if test -n "$pmode" -a "$mydomainname" = hdfgroup.uiuc.edu; then
else
TOOLTEST h5diff_222.txt -c non_comparables1.h5 non_comparables2.h5
fi
+
+# non-comparable test for common objects (same name) with different object types
+# (HDFFV-7644)
+TOOLTEST h5diff_223.txt -c non_comparables1.h5 non_comparables2.h5 /diffobjtypes
+# swap files
+TOOLTEST h5diff_224.txt -c non_comparables2.h5 non_comparables1.h5 /diffobjtypes
# ##############################################################################
# # Links compare without --follow-symlinks nor --no-dangling-links
@@ -1035,6 +1048,15 @@ TOOLTEST h5diff_483.txt -v --exclude-path "/group1" h5diff_exclude2-1.h5 h5diff_
# Exclude from group compare
TOOLTEST h5diff_484.txt -v --exclude-path "/dset3" h5diff_exclude1-1.h5 h5diff_exclude1-2.h5 /group1
+#
+# Only one file contains unique objs. Common objs are same.
+# (HDFFV-7837)
+#
+TOOLTEST h5diff_485.txt -v --exclude-path "/group1" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5
+TOOLTEST h5diff_486.txt -v --exclude-path "/group1" h5diff_exclude3-2.h5 h5diff_exclude3-1.h5
+TOOLTEST h5diff_487.txt -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
# ##############################################################################