Commit Graph

93 Commits

Author SHA1 Message Date
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
Jonathan Kim
3c5dc1a808 [svn-r18134] Purpose:
Additional fix relted to the fix of bug1672.

Description:
    The fix of bug1672 caused some changes of output which required modifying
    some test cases.  After some discussion, restoring the changes of the test 
    cases was decided.  After many experiments for the solution, this fix was 
    made so the code which improved performance can stay.

Tested on Jam.
2010-01-21 15:01:42 -05:00
Jonathan Kim
a988519ad0 [svn-r18126] Fix for bug1749: Incorrect code in diff() function for links compare 2010-01-20 16:03:22 -05:00
Jonathan Kim
8bcc914263 [svn-r17905] Purpose:
Fix Bug1672 - Display garbage value on LE machine for BE data.

Description:
	Casuing by calling diff_dataset twice when -r or no option was given.
	Change to call it once which fix the problem. 
	It also improves the performance. (diffing time in half)
	According further test, it also occurred on BE machine as well and it 
	seems occruing only with the BE data attached to Bugzilla. 
	Don't know how the file was created. Anyway this fix will prevent 
	from diffing with garbage values in similiar potential case. 
	
Tested on:
	linux32 (jam) , linux64 (almani), solaris (linew)
2009-11-20 13:56:01 -05:00
Pedro Vicente Nunes
aad47d8e8b [svn-r17052] Add a run to the h5repack shell script to read a family file
The file used for input is located in the common source tools for testfiles, in tools/testfiles
Modified the h5repack shell script to read files from this location (h5repack reads its input files from a dedicated testfiles location in h5repack/testfiles)
Changed the h5diff open file call to use h5tools_fopen, so that it can open all file drivers

Tested: windows, linux, solaris
2009-06-15 14:05:42 -05:00
Pedro Vicente Nunes
9a298fd1dd [svn-r16373] replaced some printf statements with parallel_print
tested: linux serial and parallel
2009-01-29 13:58:36 -05:00
Pedro Vicente Nunes
120350c395 [svn-r16348] #1368 (E1) h5diff: implement "not comparable" messages. Implemented RFC. The new option is <-c, --compare List objects that are not comparable>
added some test cases

tested: windows, linux
2009-01-26 14:29:22 -05:00
Pedro Vicente Nunes
2eefe0be2e [svn-r16030] updated some comments regarding a function change regarding h5diff return value (not done for 1.8)
* Pedro Vicente, pvn@hdfgroup.org, Nov 4, 2008
 *    Compare the graph and make h5diff return 1 for difference if
 * 1) the number of objects in file1 is not the same as in file2
 * 2) the graph does not match, i.e same names (absolute path)
 * 3) objects with the same name are not of the same type
2008-11-04 16:11:45 -05:00
Pedro Vicente Nunes
61af8db951 [svn-r15990] Merge with 1.8 rev 15967
regarding the return value of h5diff (0, no difference in files, 1 difference )
    objects with the same name must be of the same type
tested: linux
2008-10-29 15:01:38 -05:00
Pedro Vicente Nunes
13294e2042 [svn-r15988] Merge with 1.8 up to rev 15871
Regarding h5diff, h5copy

Tested: linux
2008-10-29 14:47:50 -05:00
Pedro Vicente Nunes
e636e152ea [svn-r15987] Merge with 1.8 rev 15871
Eliminate -c option and make that behavior the default and return 2 instead of -1 on error status

tested: linux
2008-10-29 14:29:25 -05:00
Quincey Koziol
bdd7d59902 [svn-r15628] Description:
Remove trailing whitespace from C/C++ source files, with the following
script:

    foreach f (*.[ch] *.cpp)
        sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f
    end

Tested on:
    Mac OS X/32 10.5.5 (amazon)
    No need for h5committest, just whitespace changes...
2008-09-16 10:52:51 -05:00
Pedro Vicente Nunes
c3bdc28062 [svn-r15445] added some comments
tested: windows, linux
2008-08-07 08:09:35 -05:00
Pedro Vicente Nunes
6787ef71a2 [svn-r15428] http://bugzilla.hdfgroup.uiuc.edu/show_bug.cgi?id=1170
Summary: when using h5diff to compare the results of h5repack (or other tools that copy one HDF5 file to another), a new option is needed to allow h5diff to make an "absolute" comparison of the 2 files. This is the "contents" mode explained in the usage below.

If this mode is present, objects in both files must match (must be exactly the same). If this does not happen, the tool returns an error code of 1 (instead of the success code of 0)

