diff options
-rw-r--r-- | tools/h5diff/h5diff_common.c | 16 | ||||
-rw-r--r-- | tools/h5diff/h5diff_main.c | 6 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_10.txt | 8 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_600.txt | 8 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_603.txt | 8 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_604.txt | 8 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_605.txt | 8 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_606.txt | 8 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_612.txt | 8 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_613.txt | 8 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_614.txt | 8 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_615.txt | 8 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_621.txt | 8 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_622.txt | 8 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_623.txt | 8 | ||||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_624.txt | 8 | ||||
-rwxr-xr-x | tools/h5diff/testh5diff.sh | 4 | ||||
-rwxr-xr-x | tools/h5repack/h5repack.sh.in | 4 | ||||
-rw-r--r-- | tools/h5repack/h5repacktst.c | 3 | ||||
-rw-r--r-- | tools/lib/h5diff.c | 32 | ||||
-rw-r--r-- | tools/lib/h5diff.h | 1 |
21 files changed, 53 insertions, 125 deletions
diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c index fc073a9..eda96ae 100644 --- a/tools/h5diff/h5diff_common.c +++ b/tools/h5diff/h5diff_common.c @@ -31,7 +31,7 @@ const char *progname = "h5diff"; * Command-line options: The user can specify short or long-named * parameters. */ -static const char *s_opts = "hVrvqn:d:p:c"; +static const char *s_opts = "hVrvqn:d:p:"; static struct long_options l_opts[] = { { "help", no_arg, 'h' }, { "version", no_arg, 'V' }, @@ -41,7 +41,6 @@ static struct long_options l_opts[] = { { "count", require_arg, 'n' }, { "delta", require_arg, 'd' }, { "relative", require_arg, 'p' }, - { "contents", no_arg, 'c' }, { NULL, 0, '\0' } }; @@ -92,9 +91,6 @@ void parse_command_line(int argc, case 'r': options->m_report = 1; break; - case 'c': - options->m_contents = 1; - break; case 'd': options->d=1; @@ -174,7 +170,7 @@ void parse_command_line(int argc, void print_info(diff_opt_t* options) { - if (options->m_quiet || options->err_stat || options->m_contents) + if (options->m_quiet || options->err_stat ) return; if (options->cmn_objs==0) @@ -323,7 +319,6 @@ void usage(void) printf(" -r, --report Report mode. Print differences\n"); printf(" -v, --verbose Verbose mode. Print differences, list of objects\n"); printf(" -q, --quiet Quiet mode. Do not do output\n"); - printf(" -c, --contents Contents mode. Objects in both files must match\n"); printf(" -n C, --count=C Print differences up to C number\n"); @@ -345,16 +340,13 @@ void usage(void) printf(" -r Report mode: print the above plus the differences\n"); printf(" -v Verbose mode: print the above plus a list of objects and warnings\n"); printf(" -q Quiet mode: do not print output\n"); - printf(" -c Contents mode: objects in both files must match\n"); printf("\n"); printf(" Compare criteria\n"); printf("\n"); printf(" If no objects [obj1[obj2]] are specified, h5diff only compares objects\n"); - printf(" with the same absolute path in both files. However,\n"); - printf(" when the -c flag is present, (contents mode) the objects in file1\n"); - printf(" must match exactly the objects in file2\n"); + printf(" with the same absolute path in both files\n"); printf("\n"); printf(" The compare criteria is:\n"); @@ -366,7 +358,7 @@ void usage(void) printf(" Return exit code:\n"); printf("\n"); - printf(" 1 if differences found, 0 if no differences, -1 if error\n"); + printf(" 1 if differences found, 0 if no differences, 2 if error\n"); printf("\n"); diff --git a/tools/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c index d0e095d..f79099e 100644 --- a/tools/h5diff/h5diff_main.c +++ b/tools/h5diff/h5diff_main.c @@ -90,17 +90,17 @@ int main(int argc, const char *argv[]) /*------------------------------------------------------------------------- * exit code - * 1 if differences, 0 if no differences, -1 if error + * 1 if differences, 0 if no differences, 2 if error *------------------------------------------------------------------------- */ ret = (nfound == 0 ? 0 : 1 ); - if ( options.m_contents && options.contents == 0 ) + if ( options.contents == 0 ) ret = 1; if(options.err_stat) - ret = -1; + ret = 2; return ret; } diff --git a/tools/h5diff/testfiles/h5diff_10.txt b/tools/h5diff/testfiles/h5diff_10.txt index 8877a75..a74a37c 100644 --- a/tools/h5diff/testfiles/h5diff_10.txt +++ b/tools/h5diff/testfiles/h5diff_10.txt @@ -9,7 +9,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r, --report Report mode. Print differences -v, --verbose Verbose mode. Print differences, list of objects -q, --quiet Quiet mode. Do not do output - -c, --contents Contents mode. Objects in both files must match -n C, --count=C Print differences up to C number -d D, --delta=D Print difference when greater than limit D -p R, --relative=R Print difference when greater than relative limit R @@ -24,14 +23,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output - -c Contents mode: objects in both files must match Compare criteria If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files. However, - when the -c flag is present, (contents mode) the objects in file1 - must match exactly the objects in file2 + with the same absolute path in both files The compare criteria is: 1) datasets: numerical array differences 2) groups: name string difference @@ -40,7 +36,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] Return exit code: - 1 if differences found, 0 if no differences, -1 if error + 1 if differences found, 0 if no differences, 2 if error Examples of use: diff --git a/tools/h5diff/testfiles/h5diff_600.txt b/tools/h5diff/testfiles/h5diff_600.txt index 3697279..dcf14f7 100644 --- a/tools/h5diff/testfiles/h5diff_600.txt +++ b/tools/h5diff/testfiles/h5diff_600.txt @@ -9,7 +9,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r, --report Report mode. Print differences -v, --verbose Verbose mode. Print differences, list of objects -q, --quiet Quiet mode. Do not do output - -c, --contents Contents mode. Objects in both files must match -n C, --count=C Print differences up to C number -d D, --delta=D Print difference when greater than limit D -p R, --relative=R Print difference when greater than relative limit R @@ -24,14 +23,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output - -c Contents mode: objects in both files must match Compare criteria If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files. However, - when the -c flag is present, (contents mode) the objects in file1 - must match exactly the objects in file2 + with the same absolute path in both files The compare criteria is: 1) datasets: numerical array differences 2) groups: name string difference @@ -40,7 +36,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] Return exit code: - 1 if differences found, 0 if no differences, -1 if error + 1 if differences found, 0 if no differences, 2 if error Examples of use: diff --git a/tools/h5diff/testfiles/h5diff_603.txt b/tools/h5diff/testfiles/h5diff_603.txt index a2f07f2..e274d88 100644 --- a/tools/h5diff/testfiles/h5diff_603.txt +++ b/tools/h5diff/testfiles/h5diff_603.txt @@ -10,7 +10,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r, --report Report mode. Print differences -v, --verbose Verbose mode. Print differences, list of objects -q, --quiet Quiet mode. Do not do output - -c, --contents Contents mode. Objects in both files must match -n C, --count=C Print differences up to C number -d D, --delta=D Print difference when greater than limit D -p R, --relative=R Print difference when greater than relative limit R @@ -25,14 +24,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output - -c Contents mode: objects in both files must match Compare criteria If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files. However, - when the -c flag is present, (contents mode) the objects in file1 - must match exactly the objects in file2 + with the same absolute path in both files The compare criteria is: 1) datasets: numerical array differences 2) groups: name string difference @@ -41,7 +37,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] Return exit code: - 1 if differences found, 0 if no differences, -1 if error + 1 if differences found, 0 if no differences, 2 if error Examples of use: diff --git a/tools/h5diff/testfiles/h5diff_604.txt b/tools/h5diff/testfiles/h5diff_604.txt index 90d9bdb..8232c38 100644 --- a/tools/h5diff/testfiles/h5diff_604.txt +++ b/tools/h5diff/testfiles/h5diff_604.txt @@ -10,7 +10,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r, --report Report mode. Print differences -v, --verbose Verbose mode. Print differences, list of objects -q, --quiet Quiet mode. Do not do output - -c, --contents Contents mode. Objects in both files must match -n C, --count=C Print differences up to C number -d D, --delta=D Print difference when greater than limit D -p R, --relative=R Print difference when greater than relative limit R @@ -25,14 +24,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output - -c Contents mode: objects in both files must match Compare criteria If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files. However, - when the -c flag is present, (contents mode) the objects in file1 - must match exactly the objects in file2 + with the same absolute path in both files The compare criteria is: 1) datasets: numerical array differences 2) groups: name string difference @@ -41,7 +37,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] Return exit code: - 1 if differences found, 0 if no differences, -1 if error + 1 if differences found, 0 if no differences, 2 if error Examples of use: diff --git a/tools/h5diff/testfiles/h5diff_605.txt b/tools/h5diff/testfiles/h5diff_605.txt index 9e45341..bce2118 100644 --- a/tools/h5diff/testfiles/h5diff_605.txt +++ b/tools/h5diff/testfiles/h5diff_605.txt @@ -10,7 +10,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r, --report Report mode. Print differences -v, --verbose Verbose mode. Print differences, list of objects -q, --quiet Quiet mode. Do not do output - -c, --contents Contents mode. Objects in both files must match -n C, --count=C Print differences up to C number -d D, --delta=D Print difference when greater than limit D -p R, --relative=R Print difference when greater than relative limit R @@ -25,14 +24,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output - -c Contents mode: objects in both files must match Compare criteria If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files. However, - when the -c flag is present, (contents mode) the objects in file1 - must match exactly the objects in file2 + with the same absolute path in both files The compare criteria is: 1) datasets: numerical array differences 2) groups: name string difference @@ -41,7 +37,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] Return exit code: - 1 if differences found, 0 if no differences, -1 if error + 1 if differences found, 0 if no differences, 2 if error Examples of use: diff --git a/tools/h5diff/testfiles/h5diff_606.txt b/tools/h5diff/testfiles/h5diff_606.txt index 31053d5..9a0a8cd 100644 --- a/tools/h5diff/testfiles/h5diff_606.txt +++ b/tools/h5diff/testfiles/h5diff_606.txt @@ -10,7 +10,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r, --report Report mode. Print differences -v, --verbose Verbose mode. Print differences, list of objects -q, --quiet Quiet mode. Do not do output - -c, --contents Contents mode. Objects in both files must match -n C, --count=C Print differences up to C number -d D, --delta=D Print difference when greater than limit D -p R, --relative=R Print difference when greater than relative limit R @@ -25,14 +24,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output - -c Contents mode: objects in both files must match Compare criteria If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files. However, - when the -c flag is present, (contents mode) the objects in file1 - must match exactly the objects in file2 + with the same absolute path in both files The compare criteria is: 1) datasets: numerical array differences 2) groups: name string difference @@ -41,7 +37,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] Return exit code: - 1 if differences found, 0 if no differences, -1 if error + 1 if differences found, 0 if no differences, 2 if error Examples of use: diff --git a/tools/h5diff/testfiles/h5diff_612.txt b/tools/h5diff/testfiles/h5diff_612.txt index 0a05b7f..16baa7c 100644 --- a/tools/h5diff/testfiles/h5diff_612.txt +++ b/tools/h5diff/testfiles/h5diff_612.txt @@ -10,7 +10,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r, --report Report mode. Print differences -v, --verbose Verbose mode. Print differences, list of objects -q, --quiet Quiet mode. Do not do output - -c, --contents Contents mode. Objects in both files must match -n C, --count=C Print differences up to C number -d D, --delta=D Print difference when greater than limit D -p R, --relative=R Print difference when greater than relative limit R @@ -25,14 +24,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output - -c Contents mode: objects in both files must match Compare criteria If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files. However, - when the -c flag is present, (contents mode) the objects in file1 - must match exactly the objects in file2 + with the same absolute path in both files The compare criteria is: 1) datasets: numerical array differences 2) groups: name string difference @@ -41,7 +37,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] Return exit code: - 1 if differences found, 0 if no differences, -1 if error + 1 if differences found, 0 if no differences, 2 if error Examples of use: diff --git a/tools/h5diff/testfiles/h5diff_613.txt b/tools/h5diff/testfiles/h5diff_613.txt index 155d7f6..e57c320 100644 --- a/tools/h5diff/testfiles/h5diff_613.txt +++ b/tools/h5diff/testfiles/h5diff_613.txt @@ -10,7 +10,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r, --report Report mode. Print differences -v, --verbose Verbose mode. Print differences, list of objects -q, --quiet Quiet mode. Do not do output - -c, --contents Contents mode. Objects in both files must match -n C, --count=C Print differences up to C number -d D, --delta=D Print difference when greater than limit D -p R, --relative=R Print difference when greater than relative limit R @@ -25,14 +24,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output - -c Contents mode: objects in both files must match Compare criteria If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files. However, - when the -c flag is present, (contents mode) the objects in file1 - must match exactly the objects in file2 + with the same absolute path in both files The compare criteria is: 1) datasets: numerical array differences 2) groups: name string difference @@ -41,7 +37,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] Return exit code: - 1 if differences found, 0 if no differences, -1 if error + 1 if differences found, 0 if no differences, 2 if error Examples of use: diff --git a/tools/h5diff/testfiles/h5diff_614.txt b/tools/h5diff/testfiles/h5diff_614.txt index fac1c6a..828d250 100644 --- a/tools/h5diff/testfiles/h5diff_614.txt +++ b/tools/h5diff/testfiles/h5diff_614.txt @@ -10,7 +10,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r, --report Report mode. Print differences -v, --verbose Verbose mode. Print differences, list of objects -q, --quiet Quiet mode. Do not do output - -c, --contents Contents mode. Objects in both files must match -n C, --count=C Print differences up to C number -d D, --delta=D Print difference when greater than limit D -p R, --relative=R Print difference when greater than relative limit R @@ -25,14 +24,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output - -c Contents mode: objects in both files must match Compare criteria If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files. However, - when the -c flag is present, (contents mode) the objects in file1 - must match exactly the objects in file2 + with the same absolute path in both files The compare criteria is: 1) datasets: numerical array differences 2) groups: name string difference @@ -41,7 +37,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] Return exit code: - 1 if differences found, 0 if no differences, -1 if error + 1 if differences found, 0 if no differences, 2 if error Examples of use: diff --git a/tools/h5diff/testfiles/h5diff_615.txt b/tools/h5diff/testfiles/h5diff_615.txt index f40ac2a..654a743 100644 --- a/tools/h5diff/testfiles/h5diff_615.txt +++ b/tools/h5diff/testfiles/h5diff_615.txt @@ -10,7 +10,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r, --report Report mode. Print differences -v, --verbose Verbose mode. Print differences, list of objects -q, --quiet Quiet mode. Do not do output - -c, --contents Contents mode. Objects in both files must match -n C, --count=C Print differences up to C number -d D, --delta=D Print difference when greater than limit D -p R, --relative=R Print difference when greater than relative limit R @@ -25,14 +24,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output - -c Contents mode: objects in both files must match Compare criteria If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files. However, - when the -c flag is present, (contents mode) the objects in file1 - must match exactly the objects in file2 + with the same absolute path in both files The compare criteria is: 1) datasets: numerical array differences 2) groups: name string difference @@ -41,7 +37,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] Return exit code: - 1 if differences found, 0 if no differences, -1 if error + 1 if differences found, 0 if no differences, 2 if error Examples of use: diff --git a/tools/h5diff/testfiles/h5diff_621.txt b/tools/h5diff/testfiles/h5diff_621.txt index 93f1714..18acda6 100644 --- a/tools/h5diff/testfiles/h5diff_621.txt +++ b/tools/h5diff/testfiles/h5diff_621.txt @@ -10,7 +10,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r, --report Report mode. Print differences -v, --verbose Verbose mode. Print differences, list of objects -q, --quiet Quiet mode. Do not do output - -c, --contents Contents mode. Objects in both files must match -n C, --count=C Print differences up to C number -d D, --delta=D Print difference when greater than limit D -p R, --relative=R Print difference when greater than relative limit R @@ -25,14 +24,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output - -c Contents mode: objects in both files must match Compare criteria If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files. However, - when the -c flag is present, (contents mode) the objects in file1 - must match exactly the objects in file2 + with the same absolute path in both files The compare criteria is: 1) datasets: numerical array differences 2) groups: name string difference @@ -41,7 +37,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] Return exit code: - 1 if differences found, 0 if no differences, -1 if error + 1 if differences found, 0 if no differences, 2 if error Examples of use: diff --git a/tools/h5diff/testfiles/h5diff_622.txt b/tools/h5diff/testfiles/h5diff_622.txt index 0cdc67c..7740b0a 100644 --- a/tools/h5diff/testfiles/h5diff_622.txt +++ b/tools/h5diff/testfiles/h5diff_622.txt @@ -10,7 +10,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r, --report Report mode. Print differences -v, --verbose Verbose mode. Print differences, list of objects -q, --quiet Quiet mode. Do not do output - -c, --contents Contents mode. Objects in both files must match -n C, --count=C Print differences up to C number -d D, --delta=D Print difference when greater than limit D -p R, --relative=R Print difference when greater than relative limit R @@ -25,14 +24,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output - -c Contents mode: objects in both files must match Compare criteria If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files. However, - when the -c flag is present, (contents mode) the objects in file1 - must match exactly the objects in file2 + with the same absolute path in both files The compare criteria is: 1) datasets: numerical array differences 2) groups: name string difference @@ -41,7 +37,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] Return exit code: - 1 if differences found, 0 if no differences, -1 if error + 1 if differences found, 0 if no differences, 2 if error Examples of use: diff --git a/tools/h5diff/testfiles/h5diff_623.txt b/tools/h5diff/testfiles/h5diff_623.txt index b821511..e238a6b 100644 --- a/tools/h5diff/testfiles/h5diff_623.txt +++ b/tools/h5diff/testfiles/h5diff_623.txt @@ -10,7 +10,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r, --report Report mode. Print differences -v, --verbose Verbose mode. Print differences, list of objects -q, --quiet Quiet mode. Do not do output - -c, --contents Contents mode. Objects in both files must match -n C, --count=C Print differences up to C number -d D, --delta=D Print difference when greater than limit D -p R, --relative=R Print difference when greater than relative limit R @@ -25,14 +24,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output - -c Contents mode: objects in both files must match Compare criteria If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files. However, - when the -c flag is present, (contents mode) the objects in file1 - must match exactly the objects in file2 + with the same absolute path in both files The compare criteria is: 1) datasets: numerical array differences 2) groups: name string difference @@ -41,7 +37,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] Return exit code: - 1 if differences found, 0 if no differences, -1 if error + 1 if differences found, 0 if no differences, 2 if error Examples of use: diff --git a/tools/h5diff/testfiles/h5diff_624.txt b/tools/h5diff/testfiles/h5diff_624.txt index d9ce5e6..7100555 100644 --- a/tools/h5diff/testfiles/h5diff_624.txt +++ b/tools/h5diff/testfiles/h5diff_624.txt @@ -10,7 +10,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r, --report Report mode. Print differences -v, --verbose Verbose mode. Print differences, list of objects -q, --quiet Quiet mode. Do not do output - -c, --contents Contents mode. Objects in both files must match -n C, --count=C Print differences up to C number -d D, --delta=D Print difference when greater than limit D -p R, --relative=R Print difference when greater than relative limit R @@ -25,14 +24,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] -r Report mode: print the above plus the differences -v Verbose mode: print the above plus a list of objects and warnings -q Quiet mode: do not print output - -c Contents mode: objects in both files must match Compare criteria If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files. However, - when the -c flag is present, (contents mode) the objects in file1 - must match exactly the objects in file2 + with the same absolute path in both files The compare criteria is: 1) datasets: numerical array differences 2) groups: name string difference @@ -41,7 +37,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] Return exit code: - 1 if differences found, 0 if no differences, -1 if error + 1 if differences found, 0 if no differences, 2 if error Examples of use: diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh index e541a7c..2089321 100755 --- a/tools/h5diff/testh5diff.sh +++ b/tools/h5diff/testh5diff.sh @@ -329,9 +329,7 @@ TOOLTEST h5diff_17.txt -v $FILE1 $FILE2 TESTING $H5DIFF -q $SRCFILE1 $SRCFILE2 TOOLTEST h5diff_18.txt -q $FILE1 $FILE2 -# 1.9 contents mode -TESTING $H5DIFF -v -c $SRCFILE1 $SRCFILE11 -TOOLTEST h5diff_19.txt -v -c $FILE1 $FILE11 + # ############################################################################## # # not comparable types diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index 72e4414..422c8dd 100755 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -93,9 +93,9 @@ DIFFTEST() { VERIFY $@ if [ "`uname -s`" = "TFLOPS O/S" ]; then - $RUNSERIAL $H5DIFF_BIN -q -c $@ + $RUNSERIAL $H5DIFF_BIN -q $@ else - $RUNSERIAL $H5DIFF_BIN -q -c "$@" + $RUNSERIAL $H5DIFF_BIN -q "$@" fi RET=$? if [ $RET != 0 ] ; then diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c index c74866a..d10bc25 100644 --- a/tools/h5repack/h5repacktst.c +++ b/tools/h5repack/h5repacktst.c @@ -156,9 +156,6 @@ int main (void) memset(&diff_options, 0, sizeof (diff_opt_t)); memset(&pack_options, 0, sizeof (pack_opt_t)); - /* set h5diff "contents" mode */ - diff_options.m_contents = 1; - /* run tests */ puts("Testing h5repack:"); diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index f0c6048..df479de 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -450,33 +450,31 @@ hsize_t diff_match(hid_t file1_id, /*------------------------------------------------------------------------- - * contents mode. we do an "absolute" compare criteria, the number of objects + * the number of objects * in file1 must be the same as in file2 *------------------------------------------------------------------------- */ - if ( options->m_contents ) + + /* assume equal contents initially */ + options->contents = 1; + + /* number of different objects */ + if ( info1->nused != info2->nused ) { - /* assume equal contents initially */ - options->contents = 1; - - /* number of different objects */ - if ( info1->nused != info2->nused ) + options->contents = 0; + } + + + for( i = 0; i < table->nobjs; i++) + { + if( table->objs[i].flags[0] != table->objs[i].flags[1] ) { options->contents = 0; } - - - for( i = 0; i < table->nobjs; i++) - { - if( table->objs[i].flags[0] != table->objs[i].flags[1] ) - { - options->contents = 0; - } - } - } + /*------------------------------------------------------------------------- * do the diff for common objects *------------------------------------------------------------------------- diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h index 4b1a892..c013ba5 100644 --- a/tools/lib/h5diff.h +++ b/tools/lib/h5diff.h @@ -37,7 +37,6 @@ typedef struct { int err_stat; /* an error ocurred (1, error, 0, no error) */ int cmn_objs; /* do we have comparable objects */ int not_cmp; /* are the objects comparable */ - int m_contents;/* contents mode */ int contents; /* equal contents */ } diff_opt_t; |