From 3c5dc1a808c1513632786cbf4a0a6d4b257c1953 Mon Sep 17 00:00:00 2001 From: Jonathan Kim Date: Thu, 21 Jan 2010 15:01:42 -0500 Subject: [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. --- tools/h5diff/testfiles/h5diff_200.txt | 1 - tools/h5diff/testfiles/h5diff_201.txt | 1 - tools/h5diff/testfiles/h5diff_202.txt | 1 - tools/h5diff/testfiles/h5diff_203.txt | 1 - tools/h5diff/testfiles/h5diff_204.txt | 1 - tools/h5diff/testfiles/h5diff_205.txt | 1 - tools/h5diff/testfiles/h5diff_206.txt | 1 - tools/h5diff/testfiles/h5diff_207.txt | 1 - tools/h5diff/testfiles/h5diff_609.txt | 2 -- tools/h5diff/testfiles/h5diff_618.txt | 2 -- tools/lib/h5diff.c | 8 +++++--- tools/lib/h5diff_attr.c | 6 ++++-- 12 files changed, 9 insertions(+), 17 deletions(-) diff --git a/tools/h5diff/testfiles/h5diff_200.txt b/tools/h5diff/testfiles/h5diff_200.txt index 5a4d02e..56d723d 100644 --- a/tools/h5diff/testfiles/h5diff_200.txt +++ b/tools/h5diff/testfiles/h5diff_200.txt @@ -1,4 +1,3 @@ -dataset: and -------------------------------- Some objects are not comparable -------------------------------- diff --git a/tools/h5diff/testfiles/h5diff_201.txt b/tools/h5diff/testfiles/h5diff_201.txt index da916ea..84d6766 100644 --- a/tools/h5diff/testfiles/h5diff_201.txt +++ b/tools/h5diff/testfiles/h5diff_201.txt @@ -1,2 +1 @@ -dataset: and Not comparable: or is an empty dataset diff --git a/tools/h5diff/testfiles/h5diff_202.txt b/tools/h5diff/testfiles/h5diff_202.txt index 8e3c7ac..fd4a191 100644 --- a/tools/h5diff/testfiles/h5diff_202.txt +++ b/tools/h5diff/testfiles/h5diff_202.txt @@ -1,3 +1,2 @@ -dataset: and Not comparable: is of class H5T_FLOAT and is of class H5T_INTEGER Not comparable: has sign H5T_SGN_ERROR and has sign H5T_SGN_2 diff --git a/tools/h5diff/testfiles/h5diff_203.txt b/tools/h5diff/testfiles/h5diff_203.txt index 90294e3..496523c 100644 --- a/tools/h5diff/testfiles/h5diff_203.txt +++ b/tools/h5diff/testfiles/h5diff_203.txt @@ -1,3 +1,2 @@ -dataset: and Not comparable: has rank 1, dimensions [6], max dimensions [6] and has rank 2, dimensions [3x2], max dimensions [3x2] diff --git a/tools/h5diff/testfiles/h5diff_204.txt b/tools/h5diff/testfiles/h5diff_204.txt index a94091d..098a203 100644 --- a/tools/h5diff/testfiles/h5diff_204.txt +++ b/tools/h5diff/testfiles/h5diff_204.txt @@ -1,3 +1,2 @@ -dataset: and Not comparable: has rank 2, dimensions [3x2], max dimensions [3x2] and has rank 2, dimensions [2x2], max dimensions [2x2] diff --git a/tools/h5diff/testfiles/h5diff_205.txt b/tools/h5diff/testfiles/h5diff_205.txt index c3708cb..3e2d1f2 100644 --- a/tools/h5diff/testfiles/h5diff_205.txt +++ b/tools/h5diff/testfiles/h5diff_205.txt @@ -1,4 +1,3 @@ -dataset: and Not comparable: has rank 2, dimensions [2x2], max dimensions [2x2] and has rank 2, dimensions [3x2], max dimensions [3x2] Not comparable: has sign H5T_SGN_2 and has sign H5T_SGN_NONE diff --git a/tools/h5diff/testfiles/h5diff_206.txt b/tools/h5diff/testfiles/h5diff_206.txt index 3557b1e..164aed9 100644 --- a/tools/h5diff/testfiles/h5diff_206.txt +++ b/tools/h5diff/testfiles/h5diff_206.txt @@ -1,2 +1 @@ -dataset: and Not comparable: has a class H5T_FLOAT and has a class H5T_INTEGER diff --git a/tools/h5diff/testfiles/h5diff_207.txt b/tools/h5diff/testfiles/h5diff_207.txt index 4dfcbb7..bb8e23f 100644 --- a/tools/h5diff/testfiles/h5diff_207.txt +++ b/tools/h5diff/testfiles/h5diff_207.txt @@ -1,3 +1,2 @@ -dataset: and Not comparable: or is an empty dataset Not comparable: has 2 members has 1 members diff --git a/tools/h5diff/testfiles/h5diff_609.txt b/tools/h5diff/testfiles/h5diff_609.txt index 9369dd9..e69de29 100644 --- a/tools/h5diff/testfiles/h5diff_609.txt +++ b/tools/h5diff/testfiles/h5diff_609.txt @@ -1,2 +0,0 @@ -dataset: and -0 differences found diff --git a/tools/h5diff/testfiles/h5diff_618.txt b/tools/h5diff/testfiles/h5diff_618.txt index 9369dd9..e69de29 100644 --- a/tools/h5diff/testfiles/h5diff_618.txt +++ b/tools/h5diff/testfiles/h5diff_618.txt @@ -1,2 +0,0 @@ -dataset: and -0 differences found diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 18dd1ed..ad42a94 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -931,11 +931,13 @@ hsize_t diff(hid_t file1_id, /* the rest (-c, none, ...) */ else { - do_print_objname("dataset", path1, path2); nfound = diff_dataset(file1_id, file2_id, path1, path2, options); - /* not comparable, no display the different number */ - if (!options->not_cmp) + /* print info if compatible and difference found */ + if (!options->not_cmp && nfound) + { + do_print_objname("dataset", path1, path2); print_found(nfound); + } } break; diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index 73a7ee7..2cf6539 100644 --- a/tools/lib/h5diff_attr.c +++ b/tools/lib/h5diff_attr.c @@ -242,7 +242,6 @@ hsize_t diff_attr(hid_t loc1_id, /* the rest (-c, none, ...) */ else { - do_print_objname ("attribute", np1, np2); nfound = diff_array(buf1, buf2, nelmts1, @@ -257,8 +256,11 @@ hsize_t diff_attr(hid_t loc1_id, attr2_id); /* not comparable, no display the different number */ - if (!options->not_cmp) + if (!options->not_cmp && nfound) + { + do_print_objname ("attribute", np1, np2); print_found(nfound); + } } -- cgit v0.12