Changes to the h5repack test script: the call to h5diff was changed to include -c (maintaining the previous -q). 

tested: windows, linux, solaris
2008-08-04 16:13:16 -05:00
Scot Breitenfeld
aec106e324 [svn-r14903] Undoing change committed in r14902. 2008-04-30 14:51:13 -05:00
Scot Breitenfeld
5773fd34bc [svn-r14902] Merged fortran_1_8 branch changes r14505:14901 into the trunk. New fortran wrappers added. 2008-04-30 14:23:26 -05:00
Pedro Vicente Nunes
cb06b64c54 [svn-r14728] make 1.8 and 1.6 code look equal or similar
Tested: windows, linux
2008-03-12 13:40:50 -05:00
Pedro Vicente Nunes
95a801714b [svn-r14381] comment typo fix 2008-01-07 15:45:09 -05:00
Quincey Koziol
2c93a80648 [svn-r14160] Description:
Make H5Topen versioned, and add regression test for H5Topen1.

Tested on:
        FreeBSD/32 6.2 (duty) in debug mode
        FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
        Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
                                in debug mode
        Linux/64 2.6 (smirom) 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, in production mode
        AIX/32 5.3 (copper) w/FORTRAN, w/parallel, in production mode
        Mac OS X/32 10.4.10 (amazon) in debug mode
2007-09-27 15:28:27 -05:00
Quincey Koziol
68c01f91d9 [svn-r14154] Description:
Finish deprecating last H5G symbol (H5G_obj_t) - yay!

	Lots of misc. library fixes to remove confusion between links and
objects.  The tools could still use another pass, to remove h5trav_type_t type
and make the correct distinction between links & objects.

Tested on:
        FreeBSD/32 6.2 (duty) in debug mode
        FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
        Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
                                in debug mode
        Linux/64 2.6 (smirom) 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, in production mode
        AIX/32 5.3 (copper) w/FORTRAN, w/parallel, in production mode
        Mac OS X/32 10.4.10 (amazon) in debug mode
2007-09-25 17:18:33 -05:00
Quincey Koziol
579284f422 [svn-r14144] Description:
Move H5Gget_objinfo() to deprecated symbols section and retarget
internal usage to H5Lget_info()/H5Oget_info().

	Misc. other code cleanups...

Tested on:
	FreeBSD/32 6.2 (duty)
	FreeBSD/64 6.2 (liberty)
	Linux/32 2.6 (kagiso)
	Linux/64 2.6 (smirom)
	AIX/32 5.3 (copper)
	Solaris/32 2.10 (linew)
	Mac OS X/32 10.4.10 (amazon)
2007-09-13 10:44:56 -05:00
Quincey Koziol
3bed870363 [svn-r14136] Description:
Move H5Gget_num_objs() and several minor macros, etc. to deprecated
symbols section, replacing it with H5Gget_info().

Tested on:
	FreeBSD/32 6.2 (duty)
	FreeBSD/64 6.2 (liberty)
	Linux/32 2.6 (kagiso)
	Linux/64 2.6 (smirom)
	AIX/32 5.3 (copper)
	Solaris/32 5.10 (linew)
	Mac OS X/32 10.4.10 (amazon)
2007-09-06 10:54:22 -05:00
Quincey Koziol
5c35e64c8a [svn-r14132] Description:
Regenerate the h5diff_types.h5 file, which had somehow gotten mangled
in some earlier checkin (prior to ~2-3 days ago, at least).

	Clean up formatting a bit also..

Tested on:
	Mac OS X/32 10.4.10 (amazon)
2007-08-30 15:34:13 -05:00
Quincey Koziol
71d6bffdd7 [svn-r14127] Description:
Move H5Gget_linkval to deprecated symbol section and replace with
H5Lget_val for internal calls.

Tested on:
	FreeBSD/32 6.2 (duty)
	FreeBSD/64 6.2 (liberty)
	Linux/32 2.6 (kagiso)
	Linux/64 2.6 (smirom)
	Solaris/32 5.10 (linew)
	Mac OS X/32 10.4.10 (amazon)
2007-08-29 18:37:41 -05:00
Quincey Koziol
ea343ef854 [svn-r14115] Description:
Remove all plain calls to H5Gopen() from source, replacing them with
either H5Gopen2().

	Add test for H5Gopen1().

	Reformatted several pieces of code, to clean them up.

Tested on:
	FreeBSD/32 6.2 (duty)
	FreeBSD/64 6.2 (liberty)
	Linux/32 2.6 (kagiso)
	Linux/64 2.6 (smirom)
	Solaris/32 5.10 (linew)
	Mac OS X/32 10.4.10 (amazon)
