Commit Graph

130 Commits

Author SHA1 Message Date
Allen Byrne
78a5870680 Fix error handling issues 2017-10-17 16:13:12 -05:00
Allen Byrne
2cbdf46cb9 HDFFV-10297 add h5copy test and fix h5diff errors 2017-10-16 17:26:23 -05:00
Allen Byrne
448217e7e3 HDFFV-10297 Fix compiler compaliants 2017-10-16 09:19:41 -05:00
Allen Byrne
d5c073d406 HDFFV-10296 Update tools lib to use the error handling macros. 2017-10-13 16:34:01 -05:00
Allen Byrne
89f65fc97e HDFFV-9774 Add enable-error-stack argument to h5diff 2017-08-31 15:58:37 -05:00
Dana Robinson
ee7816bbfb Stripped C standard library headers (and a couple of macros)
from the tools code. This is all handled in H5private.h, which
should be included in all tools source files.
2017-07-17 13:24:01 -05:00
Larry Knox
89fbe00dec Merge pull request #426 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to hdf5_1_10
* commit '54957d37f5aa73912763dbb6e308555e863c43f4':
  Commit copyright header change for src/H5PLpkg.c which was added after running script to make changes.
  Add new files in release_docs to MANIFEST. Cimmit changes to Makefile.in(s) and H5PL.c that resulted from running autogen.sh.
  Merge pull request #407 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10_1 to hdf5_1_10_1
  Change copyright headers to replace url referring to file to be removed and replace it with new url for COPYING file.
2017-04-25 16:05:36 -05:00
Allen Byrne
be260bbf75 Add goto error for dataset read failure. Fixed comments 2017-01-17 09:55:15 -06:00
Quincey Koziol
83724bd787 [svn-r30113] Description:
Clean up warnings (from 2774 -> 1560, with my standard debug build)

Tested on:
    MacOSX/64 10.11.5 (amazon) w/serial, parallel & production
    (h5committest forthcoming)
2016-06-28 16:53:48 -05:00
Quincey Koziol
d3396a7953 [svn-r30075] Description:
Bring object/dataset/group/named datatype features from revise_chunks
branch to trunk.  Also CMake support for h5format_convert and a bunch of
misc. cleanups.

Tested on:
    MacOSX/64 10.11.5 (amazon) w/serial, parallel & production
    (h5committest forthcoming)
2016-06-14 18:07:03 -05:00
Dana Robinson
d90e4acfa7 [svn-r27801] Minor warning fixes in the tools.
Tested on: jam (too minor for h5committest)
2015-09-16 10:23:16 -05:00
Dana Robinson
81f7e6b1d3 [svn-r25755] Removed spurious casts in a few HDfree() statements.
Discovered when I temporarily #defined HDfree() to a more complicated
function while investigating something. 

Tested on a local linux VM. This is a very minor change.
2014-10-31 13:11:42 -05:00
Quincey Koziol
60f8a4100e [svn-r25215] Description:
Bring changes from Coverity branch back to trunk:

r20914:
    Use HDstrncpy and HDstrncat! --gh

20915:
    Use HDstrncpy and HDstrncat! --gh

Tested on:
    Mac OSX/64 10.9.3 (amazon) w/gcc 4.9.0, C++, FORTRAN & parallel
    (too minor to require h5committest)
2014-05-25 00:55:39 -05:00
Quincey Koziol
164b4c7534 [svn-r24804] Description:
Brought changes from Coverity branch back to trunk, and cleaned up misc.
other warnings & formatting issues:

r20833:
Fixed Coverity 667 and 668 with real integer overflow tests this time.

r20834:
Use HDstrncpy and HDstrncat. --gh 

r20835:
Change to use strncpy - use base_len + 1 for line 156, use HDstrlen(path) + 1 for line 159

r20836:
Fixed coverity 585 by casting output of fgetc() to a char.

r20837:
Changed sprintf calls to snprintf with size 1 less than the allocated buffer to address coverity issue #967.

Tested on:
    Mac OSX/64 10.9.2 (amazon) w/C++, FORTRAN & parallel
    (too minor to require h5committest)
2014-03-15 23:44:13 -05:00
Quincey Koziol
2d79ba29ed [svn-r24480] Description:
Bring r24479 from 1.8 branch to trunk:

    Fix ph5diff worker command handling so it can correctly respond to
