mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[svn-r23304] Purpose:
HDFFV-7643 - h5diff - incorrect exit-code returns for extra attribute exist Description: h5diff: Fixed to return correct exit code 1 when detect unique attribute. Prior to this fix, h5diff returned exit code 0 indicating two files are identical. Tested: jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), fred (mac64-LE), emu (solaris-BE), Windows (32-LE cmake), cmake (jam)
This commit is contained in:
parent
f3da4919c4
commit
dbad502865
@ -751,9 +751,12 @@ Bug Fixes since HDF5-1.8.0 release
|
||||
|
||||
Tools
|
||||
-----
|
||||
- h5diff: Fixed to return correct exit code 1 when detect unique extra
|
||||
attribute. Prior to this fix, h5diff returned exit code 0 indicating
|
||||
two files are identical. HDFFV-7643 (JKM 2013/02/15)
|
||||
- h5diff: Improved speed when comparing HDF5 files with lots of
|
||||
attributes. Much slower performance was identified with release version
|
||||
from 1.8.7 to 1.8.10 compared to 1.8.6. (JKM 2012/10/19)
|
||||
attributes. Much slower performance was identified with release
|
||||
version from 1.8.7 to 1.8.10 compared to 1.8.6. (JKM 2012/10/19)
|
||||
- h5repack: "h5repack -f NONE file1.h5 out.h5" command failed if
|
||||
source file contains chunked dataset and a chunk dim is bigger than
|
||||
the dataset dim. Another issue is that the command changed max dims
|
||||
|
@ -1092,13 +1092,13 @@ ADD_H5_TEST (h5diff_704 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_F
|
||||
ADD_H5_TEST (h5diff_705 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /dset)
|
||||
|
||||
# same attr number , all different attr name
|
||||
ADD_H5_TEST (h5diff_706 0 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /ntype)
|
||||
ADD_H5_TEST (h5diff_706 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /ntype)
|
||||
|
||||
# different attr number , same attr name (intersected)
|
||||
ADD_H5_TEST (h5diff_707 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g2)
|
||||
|
||||
# different attr number , all different attr name
|
||||
ADD_H5_TEST (h5diff_708 0 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g3)
|
||||
ADD_H5_TEST (h5diff_708 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g3)
|
||||
|
||||
# when no attributes exist in both objects
|
||||
ADD_H5_TEST (h5diff_709 0 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g4)
|
||||
|
@ -10,4 +10,4 @@ datatype: </ntype> and </ntype>
|
||||
x integer1
|
||||
x integer4
|
||||
Attributes status: 0 common, 3 only in obj1, 3 only in obj2
|
||||
EXIT CODE: 0
|
||||
EXIT CODE: 1
|
||||
|
@ -14,4 +14,4 @@ group : </g3> and </g3>
|
||||
x integer10
|
||||
x integer3
|
||||
Attributes status: 0 common, 3 only in obj1, 2 only in obj2
|
||||
EXIT CODE: 0
|
||||
EXIT CODE: 1
|
||||
|
@ -350,6 +350,13 @@ hsize_t diff_attr(hid_t loc1_id,
|
||||
if( build_match_list_attrs(loc1_id, loc2_id, &match_list_attrs, options) < 0)
|
||||
goto error;
|
||||
|
||||
/* if detect any unique extra attr */
|
||||
if(match_list_attrs->nattrs_only1 || match_list_attrs->nattrs_only2)
|
||||
{
|
||||
/* exit will be 1 */
|
||||
options->contents = 0;
|
||||
}
|
||||
|
||||
for(u = 0; u < (unsigned)match_list_attrs->nattrs; u++)
|
||||
{
|
||||
if( (match_list_attrs->attrs[u].exist[0]) && (match_list_attrs->attrs[u].exist[1]) )
|
||||
|
Loading…
Reference in New Issue
Block a user