2007-08-28 10:02:54 -05:00
Quincey Koziol
d6bb18abbc [svn-r13648] Description:
Rename new error handling API routines from H5E<foo>_stack() to
H5E<foo>2().

Tested on:
    Mac OS X/32 10.4.9 (amazon)
    FreeBSD/32 6.2 (duty)
    FreeBSD/64 6.2 (liberty)
2007-04-11 20:59:45 -05:00
Pedro Vicente Nunes
bd01f34589 [svn-r13451]
h5diff bug fix, attributes differences were not being count for total
differences

Revision of H5Ocopy call in h5repack
2007-03-05 11:26:50 -05:00
Pedro Vicente Nunes
67f5810d84 [svn-r13368]
Added a little format alignment to the printing of dimensions
2007-02-21 15:05:04 -05:00
Pedro Vicente Nunes
5af701a32e [svn-r13334] Added a new function to print the dimensions sizes 2007-02-19 15:21:09 -05:00
Albert Cheng
ed7d456e51 [svn-r13253] Updated all C and C++ style source code files with the THG copyright notice.
Tested platform:
Kagiso only since it is only a comment block change.  If it works in one
machine, it should work in all, I hope.  Still need to check the parallel
build on copper.
2007-02-07 09:56:24 -05:00
Quincey Koziol
1482d3e9cb [svn-r12932] Description:
Basic support for H5Literate() routine.  Still needs to be fleshed out and
refactored to simplify.  Also, needs tests. :-)

Tested on:
    FreeBSD/32 4.11 (sleipnir)
    Linux/32 2.4 (heping)
    Linux/64 2.4 (mir)
    AIX/32 5.? (copper)
    Mac OS X/32 10.4.8 (amazon)
2006-11-17 10:48:41 -05:00
Pedro Vicente Nunes
8040a0f381 [svn-r12928] code revision 2006-11-16 15:38:05 -05:00
Quincey Koziol
3f25d6c6d1 [svn-r12895] Description:
Add new H5Lget_val_by_idx() routine & tests.

    Also includes most of changes for H5Ldelete_by_idx() routine.

Tested on:
    Mac OS X/32 10.4.8 (amazon)
    FreeBSD/32 4.11 (sleipnir)
    Linux/32 2.4 (heping)
    Linux/64 2.4 (mir)
    AIX/32 5.? (copper)
2006-11-13 10:00:06 -05:00
Quincey Koziol
5adf1ee1ba [svn-r12864] Description:
Changed H5Lget_linkval() to H5Lget_val(), per our design discussion last
Friday afternoon.

Tested on:
    Linux/32 2.6 (chicago)
2006-11-06 12:05:16 -05:00
Quincey Koziol
8b52aae45d [svn-r12835] Description:
Change H5Lget_linkinfo() to H5Lget_info() to better align with coming API
changes.

Tested on:
    Linux/32 2.6 (chicago)
    Linux/64 2.6 (chicago2)
2006-10-30 19:45:31 -05:00
Quincey Koziol
a6f6462541 [svn-r12700] Alert:
File format is not stable, don't keep files produced!

Description:
    First stage of checkins modifying the format of groups to support creation
order.  Implement "dense" storage for links in groups.

    Try to clarify some of the symbols for the H5L API.

    Add the H5Pset_latest_format() flag for FAPLs, to choose to use the newest
file format options (including "dense" link storage in groups)

    Add the H5Pset_track_creation_order() flag for GCPLs, to enable creation
order tracking in groups (although no index on creation order yet).

    Remove --enable-group-revision configure flag, as file format issues are
now handled in a backwardly/forwardly compatible way.

    Clean up lots of compiler warnings and other minor formatting issues.

Tested on:
    FreeBSD/32 4.11 (sleipnir) w/threadsafe
    Linux/32 2.4 (heping) w/FORTRAN & C++
    Linux/64 2.4 (mir) w/enable-v1.6 compa
    Mac OSX/32 10.4.8 (amazon)
    AIX 5.3 (copper) w/parallel & FORTRAN
2006-10-02 05:24:03 -05:00
Pedro Vicente Nunes
110a855d5e [svn-r12687] reverted back some changes that inadvertedely added some output to the
parallel part of h5diff

tested : heping parallel
2006-09-26 14:21:55 -05:00
Pedro Vicente Nunes
c439d91f81 [svn-r12678] bug fix
the number of atribute differences was not added to the total sum of
differences
2006-09-25 10:49:26 -05:00