situations where there's no work to perform.  Also, a few minor code cleanups.

Tested on:
    Mac OSX/64 10.9.0 (amazon) w/parallel
    (too minor to require h5committest)
2013-11-30 13:10:36 -05:00
Allen Byrne
a8c63e28d5 [svn-r24138] Cast constants to specified type.
Cast smaller vars to larger type.
Cast calculation result to correct type.
Changed int member to hbool_t

Tested: local linux
2013-09-13 16:11:30 -05:00
Quincey Koziol
59dd5665a5 [svn-r23395] Description:
Bring Coverity changes from branch to trunk:

r20682:
fixed coverity:
76, 77, 635, 636, 1164, 1165, 1166, 1121, 1122, 1117, 1343

Tested on:
    Mac OSX/64 10.8.3 (amazon) w/C++ & FORTRAN
    (too minor to require h5committest)
2013-03-19 22:44:28 -05:00
Jonathan Kim
89a2c4a783 [svn-r22751] Purpose:
HDFFV-5919 -  GMQS: h5diff - The number of object difference is not consistent between dataset and group/type when attribute(s) have differences

Description:
  Object differences are not consistent between dataset and group/datatype when their attribute(s) have differences. This is because attribute(s) differences is not accumulated to group or datatype object’s difference, but accumulated to dataset difference.
  To fix, do not accumulate attribute difference to dataset difference.  This is referred to h5diff’s default behavior and also past report from users that users were confused by the accumulated behavior. (also can’t figure out only for dataset difference , also hard to spot dataset difference when it has lots of attributes or differences)
  This also lead to fix inconsistent format indicating difference between dataset and group/datatype object.

Tested: 
    jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE),  Windows (32-LE cmake), cmake (jam)
2012-09-10 16:40:47 -05:00
Allen Byrne
9c547117ec [svn-r22637] Remove legacy command to kill MPI processes on obj to obj testing.
Tested: Windows, jam, koala
2012-08-06 15:08:12 -05:00
Allen Byrne
db5a8eaa54 [svn-r22631] Move executable statement to after declarations 2012-08-05 21:48:11 -05:00
Allen Byrne
28943c415b [svn-r22625] HDFFV-8111: h5diff compare file to itself - removed path shortcut 2012-08-03 15:11:36 -05:00
Jonathan Kim
99ef5765f5 [svn-r22618]
Purpose:
  HDFFV-8003 - ph5diff (parallel h5diff): daily test failure on ember intermittently during non comparable test file comparison
  HDFFV-7755 - parallel h5diff : hanging on koala intermittently during non comparable test file comparison

Description:
  non-comparable test intermittently hung on koala and ember, but not on jam. it didn't occur until -np reaches 4 or bigger. it occurred once out of many repeated attempts of the same test.
  There was a incorrectly (mistakenly?) duplicated code in MPI section which caused such hang in a certain condition. The test used more processes than other tests, which increased chance to trigger more undone processes, and such process could enter the incorrect code section and wait for wrong pair of send. it explains why it occurred intermittently according to machine condition and using a certain feature. 
  Removed incorrect code which blocked correct code.
  
Tested: some manually repeated test performed
 jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE)
2012-08-01 12:07:46 -05:00
Jonathan Kim
1b35c60118 [svn-r22319] Purpose:
Fix for HDFFV-7998-h5diff: incorrect behavior and output for comparing symbolic dangling links without following-symlinks option 

Description:
  Fix not to check and display dangling link status without --follow-symlinks option.
  Berfor the fix, when comparing symbolic link to symbolic link without follow-symlinks option, h5diff followed to check if those links are dangling or not. It caused to display output incorrectly (dangling link instead of symbolic link).
  
  The fix also improved performance when comparing lots of symbolic links without the --follow-symlinks option.
  Test cases were added and tagged with jira#.

Tested:
  jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE),  Windows (32-LE cmake), Cmake (jam)
2012-04-26 10:56:16 -05:00
Jonathan Kim
6cef6bca1f [svn-r22176] Purpose:
Fix for HDFFV-7644 GMQS: h5diff - incorrect behaviors when comparing HDF5 files with different type of objects (dataset, group, type) as common objects

