summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-05-16 19:54:53 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-05-16 19:54:53 (GMT)
commit858155c19b1d2cacb91e37da0155a537ddd205e6 (patch)
tree9997886b79e9ea6cd986c8a56cc8fa38cd9fa8ba
parent3e1a06e6494c9dd9a6f4b39e702949159e803283 (diff)
parent71637634ac96b6167b384ebb461ce3b9ea66b4f8 (diff)
downloadhdf5-858155c19b1d2cacb91e37da0155a537ddd205e6.zip
hdf5-858155c19b1d2cacb91e37da0155a537ddd205e6.tar.gz
hdf5-858155c19b1d2cacb91e37da0155a537ddd205e6.tar.bz2
Merge pull request #519 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '71637634ac96b6167b384ebb461ce3b9ea66b4f8': HDFFV-9995 Clarify help text HDFFV-10128 Fixed string length with no null fixed
-rw-r--r--tools/lib/h5diff_array.c9
-rw-r--r--tools/src/h5diff/h5diff_common.c45
-rw-r--r--tools/test/h5diff/CMakeTests.cmake2
-rw-r--r--tools/test/h5diff/testfiles/h5diff_10.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_600.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_603.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_606.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_612.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_615.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_621.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_622.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_623.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_624.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_tmp1.txt14
14 files changed, 153 insertions, 127 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 0a9d18a..499d5eb 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -665,6 +665,7 @@ static hsize_t diff_datum(void *_mem1,
size_t size1;
size_t size2;
size_t sizex;
+ size_t size_mtype = H5Tget_size(m_type);
H5T_str_t pad = H5Tget_strpad(m_type);
/* if variable length string */
@@ -682,17 +683,21 @@ static hsize_t diff_datum(void *_mem1,
/* Get pointer to first string */
s1 = (char*) mem1;
size1 = HDstrlen(s1);
+ if (size1 > size_mtype)
+ size1 = size_mtype;
/* Get pointer to second string */
s2 = (char*) mem2;
size2 = HDstrlen(s2);
+ if (size2 > size_mtype)
+ size2 = size_mtype;
}
else {
/* Get pointer to first string */
s1 = (char *)mem1;
- size1 = H5Tget_size(m_type);
+ size1 = size_mtype;
/* Get pointer to second string */
s2 = (char *)mem2;
- size2 = H5Tget_size(m_type);
+ size2 = size_mtype;
}
/*
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index 5437803..0537b9f 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -56,7 +56,7 @@ static struct long_options l_opts[] = {
static void check_options(diff_opt_t* options)
{
/*--------------------------------------------------------------
- * check for mutually exclusive options
+ * check for mutually exclusive options
*--------------------------------------------------------------*/
/* check between -d , -p, --use-system-epsilon.
@@ -127,13 +127,13 @@ void parse_command_line(int argc,
h5diff_exit(EXIT_SUCCESS);
case 'v':
options->m_verbose = 1;
- /* This for loop is for handling style like
+ /* This for loop is for handling style like
* -v, -v1, --verbose, --verbose=1.
*/
for (i = 1; i < argc; i++)
- {
- /*
- * short opt
+ {
+ /*
+ * short opt
*/
if (!strcmp (argv[i], "-v")) /* no arg */
{
@@ -145,10 +145,10 @@ void parse_command_line(int argc,
{
options->m_verbose_level = atoi(&argv[i][2]);
break;
- }
+ }
- /*
- * long opt
+ /*
+ * long opt
*/
if (!strcmp (argv[i], "--verbose")) /* no arg */
{
@@ -177,7 +177,7 @@ void parse_command_line(int argc,
break;
case 'E':
options->exclude_path = 1;
-
+
/* create linked list of excluding objects */
if( (exclude_node = (struct exclude_path_list*) HDmalloc(sizeof(struct exclude_path_list))) == NULL)
{
@@ -189,8 +189,8 @@ void parse_command_line(int argc,
exclude_node->obj_path = (char*)opt_arg;
exclude_node->obj_type = H5TRAV_TYPE_UNKNOWN;
exclude_prev = exclude_head;
-
- if (NULL == exclude_head)
+
+ if (NULL == exclude_head)
{
exclude_head = exclude_node;
exclude_head->next = NULL;
@@ -202,7 +202,7 @@ void parse_command_line(int argc,
exclude_node->next = NULL;
exclude_prev->next = exclude_node;
- }
+ }
break;
case 'd':
options->d=1;
@@ -458,7 +458,7 @@ check_d_input( const char *str )
void usage(void)
{
- printf("usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] \n");
+ printf("usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]\n");
printf(" file1 File name of the first HDF5 file\n");
printf(" file2 File name of the second HDF5 file\n");
printf(" [obj1] Name of an HDF5 object, in absolute path\n");
@@ -519,19 +519,22 @@ void usage(void)
printf(" -n C, --count=C\n");
printf(" Print differences up to C. C must be a positive integer.\n");
printf(" -d D, --delta=D\n");
- printf(" Print difference if (|a-b| > D). D must be a positive number.\n");
+ printf(" Print difference if (|a-b| > D). D must be a positive number. Where a\n");
+ printf(" is the data point value in file1 and b is the data point value in file2.\n");
printf(" Can not use with '-p' or '--use-system-epsilon'.\n");
printf(" -p R, --relative=R\n");
- printf(" Print difference if (|(a-b)/b| > R). R must be a positive number.\n");
+ printf(" Print difference if (|(a-b)/b| > R). R must be a positive number. Where a\n");
+ printf(" is the data point value in file1 and b is the data point value in file2.\n");
printf(" Can not use with '-d' or '--use-system-epsilon'.\n");
printf(" --use-system-epsilon\n");
- printf(" Print difference if (|a-b| > EPSILON), EPSILON is system defined value.\n");
+ printf(" Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a\n");
+ printf(" is the data point value in file1 and b is the data point value in file2.\n");
printf(" If the system epsilon is not defined,one of the following predefined\n");
printf(" values will be used:\n");
printf(" FLT_EPSILON = 1.19209E-07 for floating-point type\n");
printf(" DBL_EPSILON = 2.22045E-16 for double precision type\n");
printf(" Can not use with '-p' or '-d'.\n");
- printf(" --exclude-path \"path\" \n");
+ printf(" --exclude-path \"path\"\n");
printf(" Exclude the specified path to an object when comparing files or groups.\n");
printf(" If a group is excluded, all member objects will also be excluded.\n");
printf(" The specified path is excluded wherever it occurs.\n");
@@ -570,15 +573,15 @@ void usage(void)
printf("\n");
printf(" Object comparison:\n");
- printf(" 1) Groups \n");
+ printf(" 1) Groups\n");
printf(" First compares the names of member objects (relative path, from the\n");
printf(" specified group) and generates a report of objects that appear in only\n");
printf(" one group or in both groups. Common objects are then compared recursively.\n");
- printf(" 2) Datasets \n");
+ printf(" 2) Datasets\n");
printf(" Array rank and dimensions, datatypes, and data values are compared.\n");
- printf(" 3) Datatypes \n");
+ printf(" 3) Datatypes\n");
printf(" The comparison is based on the return value of H5Tequal.\n");
- printf(" 4) Symbolic links \n");
+ printf(" 4) Symbolic links\n");
printf(" The paths to the target objects are compared.\n");
printf(" (The option --follow-symlinks overrides the default behavior when\n");
printf(" symbolic links are compared.).\n");
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index 5759c2b..f6cd2dd 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -1130,7 +1130,7 @@ ADD_H5_TEST (h5diff_631 0 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp18 g1/f
# ##############################################################################
ADD_H5_TEST (h5diff_70 1 -v ${FILE5} ${FILE6})
# temporary test to verify HDF5-8625
-ADD_H5_TEST (h5diff_tmp1 1 tmptest2.he5 tmptest.he5)
+ADD_H5_TEST (h5diff_tmp1 0 tmptest2.he5 tmptest.he5)
# temporary test to verify HDF5-8639
ADD_H5_TEST (h5diff_tmp2 1 tmpSingleSiteBethe.output.h5 tmpSingleSiteBethe.reference.h5)
diff --git a/tools/test/h5diff/testfiles/h5diff_10.txt b/tools/test/h5diff/testfiles/h5diff_10.txt
index a699f00..0a0ee22 100644
--- a/tools/test/h5diff/testfiles/h5diff_10.txt
+++ b/tools/test/h5diff/testfiles/h5diff_10.txt
@@ -1,4 +1,4 @@
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -59,19 +59,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -106,15 +109,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_600.txt b/tools/test/h5diff/testfiles/h5diff_600.txt
index 3c3ad9f..4362711 100644
--- a/tools/test/h5diff/testfiles/h5diff_600.txt
+++ b/tools/test/h5diff/testfiles/h5diff_600.txt
@@ -1,4 +1,4 @@
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -59,19 +59,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -106,15 +109,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_603.txt b/tools/test/h5diff/testfiles/h5diff_603.txt
index 087764a..9ab3204 100644
--- a/tools/test/h5diff/testfiles/h5diff_603.txt
+++ b/tools/test/h5diff/testfiles/h5diff_603.txt
@@ -1,5 +1,5 @@
<-d -4> is not a valid option
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_606.txt b/tools/test/h5diff/testfiles/h5diff_606.txt
index c31a67e..afe0e72 100644
--- a/tools/test/h5diff/testfiles/h5diff_606.txt
+++ b/tools/test/h5diff/testfiles/h5diff_606.txt
@@ -1,5 +1,5 @@
<-d 0x1> is not a valid option
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_612.txt b/tools/test/h5diff/testfiles/h5diff_612.txt
index 05318bd..97a1747 100644
--- a/tools/test/h5diff/testfiles/h5diff_612.txt
+++ b/tools/test/h5diff/testfiles/h5diff_612.txt
@@ -1,5 +1,5 @@
<-p -4> is not a valid option
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_615.txt b/tools/test/h5diff/testfiles/h5diff_615.txt
index fd756b3..78770f0 100644
--- a/tools/test/h5diff/testfiles/h5diff_615.txt
+++ b/tools/test/h5diff/testfiles/h5diff_615.txt
@@ -1,5 +1,5 @@
<-p 0x1> is not a valid option
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_621.txt b/tools/test/h5diff/testfiles/h5diff_621.txt
index fd8c680..b2a5881 100644
--- a/tools/test/h5diff/testfiles/h5diff_621.txt
+++ b/tools/test/h5diff/testfiles/h5diff_621.txt
@@ -1,5 +1,5 @@
<-n -4> is not a valid option
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_622.txt b/tools/test/h5diff/testfiles/h5diff_622.txt
index f0d38af..66a3025 100644
--- a/tools/test/h5diff/testfiles/h5diff_622.txt
+++ b/tools/test/h5diff/testfiles/h5diff_622.txt
@@ -1,5 +1,5 @@
<-n 0> is not a valid option
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_623.txt b/tools/test/h5diff/testfiles/h5diff_623.txt
index 4ab66a5..f9258d1 100644
--- a/tools/test/h5diff/testfiles/h5diff_623.txt
+++ b/tools/test/h5diff/testfiles/h5diff_623.txt
@@ -1,5 +1,5 @@
<-n u> is not a valid option
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_624.txt b/tools/test/h5diff/testfiles/h5diff_624.txt
index f5e7ee3..57a4ddd 100644
--- a/tools/test/h5diff/testfiles/h5diff_624.txt
+++ b/tools/test/h5diff/testfiles/h5diff_624.txt
@@ -1,5 +1,5 @@
<-n 0x1> is not a valid option
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_tmp1.txt b/tools/test/h5diff/testfiles/h5diff_tmp1.txt
index e2bb247..40e3fb6 100644
--- a/tools/test/h5diff/testfiles/h5diff_tmp1.txt
+++ b/tools/test/h5diff/testfiles/h5diff_tmp1.txt
@@ -1,17 +1,5 @@
-attribute: <EndDate of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>> and <EndDate of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>>
-3 differences found
-attribute: <Set2eqSet1 of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>> and <Set2eqSet1 of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>>
-1 differences found
-attribute: <VersionID of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>> and <VersionID of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>>
-1 differences found
-attribute: <LongName of </HDFEOS/GRIDS/SET1/Data Fields/STv>> and <LongName of </HDFEOS/GRIDS/SET1/Data Fields/STv>>
-1 differences found
-attribute: <LongName of </HDFEOS/GRIDS/SET1/Data Fields/Tot_Precip_Water>> and <LongName of </HDFEOS/GRIDS/SET1/Data Fields/Tot_Precip_Water>>
-1 differences found
-attribute: <LongName of </HDFEOS/GRIDS/SET2/Data Fields/STv>> and <LongName of </HDFEOS/GRIDS/SET2/Data Fields/STv>>
-1 differences found
--------------------------------
Some objects are not comparable
--------------------------------
Use -c for a list of objects.
-EXIT CODE: 1
+EXIT CODE: 0