diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5diff/testfiles/h5diff_200.txt | 1 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_201.txt | 1 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_202.txt | 1 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_203.txt | 1 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_204.txt | 1 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_205.txt | 1 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_206.txt | 1 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_207.txt | 1 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_609.txt | 2 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_618.txt | 2 | ||||
-rw-r--r-- | tools/lib/h5diff.c | 50 | ||||
-rw-r--r-- | tools/lib/h5diff_attr.c | 110 | ||||
-rw-r--r-- | tools/misc/h5debug.c | 8 |
13 files changed, 78 insertions, 102 deletions
diff --git a/tools/h5diff/testfiles/h5diff_200.txt b/tools/h5diff/testfiles/h5diff_200.txt index 56d723d..5a4d02e 100644 --- a/tools/h5diff/testfiles/h5diff_200.txt +++ b/tools/h5diff/testfiles/h5diff_200.txt @@ -1,3 +1,4 @@ +dataset: </g2/dset1> and </g2/dset2> -------------------------------- Some objects are not comparable -------------------------------- diff --git a/tools/h5diff/testfiles/h5diff_201.txt b/tools/h5diff/testfiles/h5diff_201.txt index 84d6766..da916ea 100644 --- a/tools/h5diff/testfiles/h5diff_201.txt +++ b/tools/h5diff/testfiles/h5diff_201.txt @@ -1 +1,2 @@ +dataset: </g2/dset1> and </g2/dset2> Not comparable: </g2/dset1> or </g2/dset2> is an empty dataset diff --git a/tools/h5diff/testfiles/h5diff_202.txt b/tools/h5diff/testfiles/h5diff_202.txt index fd4a191..8e3c7ac 100644 --- a/tools/h5diff/testfiles/h5diff_202.txt +++ b/tools/h5diff/testfiles/h5diff_202.txt @@ -1,2 +1,3 @@ +dataset: </g2/dset2> and </g2/dset3> Not comparable: </g2/dset2> is of class H5T_FLOAT and </g2/dset3> is of class H5T_INTEGER Not comparable: </g2/dset2> has sign H5T_SGN_ERROR and </g2/dset3> has sign H5T_SGN_2 diff --git a/tools/h5diff/testfiles/h5diff_203.txt b/tools/h5diff/testfiles/h5diff_203.txt index 496523c..90294e3 100644 --- a/tools/h5diff/testfiles/h5diff_203.txt +++ b/tools/h5diff/testfiles/h5diff_203.txt @@ -1,2 +1,3 @@ +dataset: </g2/dset3> and </g2/dset4> Not comparable: </g2/dset3> has rank 1, dimensions [6], max dimensions [6] and </g2/dset4> 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 098a203..a94091d 100644 --- a/tools/h5diff/testfiles/h5diff_204.txt +++ b/tools/h5diff/testfiles/h5diff_204.txt @@ -1,2 +1,3 @@ +dataset: </g2/dset4> and </g2/dset5> Not comparable: </g2/dset4> has rank 2, dimensions [3x2], max dimensions [3x2] and </g2/dset5> 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 3e2d1f2..c3708cb 100644 --- a/tools/h5diff/testfiles/h5diff_205.txt +++ b/tools/h5diff/testfiles/h5diff_205.txt @@ -1,3 +1,4 @@ +dataset: </g2/dset5> and </g2/dset6> Not comparable: </g2/dset5> has rank 2, dimensions [2x2], max dimensions [2x2] and </g2/dset6> has rank 2, dimensions [3x2], max dimensions [3x2] Not comparable: </g2/dset5> has sign H5T_SGN_2 and </g2/dset6> has sign H5T_SGN_NONE diff --git a/tools/h5diff/testfiles/h5diff_206.txt b/tools/h5diff/testfiles/h5diff_206.txt index 164aed9..3557b1e 100644 --- a/tools/h5diff/testfiles/h5diff_206.txt +++ b/tools/h5diff/testfiles/h5diff_206.txt @@ -1 +1,2 @@ +dataset: </g2/dset7> and </g2/dset8> Not comparable: </g2/dset7> has a class H5T_FLOAT and </g2/dset8> has a class H5T_INTEGER diff --git a/tools/h5diff/testfiles/h5diff_207.txt b/tools/h5diff/testfiles/h5diff_207.txt index bb8e23f..4dfcbb7 100644 --- a/tools/h5diff/testfiles/h5diff_207.txt +++ b/tools/h5diff/testfiles/h5diff_207.txt @@ -1,2 +1,3 @@ +dataset: </g2/dset8> and </g2/dset9> Not comparable: </g2/dset8> or </g2/dset9> is an empty dataset Not comparable: </g2/dset8> has 2 members </g2/dset9> has 1 members diff --git a/tools/h5diff/testfiles/h5diff_609.txt b/tools/h5diff/testfiles/h5diff_609.txt index e69de29..9369dd9 100644 --- a/tools/h5diff/testfiles/h5diff_609.txt +++ b/tools/h5diff/testfiles/h5diff_609.txt @@ -0,0 +1,2 @@ +dataset: </g1/dset3> and </g1/dset4> +0 differences found diff --git a/tools/h5diff/testfiles/h5diff_618.txt b/tools/h5diff/testfiles/h5diff_618.txt index e69de29..9369dd9 100644 --- a/tools/h5diff/testfiles/h5diff_618.txt +++ b/tools/h5diff/testfiles/h5diff_618.txt @@ -0,0 +1,2 @@ +dataset: </g1/dset3> and </g1/dset4> +0 differences found diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 5a4e2f2..7d11f2f 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -916,45 +916,27 @@ hsize_t diff(hid_t file1_id, *------------------------------------------------------------------------- */ case H5TRAV_TYPE_DATASET: - /*------------------------------------------------------------------------- - * verbose, always print name - *------------------------------------------------------------------------- - */ - if(options->m_verbose) + /* verbose (-v) and report (-r) mode */ + if(options->m_verbose || options->m_report) { - if(print_objname(options, (hsize_t)1)) - do_print_objname("dataset", path1, path2); + do_print_objname("dataset", path1, path2); nfound = diff_dataset(file1_id, file2_id, path1, path2, options); print_found(nfound); - } /* end if */ - /*------------------------------------------------------------------------- - * non verbose, check first if we have differences by enabling quiet mode - * so that printing is off, and compare again if differences found, - * disabling quiet mode - *------------------------------------------------------------------------- - */ + } + /* quiet mode (-q), just count differences */ + else if(options->m_quiet) + { + nfound = diff_dataset(file1_id, file2_id, path1, path2, options); + } + /* the rest (-c, none, ...) */ else { - if(options->m_quiet == 0) - { - /* shut up temporarily */ - options->m_quiet = 1; - nfound = diff_dataset(file1_id, file2_id, path1, path2, options); - - /* print again */ - options->m_quiet = 0; - if(nfound) - { - if(print_objname(options,nfound)) - do_print_objname("dataset", path1, path2); - nfound = diff_dataset(file1_id, file2_id, path1, path2, options); - print_found(nfound); - } /* end if */ - } /* end if */ - /* in quiet mode, just count differences */ - else - nfound = diff_dataset(file1_id, file2_id, path1, path2, options); - } /* end 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_found(nfound); + } break; /*------------------------------------------------------------------------- diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index 69bd44c..73a7ee7 100644 --- a/tools/lib/h5diff_attr.c +++ b/tools/lib/h5diff_attr.c @@ -130,9 +130,9 @@ hsize_t diff_attr(hid_t loc1_id, goto error; - /*------------------------------------------------------------------------- + /*---------------------------------------------------------------------- * check for comparable TYPE and SPACE - *------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ if ( msize1 != msize2 @@ -175,9 +175,9 @@ hsize_t diff_attr(hid_t loc1_id, } - /*------------------------------------------------------------------------- + /*--------------------------------------------------------------------- * read - *------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ nelmts1=1; for (j=0; j<rank1; j++) @@ -198,13 +198,14 @@ hsize_t diff_attr(hid_t loc1_id, sprintf(np1,"%s of <%s>",name1,path1); sprintf(np2,"%s of <%s>",name2,path2); - /*------------------------------------------------------------------------- + /*--------------------------------------------------------------------- * array compare - *------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ /* always print name */ - if (options->m_verbose) + /* verbose (-v) and report (-r) mode */ + if(options->m_verbose || options->m_report) { do_print_objname ("attribute", np1, np2); nfound = diff_array(buf1, @@ -222,67 +223,48 @@ hsize_t diff_attr(hid_t loc1_id, print_found(nfound); } - /* check first if we have differences */ + /* quiet mode (-q), just count differences */ + else if(options->m_quiet) + { + nfound = diff_array(buf1, + buf2, + nelmts1, + (hsize_t)0, + rank1, + dims1, + options, + np1, + np2, + mtype1_id, + attr1_id, + attr2_id); + } + /* the rest (-c, none, ...) */ else { - if (options->m_quiet==0) - { - /* shut up temporarily */ - options->m_quiet=1; - nfound = diff_array(buf1, - buf2, - nelmts1, - (hsize_t)0, - rank1, - dims1, - options, - np1, - np2, - mtype1_id, - attr1_id, - attr2_id); - /* print again */ - options->m_quiet=0; - if (nfound) - { - do_print_objname ("attribute", np1, np2); - nfound = diff_array(buf1, - buf2, - nelmts1, - (hsize_t)0, - rank1, - dims1, - options, - np1, - np2, - mtype1_id, - attr1_id, - attr2_id); + do_print_objname ("attribute", np1, np2); + nfound = diff_array(buf1, + buf2, + nelmts1, + (hsize_t)0, + rank1, + dims1, + options, + np1, + np2, + mtype1_id, + attr1_id, + attr2_id); + + /* not comparable, no display the different number */ + if (!options->not_cmp) print_found(nfound); - } /*if*/ - } /*if*/ - /* in quiet mode, just count differences */ - else - { - nfound = diff_array(buf1, - buf2, - nelmts1, - (hsize_t)0, - rank1, - dims1, - options, - np1, - np2, - mtype1_id, - attr1_id, - attr2_id); - } /*else quiet */ - } /*else verbose */ - - - /*------------------------------------------------------------------------- + } + + + /*---------------------------------------------------------------------- * close - *------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ if (H5Tclose(ftype1_id)<0) diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c index c79a5b6..27e9741 100644 --- a/tools/misc/h5debug.c +++ b/tools/misc/h5debug.c @@ -87,19 +87,19 @@ get_H5B2_class(const uint8_t *sig) break; case H5B2_FHEAP_HUGE_INDIR_ID: - cls = H5HF_BT2_INDIR; + cls = H5HF_HUGE_BT2_INDIR; break; case H5B2_FHEAP_HUGE_FILT_INDIR_ID: - cls = H5HF_BT2_FILT_INDIR; + cls = H5HF_HUGE_BT2_FILT_INDIR; break; case H5B2_FHEAP_HUGE_DIR_ID: - cls = H5HF_BT2_DIR; + cls = H5HF_HUGE_BT2_DIR; break; case H5B2_FHEAP_HUGE_FILT_DIR_ID: - cls = H5HF_BT2_FILT_DIR; + cls = H5HF_HUGE_BT2_FILT_DIR; break; case H5B2_GRP_DENSE_NAME_ID: |