Description:
  Fixed failure for comparing same named object with different object types in comparing groups. (common object comparison)
  Prior to the fix, h5diff resulted in error. After the fix, h5diff detects such case as non-comparable and display messages accordingly.
  Test cases were added and tagged with jira#.

Tested:
  jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE),  Windows (32-LE cmake), Cmake (jam)
2012-03-28 17:09:38 -05:00
Jonathan Kim
d476ce138b [svn-r22114] Purpose:
Fix for HDFFV-7837 - h5diff: incorrect behavior with exclude-path option when unique object exist only in one file

Description:
  If unique objects exists only in one file and try to exclude
  the unique objects with --exclude-path option, h5diff missed 
  excluding some objects. 
  Fixed to exclude objects correctly in such case.
  Test cases were added and tagged with jira#.


Tested:
  jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE),  Windows (32-LE cmake), Cmake (jam)
2012-03-21 16:00:15 -05:00
Jonathan Kim
0a46593a38 [svn-r22038] Purpose:
Fix for HDFFV-7835 h5diff: incorrect result for comparing the two same type symlinks as dangling links.

Description:
  When two symbolic dangling links are compared with --follow-symlinks option,
  the result should be same. It works for comparing two files, but didn't work
  for comparing two objects. 
  Test cases were added and tagged with jira#.


Tested:
  jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE),  Windows (32-LE cmake), Cmake (jam)
2012-03-09 15:34:37 -05:00
Allen Byrne
df6c92e506 [svn-r22004] Reduced warnings and fixed conflicts resulting from including h5tools.h
Tested: local linux
2012-02-28 13:26:34 -05:00
Allen Byrne
2dffa66ef7 [svn-r21984] Correct HD prefix in tools
Checked for HD support.
2012-02-24 11:03:17 -05:00
Allen Byrne
cec338c647 [svn-r21981] Correct HD prefix in tools for fprintf
Checked for HD support.
2012-02-24 10:32:36 -05:00
Allen Byrne
944f2cdf8d [svn-r21979] Correct HD prefix in tools for strlen and memcpy
Checked for HD support.
2012-02-24 09:27:57 -05:00
Allen Byrne
0b4463911f [svn-r21974] Update HSIZE_T print statements to use correct macro.
Fix some more HD prefix issues in tools.

Tested: local linux
2012-02-23 14:08:09 -05:00
Jonathan Kim
13ef2d1fbb [svn-r21890] Purpose:
Fix for HDFFV-7836 h5diff: displays error stack message for comparing the two dangling symlink with follow-symlinks option

Description:
  While ago, to improve performance, skipping same object checking 
  (h5tools_is_obj_same()) was added. 
  However the checking function doesn't understand about the dangling link and
  caused the issue. 
  Since handling dangling link code section already implemented, move the 
  checking function after handling dangling-links to address the problem.
  Test was added and tagged with jira#.


Tested:
  jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE),  Windows (32-LE cmake), Cmake (jam)
2012-01-24 15:39:59 -05:00
Jonathan Kim
86faf0b302 [svn-r21396] Purpose:
HDFFV-7693 - h5diff produces different behavior between versions: 1.8.3 and 1.8.6

Description:
    There were two issues on this. 
    One was not displaying all the comparable objects if non-comparable 
    object/attribute exist and compared before comparables ones. This issue
    occurred after 1.8.4 release. This is the issue from user.
    The other issue was not displaying all the comparable attributes, 
    if non-comparable object/attribute exist and compared ahead. This issue 
    were exist even before 1.8.4 release. So it's possible some attribute 
    comparison may have not displayed correctly in the past, if non-comparable 
    data were exist in common object.
    Fixed h5diff to display all the comparable object and attribute regardless 
    of non-comparables. 

