summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-01-02 20:39:32 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-01-02 20:39:45 (GMT)
commit5f4676f3c8f077b1667611b78d2cb19deec1f37a (patch)
tree41772222082c0496ac6e4086e1b70e6020e24943 /tools/lib
parentd31b45766fa5bdbb7245cf5aa9444c9e6c6ca863 (diff)
downloadhdf5-5f4676f3c8f077b1667611b78d2cb19deec1f37a.zip
hdf5-5f4676f3c8f077b1667611b78d2cb19deec1f37a.tar.gz
hdf5-5f4676f3c8f077b1667611b78d2cb19deec1f37a.tar.bz2
HDFFV-8745 - fix implementation of 8625
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5diff_attr.c20
-rw-r--r--tools/lib/h5diff_dset.c19
2 files changed, 19 insertions, 20 deletions
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 6019738..4e4b40d 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -385,28 +385,8 @@ hsize_t diff_attr(hid_t loc1_id,
/* get the datatypes */
if((ftype1_id = H5Aget_type(attr1_id)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed");
- vstrtype1 = H5Tis_variable_str(ftype1_id);
if((ftype2_id = H5Aget_type(attr2_id)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed");
- vstrtype2 = H5Tis_variable_str(ftype2_id);
-
- /* no compare if either one but not both are variable string type */
- if (vstrtype1 != vstrtype2) {
- if((opts->m_verbose || opts->m_list_not_cmp))
- parallel_print("Not comparable: one of attribute <%s/%s> or <%s/%s> is of variable length type\n",
- path1, name1, path2, name2);
- opts->not_cmp = 1;
- if (H5Tclose(ftype1_id) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose first attribute ftype failed");
- if (H5Tclose(ftype2_id) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose second attribute ftype failed");
- if (H5Aclose(attr1_id) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aclose first attribute failed");
- if (H5Aclose(attr2_id) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aclose second attribute failed");
-
- continue;
- }
if((mtype1_id = H5Tget_native_type(ftype1_id, H5T_DIR_DEFAULT)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type first attribute ftype failed");
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index ee42b99..55e9839 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -767,12 +767,31 @@ int diff_can_type(hid_t f_tid1, /* file data type */
}
}
+ if(tclass1 == H5T_STRING) {
+ hid_t vstrtype1 = -1;
+ hid_t vstrtype2 = -1;
+ h5difftrace("diff_can_type end - H5T_STRING\n");
+
+ vstrtype1 = H5Tis_variable_str(f_tid1);
+ vstrtype2 = H5Tis_variable_str(f_tid2);
+
+ /* no compare if either one but not both are variable string type */
+ if (vstrtype1 != vstrtype2) {
+ if((opts->m_verbose || opts->m_list_not_cmp))
+ parallel_print("Not comparable: <%s> or <%s> is of mixed string type\n",
+ obj1_name, obj2_name);
+ opts->not_cmp = 1;
+ HGOTO_DONE(0);
+ }
+ }
+
if(tclass1 == H5T_COMPOUND) {
int nmembs1;
int nmembs2;
int j;
hid_t memb_type1 = -1;
hid_t memb_type2 = -1;
+ h5difftrace("diff_can_type end - H5T_COMPOUND\n");
nmembs1 = H5Tget_nmembers(f_tid1);
nmembs2 = H5Tget_nmembers(f_tid2);