Commit Graph

113 Commits

Author SHA1 Message Date
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
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