Tested:
 jam (linux32-LE), koala (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Cmake (jam, Windows)
2011-09-16 14:29:03 -05:00
Jonathan Kim
054ca47350 [svn-r20767] Purpose:
HDFFV-5928 - GMQS: h5diff problem and improvement on comparsing the same objects

Description:
    Improved performance by eliminating duplicated action for getting object 
    information in half from the previous fixe when comparing group vs group. 
    This is addition to the previous commit r20676.

Tested:
  jam (linux32-LE), koala (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), cmake
2011-05-06 17:02:24 -05:00
Jonathan Kim
170e7e53a5 [svn-r20676] Purpose:
- HDFFV-5928 - GMQS: h5diff problem and improvement on comparsing the same objects

Description:
    Fixed:
    1) adding h5tools_is_obj_same() function to check if two given IDs or paths point to the same object. This function can be very useful for other tools and applications.
    2) using h5tools_is_obj_same() at h5diff() and diff() in h5diff.c. If two paths point to the same object, there is no need to check the details of the object since we know there is no difference. The fix will increase the performance by skipping the content comparison. It also fixed the problem of reporting difference for some cases of comparing the same file, e.g. empty files or files with incomparable objects the same file.

    Test update:
    Updat prvious test cases (171, 172, 530) affected by this fix, so they
    still perfrom originally intended testing without bypassing.

Tested:
 jam (linux32-LE), koala (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), cmake
2011-04-29 12:02:31 -05:00
Jonathan Kim
4147de8d02 [svn-r20294] Purpose:
Fixed CHICAGO: Bug 2121 - h5diff - incorrect and lack of output for the 
    different set of attributes (different number and names)

Description:
    Previously h5diff compared attributes correctly only when two objects have 
    the same number of attributes and attribute names are identical.
    This fix covers all other cases.
    Also didn't display useful information about attribute difference.
    This fixes both issues.

     
Tested:
 jam (linux32-LE), amani (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE)
2011-03-22 10:47:07 -05:00
Jonathan Kim
f845e716bc [svn-r20274] Purpose:
Fixed Bug 2214 - GMQS: h5diff - memory leak in diff()

Description:
    Memory leaks occurred when accessing symbolic links with --follow-symlink
    option. 
    Test cases are in testing script. (400 - 456, 501 - 518)
    An example test : valgrind  --leak-check=full  h5diff --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlinks.h5

     
