HDFFV-10128 Fixed string length with no null fixed

This commit is contained in:
Allen Byrne 2017-05-16 09:28:49 -05:00
parent 3e1a06e649
commit 4f0b92bdd5
3 changed files with 9 additions and 16 deletions

View File

@ -665,6 +665,7 @@ static hsize_t diff_datum(void *_mem1,
size_t size1;
size_t size2;
size_t sizex;
size_t size_mtype = H5Tget_size(m_type);
H5T_str_t pad = H5Tget_strpad(m_type);
/* if variable length string */
@ -682,17 +683,21 @@ static hsize_t diff_datum(void *_mem1,
/* Get pointer to first string */
s1 = (char*) mem1;
size1 = HDstrlen(s1);
if (size1 > size_mtype)
size1 = size_mtype;
/* Get pointer to second string */
s2 = (char*) mem2;
size2 = HDstrlen(s2);
if (size2 > size_mtype)
size2 = size_mtype;
}
else {
/* Get pointer to first string */
s1 = (char *)mem1;
size1 = H5Tget_size(m_type);
size1 = size_mtype;
/* Get pointer to second string */
s2 = (char *)mem2;
size2 = H5Tget_size(m_type);
size2 = size_mtype;
}
/*

View File

@ -1130,7 +1130,7 @@ ADD_H5_TEST (h5diff_631 0 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp18 g1/f
# ##############################################################################
ADD_H5_TEST (h5diff_70 1 -v ${FILE5} ${FILE6})
# temporary test to verify HDF5-8625
ADD_H5_TEST (h5diff_tmp1 1 tmptest2.he5 tmptest.he5)
ADD_H5_TEST (h5diff_tmp1 0 tmptest2.he5 tmptest.he5)
# temporary test to verify HDF5-8639
ADD_H5_TEST (h5diff_tmp2 1 tmpSingleSiteBethe.output.h5 tmpSingleSiteBethe.reference.h5)

View File

@ -1,17 +1,5 @@
attribute: <EndDate of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>> and <EndDate of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>>
3 differences found
attribute: <Set2eqSet1 of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>> and <Set2eqSet1 of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>>
1 differences found
attribute: <VersionID of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>> and <VersionID of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>>
1 differences found
attribute: <LongName of </HDFEOS/GRIDS/SET1/Data Fields/STv>> and <LongName of </HDFEOS/GRIDS/SET1/Data Fields/STv>>
1 differences found
attribute: <LongName of </HDFEOS/GRIDS/SET1/Data Fields/Tot_Precip_Water>> and <LongName of </HDFEOS/GRIDS/SET1/Data Fields/Tot_Precip_Water>>
1 differences found
attribute: <LongName of </HDFEOS/GRIDS/SET2/Data Fields/STv>> and <LongName of </HDFEOS/GRIDS/SET2/Data Fields/STv>>
1 differences found
--------------------------------
Some objects are not comparable
--------------------------------
Use -c for a list of objects.
EXIT CODE: 1
EXIT CODE: 0