Tested:
 jam (linux32-LE), amani (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Cmake - jam
2011-03-18 15:13:16 -05:00
Quincey Koziol
575469a6a7 [svn-r20065] Description:
Bring changes from Coverity branch to trunk:

r19975:
Fixed potential mem leak at H5O_attr_open_by_name

r19980:
Fix coverity issue 792.
Free tmp_env_prefix in H5Lexternal.c line 365 if it is not NULL but its contents are 0 when it goes out of scope.

r20039:
Eliminate warnings about nested extern and implicit declarations of parallel_print and address Coverity defects 712-781 by #including h5tools_utils.h in h5diff_array.c, h5diff_attr.c, h5diff_dset.c and h5diff_util.c.

r20046:
Purpose: Address TOCTOU warnings in h5jam and h5unjam

Description: Coverity is afraid that the state of the input file could change
between the call to stat() and the call to open().  This is called a time-of-
check time-of-use (TOCTOU) vulnerability.  Modified stat calls to fstat which
uses an open file pointer so it (hopefully) won't complain any more.

r20047:
Addressed coverity issues 135-137, 462-464.  Local pointers that needed to be freed in case of error were moved out of a switch statement in src/H5Tnative.c, set to NULL, and checked before freeing.

Tested on:
    Mac OS X/32 10.6.6 (amazon) w/debug & production
    (h5committested on Coverity branch)
2011-02-08 16:35:54 -05:00
Jonathan Kim
04a7315138 [svn-r19443] Purpose:
Fix for group comparison with exclude-path case. Use relative path.

Description:
 Related to "1890:  h5diff excluding object for file comparison via command line" checkins. (r19406)

Tested:
 jam, amani and heiwa
2010-09-20 17:11:50 -05:00
Allen Byrne
8394d611f2 [svn-r19418] On windows, an include bypassed the WIN32_LEAN_AND_MEAN define. Moved the define up. Moved the h5dif.h to after the h5private include
Tested: Windows
2010-09-17 13:05:32 -05:00
Jonathan Kim
eb7b5b2cef [svn-r19406] Purpose:
Add --exclude-path option

Description:
 Specified path to an object will be excluded from comparing the two files or two groups. If group is specified all the member objects will be excluded.
 Related to "1890:  h5diff excluding object for file comparison via command line"

Tested:
 jam, amani and heiwa
2010-09-16 16:46:16 -05:00
Jonathan Kim
c561dc7183 [svn-r19400] Purpose:
Fix for Bug1975 h5diff - support recursive comparison on group when specified as an object

Description:
 Compare member objects and groups recursively when two files or groups are specified to be compared. Support parallel diff and handling symbolic links accordingly.

Tested:
 jam, amani, heiwa
2010-09-16 12:48:06 -05:00
Quincey Koziol
0cd7123fb6 [svn-r19292] Description:
Merge r19290 & r19291 from 1.8 branch to trunk:

r19290:
Correct another error in metadata accumulator dirty region calculations
(this time with a corner case when freeing data in the file).

r19291:
Avoid getting object information for soft/external links if we aren't
going to traverse across the link itself.

Tested on:
        FreeBSD/32 6.3 (duty) in debug mode
        FreeBSD/64 6.3 (liberty) 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 (amani) 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 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
        Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
                in production mode
        Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
        Mac OS X/32 10.6.4 (amazon) in debug mode
        Mac OS X/32 10.6.4 (amazon) w/C++ & FORTRAN, w/threadsafe,
                in production mode
        Mac OS X/32 10.6.4 (amazon) w/parallel, in debug mode
2010-08-24 16:03:32 -05:00
Jonathan Kim
a5ca9e6ba9 [svn-r18873] Purpose:
Rename '--follow-links' to '--follow-symlinks' 

Description:
    The '--follow-links' option is to follow symbolic links (soft and external).
    Make the name more intuitive and specific to the feature.

Tested:
    jam, amani and linew
2010-05-21 15:12:22 -05:00
Jonathan Kim
249acc0355 [svn-r18614] Purpose:
Fix for bug 1817 : h5copy fail to copy dangling link by specifying 
    link path directly

Tested:
    jam, amani, linew
2010-04-22 13:17:35 -05:00
Jonathan Kim
ee757e449b [svn-r18273] Purpose:
bugzilla 1754: h5diff: support comparing through links.

Description:
    Fix incorrect (or hanging) behavior in parallel mode when specifying 
    invalid combination of command options. 
    (ex: -v and -q , --no-dangling-links without --follow-links)
    Add relate test case
    Update h5diffgentest.c due to add test files this and previous time

Note:
    svn #18266 (prior to this)
    svn #18164 (original check-in)

Tested:
    h5committest (jam, amani and linew)
2010-02-18 11:51:12 -05:00
Jonathan Kim
ad9e876b0c [svn-r18266] Purpose:
bugzilla 1754: h5diff: support comparing through links.
    (original check-in svn revision #18164)
Description:
    fix the hang issue in parallel mode when compare external-link.
    add --no-dangling-links option. 
    add test cases (#450-#459) relate to the new option.
    improve test script to check exit code.
    update --help relate to the new options.
    correct some indentations.

Tested:
    h5committest (jam, amani and linew)
2010-02-16 14:43:05 -05:00
Quincey Koziol
fd70b2afa8 [svn-r18197] Description:
Trim trailing whitespace from source code files with this command:

find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.f90" \) -print |xargs -n 1 sed -i "" 's/[[:blank:]]*$//'

Tested on:
    None - eyeballed only
2010-01-29 23:29:13 -05:00
Jonathan Kim
98639557ac [svn-r18166] Purpose:
Take care of test case fail for h5repack from checkin (r18164)

Description:
    Previous checkin didn't allow h5diff to return succeed when a link's 
    target object doesn't exist. Changed it to succeed with warning.
    (Need to discuss related feature)

Tested on Jam
2010-01-25 19:20:16 -05:00
Jonathan Kim
79cd5838d1 [svn-r18164] Purpose:
Add a feature to compare through links. Relate to bugzilla report 1754.

Description:
    Currently, h5diff command only compares the name(path) of target object 
    not the actual data. With this feature, h5diff will go through the link(s) 
    and figure out the actual object at the end of the link and compare data 
    if exist. Internally we have hard-link, soft-link, external-link (as part 
    of user_defined-link). This feature will provide a user transparent 
    experience when comparing link objects as the user can specify any of 
    those 3 type of links to be compared in any combination.

Tested on Jam.
2010-01-25 16:43:48 -05:00