diff options
Diffstat (limited to 'tools/h5diff')
117 files changed, 2113 insertions, 557 deletions
diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c index 64b0097..75e1774 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:Ncl"; +static const char *s_opts = "hVrvqn:d:p:Nc"; static struct long_options l_opts[] = { { "help", no_arg, 'h' }, { "version", no_arg, 'V' }, @@ -44,7 +44,8 @@ static struct long_options l_opts[] = { { "nan", no_arg, 'N' }, { "compare", no_arg, 'c' }, { "use-system-epsilon", no_arg, 'e' }, - { "link-follow", no_arg, 'l' }, + { "follow-links", no_arg, 'l' }, + { "no-dangling-links", no_arg, 'x' }, { NULL, 0, '\0' } }; @@ -102,7 +103,10 @@ void parse_command_line(int argc, options->m_report = 1; break; case 'l': - options->linkfollow = 1; + options->follow_links = 1; + break; + case 'x': + options->no_dangle_links = 1; break; case 'd': options->d=1; @@ -114,7 +118,7 @@ void parse_command_line(int argc, h5diff_exit(EXIT_FAILURE); } options->delta = atof( opt_arg ); - + /* -d 0 is the same as default */ if (options->delta == 0) options->d=0; @@ -227,8 +231,8 @@ void parse_command_line(int argc, printf("--------------------------------\n"); printf("Use -c for a list of objects.\n"); } - - + + } } @@ -356,33 +360,68 @@ void usage(void) printf(" file2 File name of the second HDF5 file\n"); printf(" [obj1] Name of an HDF5 object, in absolute path\n"); printf(" [obj2] Name of an HDF5 object, in absolute path\n"); - + printf("\n"); printf(" OPTIONS\n"); - - printf(" -h, --help Print a usage message and exit\n"); - printf(" -V, --version Print version number and exit\n"); - 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(" -l, --link-follow Follow link(s)\n"); + printf(" -h, --help Print a usage message and exit.\n"); + printf(" -V, --version Print version number and exit.\n"); + 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 produce output.\n"); + printf(" --follow-links Follow symbolic links (soft links and external links)\n"); + printf(" and compare the links' target objects.\n"); + printf(" If symbolic link(s) with the same name exist in the\n"); + printf(" files being compared, then determine whether the \n"); + printf(" target of each link is an existing object (dataset,\n"); + printf(" group, or named datatype) or the link is a dangling\n"); + printf(" link (a soft or external link pointing to a target\n"); + printf(" object that does not yet exist).\n"); + printf(" - If both symbolic links are dangling links, they\n"); + printf(" are treated as being the same; by default, h5diff\n"); + printf(" returns an exit code of 0. If, however, \n"); + printf(" --no-dangling-links is used with --follow-links, \n"); + printf(" this situation is treated as an error and h5diff \n"); + printf(" returns an exit code of 2.\n"); + printf(" - If only one of the two links is a dangling link,\n"); + printf(" they are treated as being different and h5diff \n"); + printf(" returns an exit code of 1. If, however, \n"); + printf(" --no-dangling-links is used with --follow-links, \n"); + printf(" this situation is treated as an error and h5diff \n"); + printf(" returns an exit code of 2.\n"); + printf(" - If both symbolic links point to existing objects,\n"); + printf(" h5diff compares the two objects.\n"); + printf(" If any symbolic link specified in the call to h5diff\n"); + printf(" does not exist, h5diff treats it as an error and\n"); + printf(" returns an exit code of 2.\n"); + printf(" --no-dangling-links Must be used with --follow-links option;\n"); + printf(" otherwise, h5diff shows error message and returns\n"); + printf(" an exit code of 2.\n"); + printf(" Check for any symbolic links (soft links or external\n"); + printf(" links) that do not resolve to an existing object\n"); + printf(" (dataset, group, or named datatype). If any\n"); + printf(" dangling link is found, this situation is treated as\n"); + printf(" an error and h5diff returns an exit code of 2.\n"); printf(" -c, --compare List objects that are not comparable\n"); printf(" -N, --nan Avoid NaNs detection\n"); - printf(" -n C, --count=C Print differences up to C number, C is a positive integer.\n"); - - printf(" -d D, --delta=D Print difference if (|a-b| > D), D is a positive number.\n"); - printf(" -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number.\n"); + printf(" -n C, --count=C Print differences up to C number, C is a positive\n"); + printf(" integer.\n"); + printf(" -d D, --delta=D Print difference if (|a-b| > D), D is a positive\n"); + printf(" number.\n"); + printf(" -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive\n"); + printf(" number.\n"); printf(" --use-system-epsilon Print difference if (|a-b| > EPSILON),\n"); - printf(" where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. \n"); - printf(" If the system epsilon is not defined, use the value below:\n"); + printf(" where EPSILON (FLT_EPSILON or FLT_EPSILON) is the\n"); + printf(" system epsilon value. \n"); + printf(" If the system epsilon is not defined, use the value\n"); + printf(" below:\n"); printf(" FLT_EPSILON = 1.19209E-07 for float\n"); printf(" DBL_EPSILON = 2.22045E-16 for double\n"); - - printf(" -d, -p, and --use-system-epsilon options are used for comparing floating point values.\n"); - printf(" By default, strict equality is used. Use -p or -d to set specific tolerance.\n"); + printf(" -d, -p, and --use-system-epsilon options are used for\n"); + printf(" comparing floating point values.\n"); + printf(" By default, strict equality is used. Use -p or -d to\n"); + printf(" set specific tolerance.\n"); printf("\n"); printf(" Modes of output:\n"); - printf("\n"); printf(" Default mode: print the number of differences found and where they occured\n"); 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"); @@ -391,46 +430,35 @@ void usage(void) 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\n"); + printf(" If no objects [obj1[obj2]] are specified, h5diff only compares objects\n"); + printf(" with the same absolute path in both files\n"); printf("\n"); printf(" The compare criteria is:\n"); - printf(" 1) datasets: numerical array differences 2) groups: name string difference\n"); - printf(" 3) datatypes: the return value of H5Tequal 4) links: name string difference\n"); - printf(" of the linked value\n"); - + printf(" 1) datasets: numerical array differences\n"); + printf(" 2) groups: name string difference\n"); + printf(" 3) datatypes: the return value of H5Tequal\n"); + printf(" 4) links: name string difference of the linked value as default\n"); + printf(" (refer to --follow-links option).\n"); printf("\n"); - - printf(" Return exit code:\n"); - printf("\n"); - printf(" 1 if differences found, 0 if no differences, 2 if error\n"); - + printf(" Exit code:\n"); + printf(" 0 if no differences, 1 if differences found, 2 if error\n"); printf("\n"); - printf(" Examples of use:\n"); - printf("\n"); printf(" 1) h5diff file1 file2 /g1/dset1 /g1/dset2\n"); - printf("\n"); printf(" Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2\n"); printf("\n"); printf(" 2) h5diff file1 file2 /g1/dset1\n"); - printf("\n"); printf(" Compares object '/g1/dset1' in both files\n"); printf("\n"); printf(" 3) h5diff file1 file2\n"); - printf("\n"); printf(" Compares all objects in both files\n"); printf("\n"); - printf(" Note) file1 and file2 can be the same file. Use\n"); - printf("\n"); - printf(" h5diff file1 file1 /g1/dset1 /g1/dset2\n"); + printf(" Notes:\n"); + printf(" file1 and file2 can be the same file.\n"); + printf(" Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare\n"); + printf(" '/g1/dset1' and '/g1/dset2' in the same file\n"); printf("\n"); - printf(" to compare '/g1/dset1' and '/g1/dset2' in the same file\n"); - printf("\n"); - - } diff --git a/tools/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c index 1cb8f2f..8089161 100644 --- a/tools/h5diff/h5diff_main.c +++ b/tools/h5diff/h5diff_main.c @@ -97,6 +97,7 @@ int main(int argc, const char *argv[]) print_info(&options); +out: /*------------------------------------------------------------------------- * exit code * 1 if differences, 0 if no differences, 2 if error diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c index 1bfea17..60d7f94 100644 --- a/tools/h5diff/h5diffgentest.c +++ b/tools/h5diff/h5diffgentest.c @@ -43,8 +43,18 @@ #define FILE9 "h5diff_hyper1.h5" #define FILE10 "h5diff_hyper2.h5" #define FILE11 "h5diff_empty.h5" -#define FILE12 "h5diff_dset_idx1.h5" -#define FILE13 "h5diff_dset_idx2.h5" +#define FILE12 "h5diff_links.h5" +#define FILE13 "h5diff_softlinks.h5" +#define FILE14 "h5diff_linked_softlink.h5" +#define FILE15 "h5diff_extlink_src.h5" +#define FILE16 "h5diff_extlink_trg.h5" +#define FILE17 "h5diff_ext2softlink_src.h5" +#define FILE18 "h5diff_ext2softlink_trg.h5" +#define FILE19 "h5diff_dset_idx1.h5" +#define FILE20 "h5diff_dset_idx2.h5" +#define DANGLE_LINK_FILE1 "h5diff_danglelinks1.h5" +#define DANGLE_LINK_FILE2 "h5diff_danglelinks2.h5" + #define UIMAX 4294967295u /*Maximum value for a variable of type unsigned int */ #define STR_SIZE 3 #define GBLL ((unsigned long long) 1024 * 1024 *1024 ) @@ -82,6 +92,13 @@ static int test_datatypes(const char *fname); static int test_attributes(const char *fname,int make_diffs); static int test_datasets(const char *fname,int make_diffs); static int test_hyperslab(const char *fname,int make_diffs); +static int test_link_name(const char *fname1); +static int test_soft_links(const char *fname1); +static int test_linked_softlinks(const char *fname1); +static int test_external_links(const char *fname1, const char *fname2); +static int test_ext2soft_links(const char *fname1, const char *fname2); +static int test_dangle_links(const char *fname1, const char *fname2); + /* called by test_attributes() and test_datasets() */ static void write_attr_in(hid_t loc_id,const char* dset_name,hid_t fid,int make_diffs); static void write_dset_in(hid_t loc_id,const char* dset_name,hid_t fid,int make_diffs); @@ -122,14 +139,26 @@ int main(void) test_hyperslab(FILE9,0); test_hyperslab(FILE10,1); + test_link_name(FILE12); + + test_soft_links(FILE13); + + test_linked_softlinks(FILE14); + + test_external_links(FILE15, FILE16); + + test_ext2soft_links(FILE17, FILE18); + /* * Generate 2 files: FILE12 with old format; FILE13 with new format * Create 2 datasets in each file: * One dataset: chunked layout, w/o filters, fixed dimension * One dataset: chunked layout, w/ filters, fixed dimension */ - gen_dataset_idx(FILE12, 0); - gen_dataset_idx(FILE13, 1); + gen_dataset_idx(FILE19, 0); + gen_dataset_idx(FILE20, 1); + + test_dangle_links(DANGLE_LINK_FILE1, DANGLE_LINK_FILE2); return 0; } @@ -346,7 +375,7 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3) } /*------------------------------------------------------------------------ - * INFINITY values + * INFINITY values *------------------------------------------------------------------------ */ { @@ -905,6 +934,707 @@ int test_datasets(const char *file, } /*------------------------------------------------------------------------- +* +* Purpose: Create test files to compare links, one has longer name than +* the other and short name is subset of long name. +* +* Programmer: Jonathan Kim (Feb 17, 2010) +* +*-------------------------------------------------------------------------*/ +static int test_link_name(const char *fname1) +{ + hid_t fid1=0; + hid_t gid1=0; + hid_t gid2=0; + herr_t status = SUCCEED; + + /*----------------------------------------------------------------------- + * Create file(s) + *------------------------------------------------------------------------*/ + fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Groups + *------------------------------------------------------------------------*/ + gid1 = H5Gcreate2(fid1, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid1 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + status = FAIL; + goto out; + } + gid2 = H5Gcreate2(fid1, "group_longname", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + if (gid2 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Soft Links + *------------------------------------------------------------------------*/ + status = H5Lcreate_soft("group", fid1, "link_g1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("group_longname", fid1, "link_g2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + +out: + /*----------------------------------------------------------------------- + * Close + *------------------------------------------------------------------------*/ + if(fid1) + H5Fclose(fid1); + if(gid1) + H5Gclose(gid1); + if(gid2) + H5Gclose(gid2); + + return status; +} + +/*------------------------------------------------------------------------- +* +* Purpose: Create test files to compare soft links in various way +* +* Programmer: Jonathan Kim (Feb 17, 2010) +* +*-------------------------------------------------------------------------*/ +static int test_soft_links(const char *fname1) +{ + hid_t fid1=0; + hid_t gid1=0; + hsize_t dims2[2] = {2,4}; + int data1[4][2] = {{0,1},{2,3},{1,2},{3,4}}; + int data2[4][2] = {{0,0},{0,0},{0,0},{0,0}}; + herr_t status = SUCCEED; + + /*----------------------------------------------------------------------- + * Create file(s) + *------------------------------------------------------------------------*/ + fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Groups + *------------------------------------------------------------------------*/ + gid1 = H5Gcreate2(fid1, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid1 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Datasets + *------------------------------------------------------------------------*/ + /* file1 */ + status = write_dset(fid1,2,dims2,"target_dset1",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); + status = FAIL; + goto out; + } + + status = write_dset(fid1,2,dims2,"target_dset2",H5T_NATIVE_INT,data2); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); + status = FAIL; + goto out; + } + + status = write_dset(gid1,2,dims2,"dset",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Soft Links + *------------------------------------------------------------------------*/ + /* file 1 */ + status = H5Lcreate_soft("/target_dset1", fid1, "softlink_dset1_1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/target_dset1", fid1, "softlink_dset1_2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/target_dset2", fid1, "softlink_dset2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/target_group", fid1, "softlink_group1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/target_group", fid1, "softlink_group2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/no_obj", fid1, "softlink_noexist", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + +out: + /*----------------------------------------------------------------------- + * Close + *-----------------------------------------------------------------------*/ + if(fid1) + H5Fclose(fid1); + if(gid1) + H5Gclose(gid1); + + return status; +} + +/*------------------------------------------------------------------------- +* +* Purpose: Create test files to compare linked soft links in various way +* +* Programmer: Jonathan Kim (Feb 17, 2010) +* +*-------------------------------------------------------------------------*/ +static int test_linked_softlinks(const char *fname1) +{ + hid_t fid1=0; + hid_t gid1=0; + hid_t gid2=0; + hid_t gid3=0; + hsize_t dims2[2] = {2,4}; + int data1[4][2] = {{0,1},{2,3},{1,2},{3,4}}; + int data2[4][2] = {{0,0},{0,0},{0,0},{0,0}}; + herr_t status = SUCCEED; + + /*----------------------------------------------------------------------- + * Create file(s) + *------------------------------------------------------------------------*/ + fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Groups + *------------------------------------------------------------------------*/ + gid1 = H5Gcreate2(fid1, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid1 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + status = FAIL; + goto out; + } + + gid2 = H5Gcreate2(fid1, "target_group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid2 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + status = FAIL; + goto out; + } + + gid3 = H5Gcreate2(fid1, "target_group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid3 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Datasets + *------------------------------------------------------------------------*/ + /* file1 */ + status = write_dset(fid1,2,dims2,"target_dset1",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); + status = FAIL; + goto out; + } + + status = write_dset(fid1,2,dims2,"target_dset2",H5T_NATIVE_INT,data2); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); + status = FAIL; + goto out; + } + status = write_dset(gid1,2,dims2,"dset",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Soft Links (Linked) + *------------------------------------------------------------------------*/ + /*--------- + * file 1 */ + status = H5Lcreate_soft("/target_dset1", fid1, "softlink1_to_dset1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("softlink1_to_dset1", fid1, "softlink1_to_slink1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("softlink1_to_slink1", fid1, "softlink1_to_slink2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/target_dset2", fid1, "softlink2_to_dset2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("softlink2_to_dset2", fid1, "softlink2_to_slink1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("softlink2_to_slink1", fid1, "softlink2_to_slink2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("target_group1", fid1, "softlink3_to_group1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("softlink3_to_group1", fid1, "softlink3_to_slink1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("softlink3_to_slink1", fid1, "softlink3_to_slink2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("target_group2", fid1, "softlink4_to_group2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("softlink4_to_group2", fid1, "softlink4_to_slink1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("softlink4_to_slink1", fid1, "softlink4_to_slink2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + +out: + /*----------------------------------------------------------------------- + * Close + *-----------------------------------------------------------------------*/ + if(fid1) + H5Fclose(fid1); + if(gid1) + H5Gclose(gid1); + if(gid2) + H5Gclose(gid2); + if(gid3) + H5Gclose(gid3); + + return status; +} + +/*------------------------------------------------------------------------- +* +* Purpose: Create test files to compare external links in various way +* +* Programmer: Jonathan Kim (Feb 17, 2010) +* +*-------------------------------------------------------------------------*/ +static int test_external_links(const char *fname1, const char *fname2) +{ + hid_t fid1=0; + hid_t fid2=0; + hid_t gid1=0; + hid_t gid2=0; + hsize_t dims2[2] = {2,4}; + int data1[4][2] = {{0,1},{2,3},{1,2},{3,4}}; + int data2[4][2] = {{0,0},{0,0},{0,0},{0,0}}; + herr_t status = SUCCEED; + + /*----------------------------------------------------------------------- + * Create file(s) + *------------------------------------------------------------------------*/ + /* source file */ + fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + status = FAIL; + goto out; + } + + /* target file */ + fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid2 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Groups + *------------------------------------------------------------------------*/ + /*-------------- + * target file */ + gid1 = H5Gcreate2(fid2, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid1 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + status = FAIL; + goto out; + } + + gid2 = H5Gcreate2(fid2, "target_group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid2 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + status = FAIL; + goto out; + } + /*----------------------------------------------------------------------- + * Datasets + *------------------------------------------------------------------------*/ + /*-------------- + * target file */ + status = write_dset(fid2,2,dims2,"target_dset1",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); + status = FAIL; + goto out; + } + + status = write_dset(gid1,2,dims2,"x_dset",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); + status = FAIL; + goto out; + } + + status = write_dset(gid2,2,dims2,"x_dset",H5T_NATIVE_INT,data2); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * External Links + *------------------------------------------------------------------------*/ + /*-------------- + /* source file */ + status = H5Lcreate_external(fname2, "/target_group/x_dset", fid1, "ext_link_dset1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname2, "/target_group2/x_dset", fid1, "ext_link_dset2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname2, "/target_group", fid1, "/ext_link_grp1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname2, "/target_group2", fid1, "/ext_link_grp2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link_noexist1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external("no_file.h5", "no_obj", fid1, "ext_link_noexist2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + +out: + /*----------------------------------------------------------------------- + * Close + *-----------------------------------------------------------------------*/ + if(fid1) + H5Fclose(fid1); + if(fid2) + H5Fclose(fid2); + if(gid1) + H5Gclose(gid1); + if(gid2) + H5Gclose(gid2); + + return status; +} + +/*------------------------------------------------------------------------- +* +* Purpose: Create test files to compare external links which point to +* soft link in various way +* +* Programmer: Jonathan Kim (Feb 17, 2010) +* +*-------------------------------------------------------------------------*/ +static int test_ext2soft_links(const char *fname1, const char *fname2) +{ + hid_t fid1=0; + hid_t fid2=0; + hid_t gid2=0; + hsize_t dims2[2] = {2,4}; + int data1[4][2] = {{0,1},{2,3},{1,2},{3,4}}; + int data2[4][2] = {{0,0},{0,0},{0,0},{0,0}}; + herr_t status = SUCCEED; + + /*----------------------------------------------------------------------- + * Create file(s) + *------------------------------------------------------------------------*/ + /* source file */ + fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + status = FAIL; + goto out; + } + + /* target file */ + fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid2 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Groups + *------------------------------------------------------------------------*/ + /* target file */ + gid2 = H5Gcreate2(fid2, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (gid2 < 0) + { + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Datasets + *------------------------------------------------------------------------*/ + /*-------------- + * target file */ + status = write_dset(fid2,2,dims2,"dset1",H5T_NATIVE_INT,data2); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); + status = FAIL; + goto out; + } + + status = write_dset(fid2,2,dims2,"dset2",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Soft Links (Linked) + *------------------------------------------------------------------------*/ + /*--------------- + * target file */ + status = H5Lcreate_soft("/dset1", fid2, "softlink_to_dset1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/dset2", fid2, "softlink_to_dset2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * External Links + *------------------------------------------------------------------------*/ + /*--------------- + * source file */ + status = H5Lcreate_external(fname2, "/target_group", fid1, "ext_link", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname2, "/softlink_to_dset1", fid1, "ext_link_to_slink1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname2, "/softlink_to_dset2", fid1, "ext_link_to_slink2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + +out: + /*----------------------------------------------------------------------- + * Close + *-----------------------------------------------------------------------*/ + if(fid1) + H5Fclose(fid1); + if(fid2) + H5Fclose(fid2); + if(gid2) + H5Gclose(gid2); + + return status; +} + +/*------------------------------------------------------------------------- * Function: gen_dataset_idx * * Purpose: Create a file with either the new or old format @@ -994,6 +1724,212 @@ int gen_dataset_idx(const char *file, int format) } /*------------------------------------------------------------------------- +* +* Purpose: Create test files to compare dangling links in various way +* +* Programmer: Jonathan Kim (Feb 17, 2010) +* +*-------------------------------------------------------------------------*/ +static int test_dangle_links(const char *fname1, const char *fname2) +{ + hid_t fid1=0; + hid_t fid2=0; + hsize_t dims2[2] = {2,4}; + int data1[4][2] = {{0,1},{2,3},{1,2},{3,4}}; + int data2[4][2] = {{0,0},{0,0},{0,0},{0,0}}; + herr_t status = SUCCEED; + + /*----------------------------------------------------------------------- + * Create file(s) + *------------------------------------------------------------------------*/ + fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + status = FAIL; + goto out; + } + + fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid2 < 0) + { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Datasets + *------------------------------------------------------------------------*/ + /* file1 */ + status = write_dset(fid1,2,dims2,"dset1",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); + status = FAIL; + goto out; + } + + status = write_dset(fid1,2,dims2,"dset2",H5T_NATIVE_INT,data2); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); + status = FAIL; + goto out; + } + + /* file2 */ + status = write_dset(fid2,2,dims2,"dset1",H5T_NATIVE_INT,data1); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); + status = FAIL; + goto out; + } + + status = write_dset(fid2,2,dims2,"dset2",H5T_NATIVE_INT,data2); + if (status == FAIL) + { + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * Soft Links + *------------------------------------------------------------------------*/ + /* file 1 */ + status = H5Lcreate_soft("no_obj", fid1, "soft_link1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/dset1", fid1, "soft_link2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("no_obj", fid1, "soft_link3", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + status = FAIL; + goto out; + } + + /* file 2 */ + status = H5Lcreate_soft("no_obj", fid2, "soft_link1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("no_obj", fid2, "soft_link2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + status = FAIL; + goto out; + } + + status = H5Lcreate_soft("/dset2", fid2, "soft_link3", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + status = FAIL; + goto out; + } + + /*----------------------------------------------------------------------- + * External Links + *------------------------------------------------------------------------*/ + /* file1 */ + status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname2, "/dset1", fid1, "ext_link2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link3", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + status = H5Lcreate_external("no_file1.h5", "no_obj", fid1, "ext_link4", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + status = FAIL; + goto out; + } + + /* file2 */ + status = H5Lcreate_external(fname1, "no_obj", fid2, "ext_link1", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname1, "no_obj", fid2, "ext_link2", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); + status = FAIL; + goto out; + } + + status = H5Lcreate_external(fname1, "/dset2", fid2, "ext_link3", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); + status = FAIL; + goto out; + } + + status = H5Lcreate_external("no_file2.h5", "no_obj", fid2, "ext_link4", H5P_DEFAULT, H5P_DEFAULT); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); + status = FAIL; + goto out; + } + +out: + /*----------------------------------------------------------------------- + * Close + *-----------------------------------------------------------------------*/ + if(fid1) + H5Fclose(fid1); + if(fid2) + H5Fclose(fid2); + + return status; +} + +/*------------------------------------------------------------------------- * Function: write_attr_in * * Purpose: write attributes in LOC_ID (dataset, group, named datatype) @@ -2486,7 +3422,7 @@ void write_dset_in(hid_t loc_id, n = 0; for(i = 0; i < 3; i++) { - for(j = 0; j < 2; j++) + for(j = 0; j < 2; j++) { buf52[i][j].p = malloc((i + 1) * sizeof(int)); buf52[i][j].len = i + 1; @@ -2532,7 +3468,7 @@ void write_dset_in(hid_t loc_id, */ - if (make_diffs) + if (make_diffs) { memset(buf72, 0, sizeof buf72); memset(buf82, 0, sizeof buf82); @@ -2602,13 +3538,13 @@ void write_dset_in(hid_t loc_id, n=1; - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) + for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) + for (k = 0; k < 2; k++) { - if (make_diffs) + if (make_diffs) buf23[i][j][k]=0; else buf23[i][j][k]=n++; } @@ -2635,13 +3571,13 @@ void write_dset_in(hid_t loc_id, */ n=1; - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) + for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) + for (k = 0; k < 2; k++) { - if (make_diffs) + if (make_diffs) { buf33[i][j][k].a=0; buf33[i][j][k].b=0; @@ -2699,7 +3635,7 @@ void write_dset_in(hid_t loc_id, { for(j = 0; j < 3; j++) { - for(k = 0; k < 2; k++) + for(k = 0; k < 2; k++) { buf53[i][j][k].p = malloc((i + 1) * sizeof(int)); buf53[i][j][k].len = i + 1; diff --git a/tools/h5diff/testfiles/h5diff_10.txt b/tools/h5diff/testfiles/h5diff_10.txt index a6b637a..aeba845 100644 --- a/tools/h5diff/testfiles/h5diff_10.txt +++ b/tools/h5diff/testfiles/h5diff_10.txt @@ -3,64 +3,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -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 Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_100.txt b/tools/h5diff/testfiles/h5diff_100.txt index 32ff7ab..363daa3 100644 --- a/tools/h5diff/testfiles/h5diff_100.txt +++ b/tools/h5diff/testfiles/h5diff_100.txt @@ -1035,3 +1035,4 @@ position big big difference [ 268436478 ] 31 0 31 [ 268436479 ] 31 0 31 1024 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_101.txt b/tools/h5diff/testfiles/h5diff_101.txt index 03875b7..1d0f38d 100644 --- a/tools/h5diff/testfiles/h5diff_101.txt +++ b/tools/h5diff/testfiles/h5diff_101.txt @@ -7,3 +7,4 @@ position d1 d2 difference [ 1 1 ] 0 1e-09 1e-09 [ 2 0 ] 1e-09 0 1e-09 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_102.txt b/tools/h5diff/testfiles/h5diff_102.txt index 3d91a36..30a2491 100644 --- a/tools/h5diff/testfiles/h5diff_102.txt +++ b/tools/h5diff/testfiles/h5diff_102.txt @@ -7,3 +7,4 @@ position fp1 fp2 difference [ 1 1 ] 0 1e-05 1e-05 [ 2 0 ] 1e-05 0 1e-05 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_11.txt b/tools/h5diff/testfiles/h5diff_11.txt index e2e33fb..c06305c 100644 --- a/tools/h5diff/testfiles/h5diff_11.txt +++ b/tools/h5diff/testfiles/h5diff_11.txt @@ -1,2 +1,3 @@ dataset: </g1/dset1> and </g1/dset1> 5 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_12.txt b/tools/h5diff/testfiles/h5diff_12.txt index 6b4c747..371df79 100644 --- a/tools/h5diff/testfiles/h5diff_12.txt +++ b/tools/h5diff/testfiles/h5diff_12.txt @@ -1,2 +1,3 @@ dataset: </g1/dset1> and </g1/dset2> 5 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_13.txt b/tools/h5diff/testfiles/h5diff_13.txt index 36676e9..729859b 100644 --- a/tools/h5diff/testfiles/h5diff_13.txt +++ b/tools/h5diff/testfiles/h5diff_13.txt @@ -8,3 +8,4 @@ position dset1 dset1 difference [ 1 1 ] 1 1.001 0.001 [ 2 1 ] 0 1 1 5 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_14.txt b/tools/h5diff/testfiles/h5diff_14.txt index 3fac3af..454463a 100644 --- a/tools/h5diff/testfiles/h5diff_14.txt +++ b/tools/h5diff/testfiles/h5diff_14.txt @@ -8,3 +8,4 @@ position dset1 dset2 difference [ 1 1 ] 1 1.001 0.001 [ 2 1 ] 0 1 1 5 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_15.txt b/tools/h5diff/testfiles/h5diff_15.txt index 386c6e1..7685f75 100644 --- a/tools/h5diff/testfiles/h5diff_15.txt +++ b/tools/h5diff/testfiles/h5diff_15.txt @@ -7,3 +7,4 @@ position dset3 dset4 difference [ 2 0 ] 100 80 20 [ 2 1 ] 100 40 60 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_16_1.txt b/tools/h5diff/testfiles/h5diff_16_1.txt index 519f695..482a42f 100644 --- a/tools/h5diff/testfiles/h5diff_16_1.txt +++ b/tools/h5diff/testfiles/h5diff_16_1.txt @@ -8,3 +8,4 @@ position dset5 dset6 difference relative [ 1 1 ] 0 100 100 not comparable [ 2 1 ] 100 50 50 0.500000 5 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_16_2.txt b/tools/h5diff/testfiles/h5diff_16_2.txt index 233b133..34c1afb 100644 --- a/tools/h5diff/testfiles/h5diff_16_2.txt +++ b/tools/h5diff/testfiles/h5diff_16_2.txt @@ -8,3 +8,4 @@ position dset7 dset8 difference relative [ 1 1 ] 0 100 100 not comparable [ 2 1 ] 100 50 50 0.500000 5 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_16_3.txt b/tools/h5diff/testfiles/h5diff_16_3.txt index b96c8a4..173a39b 100644 --- a/tools/h5diff/testfiles/h5diff_16_3.txt +++ b/tools/h5diff/testfiles/h5diff_16_3.txt @@ -8,3 +8,4 @@ position dset9 dset10 difference relative [ 1 1 ] 0 100 100 not comparable [ 2 1 ] 100 50 50 0.5 5 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_17.txt b/tools/h5diff/testfiles/h5diff_17.txt index dce5ef5..5cb604d 100644 --- a/tools/h5diff/testfiles/h5diff_17.txt +++ b/tools/h5diff/testfiles/h5diff_17.txt @@ -51,3 +51,4 @@ position dset1 dset1 difference [ 1 1 ] 1 1.001 0.001 [ 2 1 ] 0 1 1 5 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_171.txt b/tools/h5diff/testfiles/h5diff_171.txt index 7ee0711..5314a79 100644 --- a/tools/h5diff/testfiles/h5diff_171.txt +++ b/tools/h5diff/testfiles/h5diff_171.txt @@ -1,2 +1,3 @@ dataset: </g1/fp19> and </g1/fp19> 0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_172.txt b/tools/h5diff/testfiles/h5diff_172.txt index e2d1b7d..0269194 100644 --- a/tools/h5diff/testfiles/h5diff_172.txt +++ b/tools/h5diff/testfiles/h5diff_172.txt @@ -1,2 +1,3 @@ dataset: </g1/fp20> and </g1/fp20> 0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_18.txt b/tools/h5diff/testfiles/h5diff_18.txt index e69de29..1255241 100644 --- a/tools/h5diff/testfiles/h5diff_18.txt +++ b/tools/h5diff/testfiles/h5diff_18.txt @@ -0,0 +1 @@ +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_18_1.txt b/tools/h5diff/testfiles/h5diff_18_1.txt new file mode 100644 index 0000000..0067075 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_18_1.txt @@ -0,0 +1,2 @@ +Error: -q (quiet mode) cannot be added to verbose or report modes +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_19.txt b/tools/h5diff/testfiles/h5diff_19.txt index 9e84fe8..1155d55 100644 --- a/tools/h5diff/testfiles/h5diff_19.txt +++ b/tools/h5diff/testfiles/h5diff_19.txt @@ -23,3 +23,4 @@ file1 file2 group : </> and </> 0 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_20.txt b/tools/h5diff/testfiles/h5diff_20.txt index b2fda7c..6eba851 100644 --- a/tools/h5diff/testfiles/h5diff_20.txt +++ b/tools/h5diff/testfiles/h5diff_20.txt @@ -3,3 +3,4 @@ Some objects are not comparable -------------------------------- Use -c for a list of objects. +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_200.txt b/tools/h5diff/testfiles/h5diff_200.txt index 56d723d..40e3fb6 100644 --- a/tools/h5diff/testfiles/h5diff_200.txt +++ b/tools/h5diff/testfiles/h5diff_200.txt @@ -2,3 +2,4 @@ Some objects are not comparable -------------------------------- Use -c for a list of objects. +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_201.txt b/tools/h5diff/testfiles/h5diff_201.txt index 84d6766..ede94e1 100644 --- a/tools/h5diff/testfiles/h5diff_201.txt +++ b/tools/h5diff/testfiles/h5diff_201.txt @@ -1 +1,2 @@ Not comparable: </g2/dset1> or </g2/dset2> is an empty dataset +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_202.txt b/tools/h5diff/testfiles/h5diff_202.txt index fd4a191..53657d3 100644 --- a/tools/h5diff/testfiles/h5diff_202.txt +++ b/tools/h5diff/testfiles/h5diff_202.txt @@ -1,2 +1,3 @@ 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 +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_203.txt b/tools/h5diff/testfiles/h5diff_203.txt index 496523c..61a773a 100644 --- a/tools/h5diff/testfiles/h5diff_203.txt +++ b/tools/h5diff/testfiles/h5diff_203.txt @@ -1,2 +1,3 @@ Not comparable: </g2/dset3> has rank 1, dimensions [6], max dimensions [6] and </g2/dset4> has rank 2, dimensions [3x2], max dimensions [3x2] +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_204.txt b/tools/h5diff/testfiles/h5diff_204.txt index 098a203..e02e831 100644 --- a/tools/h5diff/testfiles/h5diff_204.txt +++ b/tools/h5diff/testfiles/h5diff_204.txt @@ -1,2 +1,3 @@ Not comparable: </g2/dset4> has rank 2, dimensions [3x2], max dimensions [3x2] and </g2/dset5> has rank 2, dimensions [2x2], max dimensions [2x2] +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_205.txt b/tools/h5diff/testfiles/h5diff_205.txt index 3e2d1f2..d72797b 100644 --- a/tools/h5diff/testfiles/h5diff_205.txt +++ b/tools/h5diff/testfiles/h5diff_205.txt @@ -1,3 +1,4 @@ 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 +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_206.txt b/tools/h5diff/testfiles/h5diff_206.txt index 164aed9..659321f 100644 --- a/tools/h5diff/testfiles/h5diff_206.txt +++ b/tools/h5diff/testfiles/h5diff_206.txt @@ -1 +1,2 @@ Not comparable: </g2/dset7> has a class H5T_FLOAT and </g2/dset8> has a class H5T_INTEGER +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_207.txt b/tools/h5diff/testfiles/h5diff_207.txt index bb8e23f..1ef3dbe 100644 --- a/tools/h5diff/testfiles/h5diff_207.txt +++ b/tools/h5diff/testfiles/h5diff_207.txt @@ -1,2 +1,3 @@ Not comparable: </g2/dset8> or </g2/dset9> is an empty dataset Not comparable: </g2/dset8> has 2 members </g2/dset9> has 1 members +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_21.txt b/tools/h5diff/testfiles/h5diff_21.txt index 5518e0c..238c8b8 100644 --- a/tools/h5diff/testfiles/h5diff_21.txt +++ b/tools/h5diff/testfiles/h5diff_21.txt @@ -3,3 +3,4 @@ Some objects are not comparable -------------------------------- Use -c for a list of objects. +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_22.txt b/tools/h5diff/testfiles/h5diff_22.txt index 0f9493b..33c3a3d 100644 --- a/tools/h5diff/testfiles/h5diff_22.txt +++ b/tools/h5diff/testfiles/h5diff_22.txt @@ -3,3 +3,4 @@ Some objects are not comparable -------------------------------- Use -c for a list of objects. +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_23.txt b/tools/h5diff/testfiles/h5diff_23.txt index 1342765..5a46ea2 100644 --- a/tools/h5diff/testfiles/h5diff_23.txt +++ b/tools/h5diff/testfiles/h5diff_23.txt @@ -1,2 +1,3 @@ group : </g1> and </g1> 0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_24.txt b/tools/h5diff/testfiles/h5diff_24.txt index cc4f0d0..fa5723a 100644 --- a/tools/h5diff/testfiles/h5diff_24.txt +++ b/tools/h5diff/testfiles/h5diff_24.txt @@ -1,2 +1,3 @@ datatype: </t1> and </t1> 0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_25.txt b/tools/h5diff/testfiles/h5diff_25.txt index 288c4da..e463ba1 100644 --- a/tools/h5diff/testfiles/h5diff_25.txt +++ b/tools/h5diff/testfiles/h5diff_25.txt @@ -1,2 +1,3 @@ link : </l1> and </l1> 0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_26.txt b/tools/h5diff/testfiles/h5diff_26.txt index 916cf63..8e1fcc3 100644 --- a/tools/h5diff/testfiles/h5diff_26.txt +++ b/tools/h5diff/testfiles/h5diff_26.txt @@ -1,2 +1,3 @@ group : </g1> and </g2> 1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_27.txt b/tools/h5diff/testfiles/h5diff_27.txt index 335119a..cbc128e 100644 --- a/tools/h5diff/testfiles/h5diff_27.txt +++ b/tools/h5diff/testfiles/h5diff_27.txt @@ -1,2 +1,3 @@ datatype: </t1> and </t2> 1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_28.txt b/tools/h5diff/testfiles/h5diff_28.txt index 5845fa9..07d01fe 100644 --- a/tools/h5diff/testfiles/h5diff_28.txt +++ b/tools/h5diff/testfiles/h5diff_28.txt @@ -1,2 +1,3 @@ link : </l1> and </l2> 1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_300.txt b/tools/h5diff/testfiles/h5diff_300.txt index 0cfc01b..e51643f 100755 --- a/tools/h5diff/testfiles/h5diff_300.txt +++ b/tools/h5diff/testfiles/h5diff_300.txt @@ -1,2 +1,3 @@ link : </link_g1> and </link_g2> 1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_400.txt b/tools/h5diff/testfiles/h5diff_400.txt index 4b910f5..97db70d 100644 --- a/tools/h5diff/testfiles/h5diff_400.txt +++ b/tools/h5diff/testfiles/h5diff_400.txt @@ -16,29 +16,26 @@ file1 file2 group : </> and </> 0 differences found link : </softlink_dset1_1> and </softlink_dset1_1> -dataset: </target_dset1> and </target_dset1> +dataset: </softlink_dset1_1> and </softlink_dset1_1> 0 differences found 0 differences found link : </softlink_dset1_2> and </softlink_dset1_2> -dataset: </target_dset1> and </target_dset1> +dataset: </softlink_dset1_2> and </softlink_dset1_2> 0 differences found 0 differences found link : </softlink_dset2> and </softlink_dset2> -dataset: </target_dset2> and </target_dset2> +dataset: </softlink_dset2> and </softlink_dset2> 0 differences found 0 differences found link : </softlink_group1> and </softlink_group1> -group : </target_group> and </target_group> +group : </softlink_group1> and </softlink_group1> 0 differences found 0 differences found link : </softlink_group2> and </softlink_group2> -group : </target_group> and </target_group> +group : </softlink_group2> and </softlink_group2> 0 differences found 0 differences found -warn: link target "/no_obj" doesn't exist -warn: link target "/no_obj" doesn't exist -link : </softlink_noexist> and </softlink_noexist> -Comparison not supported: </no_obj> and </no_obj> are of type unknown type +dangling link: </softlink_noexist> and </softlink_noexist> 0 differences found dataset: </target_dset1> and </target_dset1> 0 differences found @@ -48,7 +45,4 @@ group : </target_group> and </target_group> 0 differences found dataset: </target_group/dset> and </target_group/dset> 0 differences found --------------------------------- -Some objects are not comparable --------------------------------- -Use -c for a list of objects. +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_401.txt b/tools/h5diff/testfiles/h5diff_401.txt index 5c599e3..278729e 100644 --- a/tools/h5diff/testfiles/h5diff_401.txt +++ b/tools/h5diff/testfiles/h5diff_401.txt @@ -1,6 +1,6 @@ -dataset: </target_dset1> and </target_dset2> +dataset: </softlink_dset1_1> and </target_dset2> size: [2x4] [2x4] -position target_dset1 target_dset2 difference +position softlink_dset1_1 target_dset2 difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 [ 0 2 ] 2 0 2 @@ -10,3 +10,4 @@ position target_dset1 target_dset2 difference [ 1 2 ] 3 0 3 [ 1 3 ] 4 0 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_402.txt b/tools/h5diff/testfiles/h5diff_402.txt index 228c8cc..b0f30ca 100644 --- a/tools/h5diff/testfiles/h5diff_402.txt +++ b/tools/h5diff/testfiles/h5diff_402.txt @@ -1,6 +1,6 @@ -dataset: </target_dset2> and </target_dset1> +dataset: </target_dset2> and </softlink_dset1_1> size: [2x4] [2x4] -position target_dset2 target_dset1 difference +position target_dset2 softlink_dset1_1 difference ------------------------------------------------------------ [ 0 1 ] 0 1 1 [ 0 2 ] 0 2 2 @@ -10,3 +10,4 @@ position target_dset2 target_dset1 difference [ 1 2 ] 0 3 3 [ 1 3 ] 0 4 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_403.txt b/tools/h5diff/testfiles/h5diff_403.txt index 5c599e3..068d01d 100644 --- a/tools/h5diff/testfiles/h5diff_403.txt +++ b/tools/h5diff/testfiles/h5diff_403.txt @@ -1,6 +1,6 @@ -dataset: </target_dset1> and </target_dset2> +dataset: </softlink_dset1_1> and </softlink_dset2> size: [2x4] [2x4] -position target_dset1 target_dset2 difference +position softlink_dset1_1 softlink_dset2 difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 [ 0 2 ] 2 0 2 @@ -10,3 +10,4 @@ position target_dset1 target_dset2 difference [ 1 2 ] 3 0 3 [ 1 3 ] 4 0 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_404.txt b/tools/h5diff/testfiles/h5diff_404.txt index 2a0b856..c9a476d 100644 --- a/tools/h5diff/testfiles/h5diff_404.txt +++ b/tools/h5diff/testfiles/h5diff_404.txt @@ -12,25 +12,23 @@ file1 file2 group : </> and </> 0 differences found external link: </ext_link_dset1> and </ext_link_dset1> -dataset: </target_group/x_dset> and </target_group/x_dset> +dataset: </ext_link_dset1> and </ext_link_dset1> 0 differences found 0 differences found external link: </ext_link_dset2> and </ext_link_dset2> -dataset: </target_group2/x_dset> and </target_group2/x_dset> +dataset: </ext_link_dset2> and </ext_link_dset2> 0 differences found 0 differences found external link: </ext_link_grp1> and </ext_link_grp1> -group : </target_group> and </target_group> +group : </ext_link_grp1> and </ext_link_grp1> 0 differences found 0 differences found external link: </ext_link_grp2> and </ext_link_grp2> -group : </target_group2> and </target_group2> +group : </ext_link_grp2> and </ext_link_grp2> 0 differences found 0 differences found -external link: </ext_link_noexist1> and </ext_link_noexist1> -Object </no_obj> could not be found in <h5diff_extlink_trg.h5> -Object </no_obj> could not be found in <h5diff_extlink_trg.h5> +dangling link: </ext_link_noexist1> and </ext_link_noexist1> 0 differences found -external link: </ext_link_noexist2> and </ext_link_noexist2> -h5diff: <no_file.h5>: unable to open file +dangling link: </ext_link_noexist2> and </ext_link_noexist2> 0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_405.txt b/tools/h5diff/testfiles/h5diff_405.txt index edbf22a..890dd33 100644 --- a/tools/h5diff/testfiles/h5diff_405.txt +++ b/tools/h5diff/testfiles/h5diff_405.txt @@ -1,6 +1,6 @@ -dataset: </target_group/x_dset> and </target_group2/x_dset> +dataset: </ext_link_dset1> and </target_group2/x_dset> size: [2x4] [2x4] -position x_dset x_dset difference +position ext_link_dset1 x_dset difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 [ 0 2 ] 2 0 2 @@ -10,3 +10,4 @@ position x_dset x_dset difference [ 1 2 ] 3 0 3 [ 1 3 ] 4 0 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_406.txt b/tools/h5diff/testfiles/h5diff_406.txt index 7c5eb3e..7fa442a 100644 --- a/tools/h5diff/testfiles/h5diff_406.txt +++ b/tools/h5diff/testfiles/h5diff_406.txt @@ -1,6 +1,6 @@ -dataset: </target_group2/x_dset> and </target_group/x_dset> +dataset: </target_group2/x_dset> and </ext_link_dset1> size: [2x4] [2x4] -position x_dset x_dset difference +position x_dset ext_link_dset1 difference ------------------------------------------------------------ [ 0 1 ] 0 1 1 [ 0 2 ] 0 2 2 @@ -10,3 +10,4 @@ position x_dset x_dset difference [ 1 2 ] 0 3 3 [ 1 3 ] 0 4 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_407.txt b/tools/h5diff/testfiles/h5diff_407.txt index edbf22a..3693ab9 100644 --- a/tools/h5diff/testfiles/h5diff_407.txt +++ b/tools/h5diff/testfiles/h5diff_407.txt @@ -1,6 +1,6 @@ -dataset: </target_group/x_dset> and </target_group2/x_dset> +dataset: </ext_link_dset1> and </ext_link_dset2> size: [2x4] [2x4] -position x_dset x_dset difference +position ext_link_dset1 ext_link_dset2 difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 [ 0 2 ] 2 0 2 @@ -10,3 +10,4 @@ position x_dset x_dset difference [ 1 2 ] 3 0 3 [ 1 3 ] 4 0 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_408.txt b/tools/h5diff/testfiles/h5diff_408.txt index 11a928a..e941f9b 100644 --- a/tools/h5diff/testfiles/h5diff_408.txt +++ b/tools/h5diff/testfiles/h5diff_408.txt @@ -1,6 +1,6 @@ -dataset: </target_dset1> and </target_group2/x_dset> +dataset: </softlink_dset1_1> and </ext_link_dset2> size: [2x4] [2x4] -position target_dset1 x_dset difference +position softlink_dset1_1 ext_link_dset2 difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 [ 0 2 ] 2 0 2 @@ -10,3 +10,4 @@ position target_dset1 x_dset difference [ 1 2 ] 3 0 3 [ 1 3 ] 4 0 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_409.txt b/tools/h5diff/testfiles/h5diff_409.txt index 3b95e7c..007da7d 100644 --- a/tools/h5diff/testfiles/h5diff_409.txt +++ b/tools/h5diff/testfiles/h5diff_409.txt @@ -1,6 +1,6 @@ -dataset: </target_group2/x_dset> and </target_dset1> +dataset: </ext_link_dset2> and </softlink_dset1_1> size: [2x4] [2x4] -position x_dset target_dset1 difference +position ext_link_dset2 softlink_dset1_1 difference ------------------------------------------------------------ [ 0 1 ] 0 1 1 [ 0 2 ] 0 2 2 @@ -10,3 +10,4 @@ position x_dset target_dset1 difference [ 1 2 ] 0 3 3 [ 1 3 ] 0 4 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_410.txt b/tools/h5diff/testfiles/h5diff_410.txt index 8c645d2..b0924f6 100644 --- a/tools/h5diff/testfiles/h5diff_410.txt +++ b/tools/h5diff/testfiles/h5diff_410.txt @@ -24,51 +24,51 @@ file1 file2 group : </> and </> 0 differences found link : </softlink1_to_dset1> and </softlink1_to_dset1> -dataset: </target_dset1> and </target_dset1> +dataset: </softlink1_to_dset1> and </softlink1_to_dset1> 0 differences found 0 differences found link : </softlink1_to_slink1> and </softlink1_to_slink1> -dataset: <softlink1_to_dset1> and <softlink1_to_dset1> +dataset: </softlink1_to_slink1> and </softlink1_to_slink1> 0 differences found 0 differences found link : </softlink1_to_slink2> and </softlink1_to_slink2> -dataset: <softlink1_to_slink1> and <softlink1_to_slink1> +dataset: </softlink1_to_slink2> and </softlink1_to_slink2> 0 differences found 0 differences found link : </softlink2_to_dset2> and </softlink2_to_dset2> -dataset: </target_dset2> and </target_dset2> +dataset: </softlink2_to_dset2> and </softlink2_to_dset2> 0 differences found 0 differences found link : </softlink2_to_slink1> and </softlink2_to_slink1> -dataset: <softlink2_to_dset2> and <softlink2_to_dset2> +dataset: </softlink2_to_slink1> and </softlink2_to_slink1> 0 differences found 0 differences found link : </softlink2_to_slink2> and </softlink2_to_slink2> -dataset: <softlink2_to_slink1> and <softlink2_to_slink1> +dataset: </softlink2_to_slink2> and </softlink2_to_slink2> 0 differences found 0 differences found link : </softlink3_to_group1> and </softlink3_to_group1> -group : <target_group1> and <target_group1> +group : </softlink3_to_group1> and </softlink3_to_group1> 0 differences found 0 differences found link : </softlink3_to_slink1> and </softlink3_to_slink1> -group : <softlink3_to_group1> and <softlink3_to_group1> +group : </softlink3_to_slink1> and </softlink3_to_slink1> 0 differences found 0 differences found link : </softlink3_to_slink2> and </softlink3_to_slink2> -group : <softlink3_to_slink1> and <softlink3_to_slink1> +group : </softlink3_to_slink2> and </softlink3_to_slink2> 0 differences found 0 differences found link : </softlink4_to_group2> and </softlink4_to_group2> -group : <target_group2> and <target_group2> +group : </softlink4_to_group2> and </softlink4_to_group2> 0 differences found 0 differences found link : </softlink4_to_slink1> and </softlink4_to_slink1> -group : <softlink4_to_group2> and <softlink4_to_group2> +group : </softlink4_to_slink1> and </softlink4_to_slink1> 0 differences found 0 differences found link : </softlink4_to_slink2> and </softlink4_to_slink2> -group : <softlink4_to_slink1> and <softlink4_to_slink1> +group : </softlink4_to_slink2> and </softlink4_to_slink2> 0 differences found 0 differences found dataset: </target_dset1> and </target_dset1> @@ -83,3 +83,4 @@ group : </target_group1> and </target_group1> 0 differences found group : </target_group2> and </target_group2> 0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_411.txt b/tools/h5diff/testfiles/h5diff_411.txt index 2775677..161ab34 100644 --- a/tools/h5diff/testfiles/h5diff_411.txt +++ b/tools/h5diff/testfiles/h5diff_411.txt @@ -1,6 +1,6 @@ -dataset: </target_dset2> and <softlink1_to_slink1> +dataset: </target_dset2> and </softlink1_to_slink2> size: [2x4] [2x4] -position target_dset2 softlink1_to_slink1 difference +position target_dset2 softlink1_to_slink2 difference ------------------------------------------------------------ [ 0 1 ] 0 1 1 [ 0 2 ] 0 2 2 @@ -10,3 +10,4 @@ position target_dset2 softlink1_to_slink1 difference [ 1 2 ] 0 3 3 [ 1 3 ] 0 4 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_412.txt b/tools/h5diff/testfiles/h5diff_412.txt index 0924099..bb8209c 100644 --- a/tools/h5diff/testfiles/h5diff_412.txt +++ b/tools/h5diff/testfiles/h5diff_412.txt @@ -1,6 +1,6 @@ -dataset: <softlink1_to_slink1> and </target_dset2> +dataset: </softlink1_to_slink2> and </target_dset2> size: [2x4] [2x4] -position softlink1_to_slink1 target_dset2 difference +position softlink1_to_slink2 target_dset2 difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 [ 0 2 ] 2 0 2 @@ -10,3 +10,4 @@ position softlink1_to_slink1 target_dset2 difference [ 1 2 ] 3 0 3 [ 1 3 ] 4 0 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_413.txt b/tools/h5diff/testfiles/h5diff_413.txt index ae6cfea..8df3d51 100644 --- a/tools/h5diff/testfiles/h5diff_413.txt +++ b/tools/h5diff/testfiles/h5diff_413.txt @@ -1,6 +1,6 @@ -dataset: <softlink1_to_slink1> and <softlink2_to_slink1> +dataset: </softlink1_to_slink2> and </softlink2_to_slink2> size: [2x4] [2x4] -position softlink1_to_slink1 softlink2_to_slink1 difference +position softlink1_to_slink2 softlink2_to_slink2 difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 [ 0 2 ] 2 0 2 @@ -10,3 +10,4 @@ position softlink1_to_slink1 softlink2_to_slink1 difference [ 1 2 ] 3 0 3 [ 1 3 ] 4 0 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_414.txt b/tools/h5diff/testfiles/h5diff_414.txt index 0f07a14..e7a991a 100644 --- a/tools/h5diff/testfiles/h5diff_414.txt +++ b/tools/h5diff/testfiles/h5diff_414.txt @@ -1,2 +1,3 @@ -group : </target_group> and <softlink3_to_slink1> +group : </target_group> and </softlink3_to_slink2> 1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_415.txt b/tools/h5diff/testfiles/h5diff_415.txt index 3a9d863..1e97319 100644 --- a/tools/h5diff/testfiles/h5diff_415.txt +++ b/tools/h5diff/testfiles/h5diff_415.txt @@ -1,2 +1,3 @@ -group : <softlink3_to_slink1> and </target_group> +group : </softlink3_to_slink2> and </target_group> 1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_416.txt b/tools/h5diff/testfiles/h5diff_416.txt index 39d88bc..e4e98b0 100644 --- a/tools/h5diff/testfiles/h5diff_416.txt +++ b/tools/h5diff/testfiles/h5diff_416.txt @@ -1,2 +1,3 @@ -group : <softlink3_to_slink1> and <softlink4_to_slink1> +group : </softlink3_to_slink2> and </softlink4_to_slink2> 1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_417.txt b/tools/h5diff/testfiles/h5diff_417.txt index 56031e9..0ea2542 100644 --- a/tools/h5diff/testfiles/h5diff_417.txt +++ b/tools/h5diff/testfiles/h5diff_417.txt @@ -1,6 +1,3 @@ -warn: link target "/no_obj" doesn't exist -</no_obj> is of type unknown type and </target_dset2> is of type H5G_DATASET --------------------------------- -Some objects are not comparable --------------------------------- -Use -c for a list of objects. +obj1 </softlink_noexist> is a dangling link. +1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_418.txt b/tools/h5diff/testfiles/h5diff_418.txt index 0222174..46222bb 100644 --- a/tools/h5diff/testfiles/h5diff_418.txt +++ b/tools/h5diff/testfiles/h5diff_418.txt @@ -1,6 +1,3 @@ -warn: link target "/no_obj" doesn't exist -</target_dset2> is of type H5G_DATASET and </no_obj> is of type unknown type --------------------------------- -Some objects are not comparable --------------------------------- -Use -c for a list of objects. +obj2 </softlink_noexist> is a dangling link. +1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_419.txt b/tools/h5diff/testfiles/h5diff_419.txt index 836e95f..387c600 100644 --- a/tools/h5diff/testfiles/h5diff_419.txt +++ b/tools/h5diff/testfiles/h5diff_419.txt @@ -1,2 +1,3 @@ -error: <no_file.h5>: unable to open file -error: unable to get external link info from "/ext_link_noexist2" +obj1 </ext_link_noexist2> is a dangling link. +1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_420.txt b/tools/h5diff/testfiles/h5diff_420.txt index 836e95f..f3e65d9 100644 --- a/tools/h5diff/testfiles/h5diff_420.txt +++ b/tools/h5diff/testfiles/h5diff_420.txt @@ -1,2 +1,3 @@ -error: <no_file.h5>: unable to open file -error: unable to get external link info from "/ext_link_noexist2" +obj2 </ext_link_noexist2> is a dangling link. +1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_421.txt b/tools/h5diff/testfiles/h5diff_421.txt index c686b69..833c60c 100644 --- a/tools/h5diff/testfiles/h5diff_421.txt +++ b/tools/h5diff/testfiles/h5diff_421.txt @@ -1,2 +1,3 @@ -error: "/no_obj" doesn't exist -error: unable to get external link info from "/ext_link_noexist1" +obj2 </ext_link_noexist1> is a dangling link. +1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_422.txt b/tools/h5diff/testfiles/h5diff_422.txt index c686b69..3e675d5 100644 --- a/tools/h5diff/testfiles/h5diff_422.txt +++ b/tools/h5diff/testfiles/h5diff_422.txt @@ -1,2 +1,3 @@ -error: "/no_obj" doesn't exist -error: unable to get external link info from "/ext_link_noexist1" +obj1 </ext_link_noexist1> is a dangling link. +1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_423.txt b/tools/h5diff/testfiles/h5diff_423.txt index 5eb6766..1ebc157 100644 --- a/tools/h5diff/testfiles/h5diff_423.txt +++ b/tools/h5diff/testfiles/h5diff_423.txt @@ -1,6 +1,6 @@ -dataset: </dset1> and </dset2> +dataset: </ext_link_to_slink1> and </dset2> size: [2x4] [2x4] -position dset1 dset2 difference +position ext_link_to_slink1 dset2 difference ------------------------------------------------------------ [ 0 1 ] 0 1 1 [ 0 2 ] 0 2 2 @@ -10,3 +10,4 @@ position dset1 dset2 difference [ 1 2 ] 0 3 3 [ 1 3 ] 0 4 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_424.txt b/tools/h5diff/testfiles/h5diff_424.txt index cd240cf..9099c41 100644 --- a/tools/h5diff/testfiles/h5diff_424.txt +++ b/tools/h5diff/testfiles/h5diff_424.txt @@ -1,6 +1,6 @@ -dataset: </dset2> and </dset1> +dataset: </dset2> and </ext_link_to_slink1> size: [2x4] [2x4] -position dset2 dset1 difference +position dset2 ext_link_to_slink1 difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 [ 0 2 ] 2 0 2 @@ -10,3 +10,4 @@ position dset2 dset1 difference [ 1 2 ] 3 0 3 [ 1 3 ] 4 0 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_425.txt b/tools/h5diff/testfiles/h5diff_425.txt index 5eb6766..03ceb78 100644 --- a/tools/h5diff/testfiles/h5diff_425.txt +++ b/tools/h5diff/testfiles/h5diff_425.txt @@ -1,6 +1,6 @@ -dataset: </dset1> and </dset2> +dataset: </ext_link_to_slink1> and </ext_link_to_slink2> size: [2x4] [2x4] -position dset1 dset2 difference +position ext_link_to_slink1 ext_link_to_slink2 difference ------------------------------------------------------------ [ 0 1 ] 0 1 1 [ 0 2 ] 0 2 2 @@ -10,3 +10,4 @@ position dset1 dset2 difference [ 1 2 ] 0 3 3 [ 1 3 ] 0 4 4 7 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_450.txt b/tools/h5diff/testfiles/h5diff_450.txt new file mode 100644 index 0000000..bf4f6e9 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_450.txt @@ -0,0 +1,35 @@ + +file1 file2 +--------------------------------------- + x x / + x x /dset1 + x x /dset2 + x x /ext_link1 + x x /ext_link2 + x x /ext_link3 + x x /ext_link4 + x x /soft_link1 + x x /soft_link2 + x x /soft_link3 + +group : </> and </> +0 differences found +dataset: </dset1> and </dset1> +0 differences found +dataset: </dset2> and </dset2> +0 differences found +dangling link: </ext_link1> and </ext_link1> +0 differences found +obj2 </ext_link2> is a dangling link. +1 differences found +obj1 </ext_link3> is a dangling link. +1 differences found +dangling link: </ext_link4> and </ext_link4> +0 differences found +dangling link: </soft_link1> and </soft_link1> +0 differences found +obj2 </soft_link2> is a dangling link. +1 differences found +obj1 </soft_link3> is a dangling link. +1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_451.txt b/tools/h5diff/testfiles/h5diff_451.txt new file mode 100644 index 0000000..0d30023 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_451.txt @@ -0,0 +1,28 @@ + +file1 file2 +--------------------------------------- + x x / + x x /dset1 + x x /dset2 + x x /ext_link1 + x x /ext_link2 + x x /ext_link3 + x x /ext_link4 + x x /soft_link1 + x x /soft_link2 + x x /soft_link3 + +group : </> and </> +0 differences found +dataset: </dset1> and </dset1> +0 differences found +dataset: </dset2> and </dset2> +0 differences found +Warning: </ext_link1> is a dangling link. +Warning: </ext_link2> is a dangling link. +Warning: </ext_link3> is a dangling link. +Warning: </ext_link4> is a dangling link. +Warning: </soft_link1> is a dangling link. +Warning: </soft_link2> is a dangling link. +Warning: </soft_link3> is a dangling link. +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_452.txt b/tools/h5diff/testfiles/h5diff_452.txt new file mode 100644 index 0000000..76e4457 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_452.txt @@ -0,0 +1,2 @@ +Error: --no-dangling-links must be used along with --follow-links option. +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_453.txt b/tools/h5diff/testfiles/h5diff_453.txt new file mode 100644 index 0000000..9c4d61b --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_453.txt @@ -0,0 +1,47 @@ + +file1 file2 +--------------------------------------- + x x / + x x /softlink_dset1_1 + x x /softlink_dset1_2 + x x /softlink_dset2 + x x /softlink_group1 + x x /softlink_group2 + x x /softlink_noexist + x x /target_dset1 + x x /target_dset2 + x x /target_group + x x /target_group/dset + +group : </> and </> +0 differences found +link : </softlink_dset1_1> and </softlink_dset1_1> +dataset: </softlink_dset1_1> and </softlink_dset1_1> +0 differences found +0 differences found +link : </softlink_dset1_2> and </softlink_dset1_2> +dataset: </softlink_dset1_2> and </softlink_dset1_2> +0 differences found +0 differences found +link : </softlink_dset2> and </softlink_dset2> +dataset: </softlink_dset2> and </softlink_dset2> +0 differences found +0 differences found +link : </softlink_group1> and </softlink_group1> +group : </softlink_group1> and </softlink_group1> +0 differences found +0 differences found +link : </softlink_group2> and </softlink_group2> +group : </softlink_group2> and </softlink_group2> +0 differences found +0 differences found +Warning: </softlink_noexist> is a dangling link. +dataset: </target_dset1> and </target_dset1> +0 differences found +dataset: </target_dset2> and </target_dset2> +0 differences found +group : </target_group> and </target_group> +0 differences found +dataset: </target_group/dset> and </target_group/dset> +0 differences found +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_454.txt b/tools/h5diff/testfiles/h5diff_454.txt new file mode 100644 index 0000000..dcc2e9c --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_454.txt @@ -0,0 +1,2 @@ +Warning: </softlink_noexist> is a dangling link. +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_455.txt b/tools/h5diff/testfiles/h5diff_455.txt new file mode 100644 index 0000000..dcc2e9c --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_455.txt @@ -0,0 +1,2 @@ +Warning: </softlink_noexist> is a dangling link. +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_456.txt b/tools/h5diff/testfiles/h5diff_456.txt new file mode 100644 index 0000000..f20e403 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_456.txt @@ -0,0 +1,32 @@ + +file1 file2 +--------------------------------------- + x x / + x x /ext_link_dset1 + x x /ext_link_dset2 + x x /ext_link_grp1 + x x /ext_link_grp2 + x x /ext_link_noexist1 + x x /ext_link_noexist2 + +group : </> and </> +0 differences found +external link: </ext_link_dset1> and </ext_link_dset1> +dataset: </ext_link_dset1> and </ext_link_dset1> +0 differences found +0 differences found +external link: </ext_link_dset2> and </ext_link_dset2> +dataset: </ext_link_dset2> and </ext_link_dset2> +0 differences found +0 differences found +external link: </ext_link_grp1> and </ext_link_grp1> +group : </ext_link_grp1> and </ext_link_grp1> +0 differences found +0 differences found +external link: </ext_link_grp2> and </ext_link_grp2> +group : </ext_link_grp2> and </ext_link_grp2> +0 differences found +0 differences found +Warning: </ext_link_noexist1> is a dangling link. +Warning: </ext_link_noexist2> is a dangling link. +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_457.txt b/tools/h5diff/testfiles/h5diff_457.txt new file mode 100644 index 0000000..762ccdc --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_457.txt @@ -0,0 +1,2 @@ +Warning: </ext_link_noexist1> is a dangling link. +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_458.txt b/tools/h5diff/testfiles/h5diff_458.txt new file mode 100644 index 0000000..067d665 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_458.txt @@ -0,0 +1,2 @@ +Warning: </ext_link_noexist2> is a dangling link. +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_459.txt b/tools/h5diff/testfiles/h5diff_459.txt new file mode 100644 index 0000000..762ccdc --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_459.txt @@ -0,0 +1,2 @@ +Warning: </ext_link_noexist1> is a dangling link. +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_50.txt b/tools/h5diff/testfiles/h5diff_50.txt index 65b563c..434b458 100644 --- a/tools/h5diff/testfiles/h5diff_50.txt +++ b/tools/h5diff/testfiles/h5diff_50.txt @@ -10,3 +10,4 @@ position dset0a dset0b difference [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_51.txt b/tools/h5diff/testfiles/h5diff_51.txt index e6402cc..621ba2a 100644 --- a/tools/h5diff/testfiles/h5diff_51.txt +++ b/tools/h5diff/testfiles/h5diff_51.txt @@ -7,3 +7,4 @@ position dset1a dset1b difference [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_52.txt b/tools/h5diff/testfiles/h5diff_52.txt index 88febb9..6667659 100644 --- a/tools/h5diff/testfiles/h5diff_52.txt +++ b/tools/h5diff/testfiles/h5diff_52.txt @@ -7,3 +7,4 @@ position dset2a dset2b difference [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_53.txt b/tools/h5diff/testfiles/h5diff_53.txt index 554d71a..458d166 100644 --- a/tools/h5diff/testfiles/h5diff_53.txt +++ b/tools/h5diff/testfiles/h5diff_53.txt @@ -7,3 +7,4 @@ position dset3a dset4b difference [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_54.txt b/tools/h5diff/testfiles/h5diff_54.txt index 1e8adfd..2ca60f8 100644 --- a/tools/h5diff/testfiles/h5diff_54.txt +++ b/tools/h5diff/testfiles/h5diff_54.txt @@ -7,3 +7,4 @@ position dset4a dset4b difference [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_55.txt b/tools/h5diff/testfiles/h5diff_55.txt index f895955..1288887 100644 --- a/tools/h5diff/testfiles/h5diff_55.txt +++ b/tools/h5diff/testfiles/h5diff_55.txt @@ -7,3 +7,4 @@ position dset5a dset5b difference [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_56.txt b/tools/h5diff/testfiles/h5diff_56.txt index 402db43..0e82860 100644 --- a/tools/h5diff/testfiles/h5diff_56.txt +++ b/tools/h5diff/testfiles/h5diff_56.txt @@ -7,3 +7,4 @@ position dset6a dset6b difference [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_57.txt b/tools/h5diff/testfiles/h5diff_57.txt index a026077..61aaa57 100644 --- a/tools/h5diff/testfiles/h5diff_57.txt +++ b/tools/h5diff/testfiles/h5diff_57.txt @@ -8,3 +8,4 @@ Not comparable: </dset7a> has sign H5T_SGN_2 and </dset7b> has sign H5T_SGN_NONE Some objects are not comparable -------------------------------- Use -c for a list of objects. +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_58.txt b/tools/h5diff/testfiles/h5diff_58.txt index c46cad3..768dd97 100644 --- a/tools/h5diff/testfiles/h5diff_58.txt +++ b/tools/h5diff/testfiles/h5diff_58.txt @@ -8,3 +8,4 @@ point #1 (2,2) (3,3) point #3 (1,6) (2,5) point #4 (2,8) (1,7) 4 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_600.txt b/tools/h5diff/testfiles/h5diff_600.txt index 376e530..f76d4d5 100644 --- a/tools/h5diff/testfiles/h5diff_600.txt +++ b/tools/h5diff/testfiles/h5diff_600.txt @@ -3,65 +3,100 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -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 Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file h5diff error: missing file names +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_603.txt b/tools/h5diff/testfiles/h5diff_603.txt index f8a858d..a5286df 100644 --- a/tools/h5diff/testfiles/h5diff_603.txt +++ b/tools/h5diff/testfiles/h5diff_603.txt @@ -4,64 +4,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -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 Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_604.txt b/tools/h5diff/testfiles/h5diff_604.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_604.txt +++ b/tools/h5diff/testfiles/h5diff_604.txt @@ -1,2 +1,3 @@ dataset: </g1/dset3> and </g1/dset4> 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_605.txt b/tools/h5diff/testfiles/h5diff_605.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_605.txt +++ b/tools/h5diff/testfiles/h5diff_605.txt @@ -1,2 +1,3 @@ dataset: </g1/dset3> and </g1/dset4> 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_606.txt b/tools/h5diff/testfiles/h5diff_606.txt index ab317bd..ab8039e 100644 --- a/tools/h5diff/testfiles/h5diff_606.txt +++ b/tools/h5diff/testfiles/h5diff_606.txt @@ -4,64 +4,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -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 Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_607.txt b/tools/h5diff/testfiles/h5diff_607.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_607.txt +++ b/tools/h5diff/testfiles/h5diff_607.txt @@ -1,2 +1,3 @@ dataset: </g1/dset3> and </g1/dset4> 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_608.txt b/tools/h5diff/testfiles/h5diff_608.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_608.txt +++ b/tools/h5diff/testfiles/h5diff_608.txt @@ -1,2 +1,3 @@ dataset: </g1/dset3> and </g1/dset4> 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_609.txt b/tools/h5diff/testfiles/h5diff_609.txt index e69de29..eca5994 100644 --- a/tools/h5diff/testfiles/h5diff_609.txt +++ b/tools/h5diff/testfiles/h5diff_609.txt @@ -0,0 +1 @@ +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_610.txt b/tools/h5diff/testfiles/h5diff_610.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_610.txt +++ b/tools/h5diff/testfiles/h5diff_610.txt @@ -1,2 +1,3 @@ dataset: </g1/dset3> and </g1/dset4> 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_612.txt b/tools/h5diff/testfiles/h5diff_612.txt index 875e17e..686ff15 100644 --- a/tools/h5diff/testfiles/h5diff_612.txt +++ b/tools/h5diff/testfiles/h5diff_612.txt @@ -4,64 +4,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -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 Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_613.txt b/tools/h5diff/testfiles/h5diff_613.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_613.txt +++ b/tools/h5diff/testfiles/h5diff_613.txt @@ -1,2 +1,3 @@ dataset: </g1/dset3> and </g1/dset4> 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_614.txt b/tools/h5diff/testfiles/h5diff_614.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_614.txt +++ b/tools/h5diff/testfiles/h5diff_614.txt @@ -1,2 +1,3 @@ dataset: </g1/dset3> and </g1/dset4> 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_615.txt b/tools/h5diff/testfiles/h5diff_615.txt index 258124a..cf779c5 100644 --- a/tools/h5diff/testfiles/h5diff_615.txt +++ b/tools/h5diff/testfiles/h5diff_615.txt @@ -4,64 +4,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -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 Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_616.txt b/tools/h5diff/testfiles/h5diff_616.txt index 47a1364..3bc194a 100644 --- a/tools/h5diff/testfiles/h5diff_616.txt +++ b/tools/h5diff/testfiles/h5diff_616.txt @@ -1,2 +1,3 @@ dataset: </g1/dset3> and </g1/dset4> 2 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_617.txt b/tools/h5diff/testfiles/h5diff_617.txt index 47a1364..3bc194a 100644 --- a/tools/h5diff/testfiles/h5diff_617.txt +++ b/tools/h5diff/testfiles/h5diff_617.txt @@ -1,2 +1,3 @@ dataset: </g1/dset3> and </g1/dset4> 2 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_618.txt b/tools/h5diff/testfiles/h5diff_618.txt index e69de29..eca5994 100644 --- a/tools/h5diff/testfiles/h5diff_618.txt +++ b/tools/h5diff/testfiles/h5diff_618.txt @@ -0,0 +1 @@ +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_619.txt b/tools/h5diff/testfiles/h5diff_619.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_619.txt +++ b/tools/h5diff/testfiles/h5diff_619.txt @@ -1,2 +1,3 @@ dataset: </g1/dset3> and </g1/dset4> 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_621.txt b/tools/h5diff/testfiles/h5diff_621.txt index 1fd7f08..041bb7b 100644 --- a/tools/h5diff/testfiles/h5diff_621.txt +++ b/tools/h5diff/testfiles/h5diff_621.txt @@ -4,64 +4,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -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 Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_622.txt b/tools/h5diff/testfiles/h5diff_622.txt index bf15c2a..923bab5 100644 --- a/tools/h5diff/testfiles/h5diff_622.txt +++ b/tools/h5diff/testfiles/h5diff_622.txt @@ -4,64 +4,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -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 Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_623.txt b/tools/h5diff/testfiles/h5diff_623.txt index 5186dcc..405a211 100644 --- a/tools/h5diff/testfiles/h5diff_623.txt +++ b/tools/h5diff/testfiles/h5diff_623.txt @@ -4,64 +4,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -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 Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_624.txt b/tools/h5diff/testfiles/h5diff_624.txt index d646a25..dc7c83b 100644 --- a/tools/h5diff/testfiles/h5diff_624.txt +++ b/tools/h5diff/testfiles/h5diff_624.txt @@ -4,64 +4,99 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path [obj2] Name of an HDF5 object, in absolute path + OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit - -r, --report Report mode. Print differences - -v, --verbose Verbose mode. Print differences, list of objects - -q, --quiet Quiet mode. Do not do output - -l, --link-follow Follow link(s) + -h, --help Print a usage message and exit. + -V, --version Print version number and exit. + -r, --report Report mode. Print differences. + -v, --verbose Verbose mode. Print differences, list of objects. + -q, --quiet Quiet mode. Do not produce output. + --follow-links Follow symbolic links (soft links and external links) + and compare the links' target objects. + If symbolic link(s) with the same name exist in the + files being compared, then determine whether the + target of each link is an existing object (dataset, + group, or named datatype) or the link is a dangling + link (a soft or external link pointing to a target + object that does not yet exist). + - If both symbolic links are dangling links, they + are treated as being the same; by default, h5diff + returns an exit code of 0. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If only one of the two links is a dangling link, + they are treated as being different and h5diff + returns an exit code of 1. If, however, + --no-dangling-links is used with --follow-links, + this situation is treated as an error and h5diff + returns an exit code of 2. + - If both symbolic links point to existing objects, + h5diff compares the two objects. + If any symbolic link specified in the call to h5diff + does not exist, h5diff treats it as an error and + returns an exit code of 2. + --no-dangling-links Must be used with --follow-links option; + otherwise, h5diff shows error message and returns + an exit code of 2. + Check for any symbolic links (soft links or external + links) that do not resolve to an existing object + (dataset, group, or named datatype). If any + dangling link is found, this situation is treated as + an error and h5diff returns an exit code of 2. -c, --compare List objects that are not comparable -N, --nan Avoid NaNs detection - -n C, --count=C Print differences up to C number, C is a positive integer. - -d D, --delta=D Print difference if (|a-b| > D), D is a positive number. - -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. + -n C, --count=C Print differences up to C number, C is a positive + integer. + -d D, --delta=D Print difference if (|a-b| > D), D is a positive + number. + -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive + number. --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the system epsilon value. - If the system epsilon is not defined, use the value below: + where EPSILON (FLT_EPSILON or FLT_EPSILON) is the + system epsilon value. + If the system epsilon is not defined, use the value + below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for comparing floating point values. - By default, strict equality is used. Use -p or -d to set specific tolerance. + -d, -p, and --use-system-epsilon options are used for + comparing floating point values. + By default, strict equality is used. Use -p or -d to + set specific tolerance. Modes of output: - Default mode: print the number of differences found and where they occured -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 Compare criteria - - If no objects [obj1[obj2]] are specified, h5diff only compares objects - with the same absolute path in both files + If no objects [obj1[obj2]] are specified, h5diff only compares objects + with the same absolute path in both files The compare criteria is: - 1) datasets: numerical array differences 2) groups: name string difference - 3) datatypes: the return value of H5Tequal 4) links: name string difference - of the linked value + 1) datasets: numerical array differences + 2) groups: name string difference + 3) datatypes: the return value of H5Tequal + 4) links: name string difference of the linked value as default + (refer to --follow-links option). - Return exit code: - - 1 if differences found, 0 if no differences, 2 if error + Exit code: + 0 if no differences, 1 if differences found, 2 if error Examples of use: - 1) h5diff file1 file2 /g1/dset1 /g1/dset2 - Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 2) h5diff file1 file2 /g1/dset1 - Compares object '/g1/dset1' in both files 3) h5diff file1 file2 - Compares all objects in both files - Note) file1 and file2 can be the same file. Use - - h5diff file1 file1 /g1/dset1 /g1/dset2 - - to compare '/g1/dset1' and '/g1/dset2' in the same file + Notes: + file1 and file2 can be the same file. + Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare + '/g1/dset1' and '/g1/dset2' in the same file +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_625.txt b/tools/h5diff/testfiles/h5diff_625.txt index 47a1364..3bc194a 100644 --- a/tools/h5diff/testfiles/h5diff_625.txt +++ b/tools/h5diff/testfiles/h5diff_625.txt @@ -1,2 +1,3 @@ dataset: </g1/dset3> and </g1/dset4> 2 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_626.txt b/tools/h5diff/testfiles/h5diff_626.txt index be392ae..6494066 100644 --- a/tools/h5diff/testfiles/h5diff_626.txt +++ b/tools/h5diff/testfiles/h5diff_626.txt @@ -1,2 +1,3 @@ dataset: </g1/dset3> and </g1/dset4> 3 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_627.txt b/tools/h5diff/testfiles/h5diff_627.txt index 554f2ed..db14532 100644 --- a/tools/h5diff/testfiles/h5diff_627.txt +++ b/tools/h5diff/testfiles/h5diff_627.txt @@ -1,2 +1,3 @@ dataset: </g1/dset3> and </g1/dset4> 6 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_628.txt b/tools/h5diff/testfiles/h5diff_628.txt index 74decda..e11d8ee 100644 --- a/tools/h5diff/testfiles/h5diff_628.txt +++ b/tools/h5diff/testfiles/h5diff_628.txt @@ -1,2 +1,3 @@ dataset: </g1/dset3> and </g1/dset4> 1 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_629.txt b/tools/h5diff/testfiles/h5diff_629.txt index 4e67f57..962c2b0 100644 --- a/tools/h5diff/testfiles/h5diff_629.txt +++ b/tools/h5diff/testfiles/h5diff_629.txt @@ -1 +1,2 @@ h5diff: <file1.h6>: unable to open file +EXIT CODE: 2 diff --git a/tools/h5diff/testfiles/h5diff_70.txt b/tools/h5diff/testfiles/h5diff_70.txt index 30dbefe..7abcddd 100644 --- a/tools/h5diff/testfiles/h5diff_70.txt +++ b/tools/h5diff/testfiles/h5diff_70.txt @@ -2029,3 +2029,4 @@ position float3D of </g1> float3D of </g1> difference Some objects are not comparable -------------------------------- Use -c for a list of objects. +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_80.txt b/tools/h5diff/testfiles/h5diff_80.txt index 33090df..1c55b1a 100644 --- a/tools/h5diff/testfiles/h5diff_80.txt +++ b/tools/h5diff/testfiles/h5diff_80.txt @@ -878,3 +878,4 @@ point #4 (2,8) (1,7) Some objects are not comparable -------------------------------- Use -c for a list of objects. +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_90.txt b/tools/h5diff/testfiles/h5diff_90.txt index e6bfa14..fb23843 100644 --- a/tools/h5diff/testfiles/h5diff_90.txt +++ b/tools/h5diff/testfiles/h5diff_90.txt @@ -53,3 +53,4 @@ Not comparable: </g2/dset9> or </g2/dset9> is an empty dataset Some objects are not comparable -------------------------------- Use -c for a list of objects. +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_danglelinks1.h5 b/tools/h5diff/testfiles/h5diff_danglelinks1.h5 Binary files differnew file mode 100644 index 0000000..8cbaac1 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_danglelinks1.h5 diff --git a/tools/h5diff/testfiles/h5diff_danglelinks2.h5 b/tools/h5diff/testfiles/h5diff_danglelinks2.h5 Binary files differnew file mode 100644 index 0000000..f634210 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_danglelinks2.h5 diff --git a/tools/h5diff/testfiles/h5diff_idx.txt b/tools/h5diff/testfiles/h5diff_idx.txt index 4169afb..754d3ea 100644 --- a/tools/h5diff/testfiles/h5diff_idx.txt +++ b/tools/h5diff/testfiles/h5diff_idx.txt @@ -11,3 +11,4 @@ dataset: </dset> and </dset> 0 differences found dataset: </dset_filter> and </dset_filter> 0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh index 247e3e1..1ed6f88 100755 --- a/tools/h5diff/testh5diff.sh +++ b/tools/h5diff/testh5diff.sh @@ -23,6 +23,11 @@ # Pedro Vicente Nunes: # 10/25/2005: Added test #9 # 11/27/2006: Added test #10, #11 +# Jonathan Kim: +# Improved to use single line +# Improved to check exit code (only serial mode, not necessary for parallel) +# Added test 400 - 425 (links with --follow-links option) +# Added test 450 - 459 (dangling links) ############################################################################### @@ -49,6 +54,8 @@ FILE17=h5diff_ext2softlink_src.h5 FILE18=h5diff_ext2softlink_trg.h5 FILE19=h5diff_dset_idx1.h5 FILE20=h5diff_dset_idx2.h5 +DANGLE_LINK_FILE1=h5diff_danglelinks1.h5 +DANGLE_LINK_FILE2=h5diff_danglelinks2.h5 TESTNAME=h5diff EXIT_SUCCESS=0 @@ -194,9 +201,9 @@ TOOLTEST() { actual_err_sav=${actual_err}-sav shift if test -n "$pmode"; then - RUNCMD=$RUNPARALLEL + RUNCMD=$RUNPARALLEL else - RUNCMD=$RUNSERIAL + RUNCMD=$RUNSERIAL fi # Run test. @@ -208,32 +215,44 @@ TOOLTEST() { cd $srcdir/testfiles eval $RUNCMD $H5DIFF_BIN "$@" ) >$actual 2>$actual_err + EXIT_CODE=$? # save actual and actual_err in case they are needed later. cp $actual $actual_sav STDOUT_FILTER $actual cp $actual_err $actual_err_sav STDERR_FILTER $actual_err cat $actual_err >> $actual + # don't add exit code check in pmode, as it causes failure. (exit code + # is from mpirun not tool) + # if any problem occurs relate to an exit code, it will be caught in + # serial mode, so the test is fullfilled. + if test -z "$pmode"; then + echo "EXIT CODE: $EXIT_CODE" >> $actual + fi if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. + # Create the expect file if it doesn't yet exist. echo " CREATED" - cp $actual $expect + cp $actual $expect elif $CMP $expect $actual; then - echo " PASSED" + echo " PASSED" elif test -z "$pmode"; then - echo "*FAILED*" - echo " Expected result ($expect) differs from actual result ($actual)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + echo "*FAILED*" + echo " Expected result ($expect) differs from actual result ($actual)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' else - # parallel mode output are often of different ordering from serial - # output. If the sorted expected and actual files compare the same, - # it is safe to assume the actual output match the expected file. - expect_sorted=expect_sorted - actual_sorted=actual_sorted - sort $expect -o $expect_sorted - sort $actual -o $actual_sorted + # parallel mode output are often of different ordering from serial + # output. If the sorted expected and actual files compare the same, + # it is safe to assume the actual output match the expected file. + expect_sorted=expect_sorted + actual_sorted=actual_sorted + sort $expect -o $expect_sorted + sort $actual -o $actual_sorted + # remove "EXIT CODE:" line from expect file. test for exit code + # is done by serial mode. + grep -v "EXIT CODE:" $expect_sorted > $expect_sorted.noexit + mv $expect_sorted.noexit $expect_sorted if $CMP $expect_sorted $actual_sorted; then echo " PASSED" else @@ -267,6 +286,7 @@ SKIP() { } + ############################################################################## # The tests # To avoid the printing of the complete full path of the test file, that hides @@ -310,15 +330,17 @@ TOOLTEST h5diff_16_3.txt -v -p 0.02 $FILE1 $FILE1 g1/dset9 g1/dset10 # 1.7 verbose mode TOOLTEST h5diff_17.txt -v $FILE1 $FILE2 -# 1.8 test 32-bit INFINITY +# 1.7 test 32-bit INFINITY TOOLTEST h5diff_171.txt -v $FILE1 $FILE1 /g1/fp19 -# 1.8 test 64-bit INFINITY +# 1.7 test 64-bit INFINITY TOOLTEST h5diff_172.txt -v $FILE1 $FILE1 /g1/fp20 # 1.8 quiet mode TOOLTEST h5diff_18.txt -q $FILE1 $FILE2 +# 1.8 -v and -q +TOOLTEST h5diff_18_1.txt -v -q $FILE1 $FILE2 # ############################################################################## @@ -538,133 +560,91 @@ TOOLTEST h5diff_206.txt -c $FILE2 $FILE2 g2/dset7 g2/dset8 TOOLTEST h5diff_207.txt -c $FILE2 $FILE2 g2/dset8 g2/dset9 # ############################################################################## -# # Links compare without -l (link follow) +# # Links compare without --follow-links nor --no-dangling-links # ############################################################################## # test for bug1749 TOOLTEST h5diff_300.txt -v $FILE12 $FILE12 /link_g1 /link_g2 # ############################################################################## -# # Links compare with -l (link follow) +# # Links compare with --follow-links Only # ############################################################################## # soft links file to file -TOOLTEST h5diff_400.txt -l -v $FILE13 $FILE13 +TOOLTEST h5diff_400.txt --follow-links -v $FILE13 $FILE13 # softlink vs dset" -TOOLTEST h5diff_401.txt -l -v $FILE13 $FILE13 /softlink_dset1_1 /target_dset2 - +TOOLTEST h5diff_401.txt --follow-links -v $FILE13 $FILE13 /softlink_dset1_1 /target_dset2 # dset vs softlink" -TOOLTEST h5diff_402.txt -l -v $FILE13 $FILE13 /target_dset2 /softlink_dset1_1 - +TOOLTEST h5diff_402.txt --follow-links -v $FILE13 $FILE13 /target_dset2 /softlink_dset1_1 # softlink vs softlink" -TOOLTEST h5diff_403.txt -l -v $FILE13 $FILE13 /softlink_dset1_1 /softlink_dset2 - +TOOLTEST h5diff_403.txt --follow-links -v $FILE13 $FILE13 /softlink_dset1_1 /softlink_dset2 # extlink vs extlink (FILE)" -if test -n "$pmode"; then - # TODO: Skip below test due to hang in prarllel mode - echo "Skip below test due to hang in prarllel mode" - SKIP -l -v $FILE15 $FILE15 -else - TOOLTEST h5diff_404.txt -l -v $FILE15 $FILE15 -fi - +TOOLTEST h5diff_404.txt --follow-links -v $FILE15 $FILE15 # extlink vs dset" -TOOLTEST h5diff_405.txt -l -v $FILE15 $FILE16 /ext_link_dset1 /target_group2/x_dset - +TOOLTEST h5diff_405.txt --follow-links -v $FILE15 $FILE16 /ext_link_dset1 /target_group2/x_dset # dset vs extlink" -TOOLTEST h5diff_406.txt -l -v $FILE16 $FILE15 /target_group2/x_dset /ext_link_dset1 - +TOOLTEST h5diff_406.txt --follow-links -v $FILE16 $FILE15 /target_group2/x_dset /ext_link_dset1 # extlink vs extlink" -TOOLTEST h5diff_407.txt -l -v $FILE15 $FILE15 /ext_link_dset1 /ext_link_dset2 - +TOOLTEST h5diff_407.txt --follow-links -v $FILE15 $FILE15 /ext_link_dset1 /ext_link_dset2 # softlink vs extlink" -TOOLTEST h5diff_408.txt -l -v $FILE13 $FILE15 /softlink_dset1_1 /ext_link_dset2 - +TOOLTEST h5diff_408.txt --follow-links -v $FILE13 $FILE15 /softlink_dset1_1 /ext_link_dset2 # extlink vs softlink " -TOOLTEST h5diff_409.txt -l -v $FILE15 $FILE13 /ext_link_dset2 /softlink_dset1_1 - +TOOLTEST h5diff_409.txt --follow-links -v $FILE15 $FILE13 /ext_link_dset2 /softlink_dset1_1 # linked_softlink vs linked_softlink (FILE)" -TOOLTEST h5diff_410.txt -l -v $FILE14 $FILE14 - +TOOLTEST h5diff_410.txt --follow-links -v $FILE14 $FILE14 # dset2 vs linked_softlink_dset1" -TOOLTEST h5diff_411.txt -l -v $FILE14 $FILE14 /target_dset2 /softlink1_to_slink2 - +TOOLTEST h5diff_411.txt --follow-links -v $FILE14 $FILE14 /target_dset2 /softlink1_to_slink2 # linked_softlink_dset1 vs dset2" -TOOLTEST h5diff_412.txt -l -v $FILE14 $FILE14 /softlink1_to_slink2 /target_dset2 - +TOOLTEST h5diff_412.txt --follow-links -v $FILE14 $FILE14 /softlink1_to_slink2 /target_dset2 # linked_softlink_to_dset1 vs linked_softlink_to_dset2" -TOOLTEST h5diff_413.txt -l -v $FILE14 $FILE14 /softlink1_to_slink2 /softlink2_to_slink2 - +TOOLTEST h5diff_413.txt --follow-links -v $FILE14 $FILE14 /softlink1_to_slink2 /softlink2_to_slink2 # group vs linked_softlink_group1" -TOOLTEST h5diff_414.txt -l -v $FILE14 $FILE14 /target_group /softlink3_to_slink2 - +TOOLTEST h5diff_414.txt --follow-links -v $FILE14 $FILE14 /target_group /softlink3_to_slink2 # linked_softlink_group1 vs group" -TOOLTEST h5diff_415.txt -l -v $FILE14 $FILE14 /softlink3_to_slink2 /target_group - +TOOLTEST h5diff_415.txt --follow-links -v $FILE14 $FILE14 /softlink3_to_slink2 /target_group # linked_softlink_to_group1 vs linked_softlink_to_group2" -TOOLTEST h5diff_416.txt -l -v $FILE14 $FILE14 /softlink3_to_slink2 /softlink4_to_slink2 - +TOOLTEST h5diff_416.txt --follow-links -v $FILE14 $FILE14 /softlink3_to_slink2 /softlink4_to_slink2 # non-exist-softlink vs softlink" -TOOLTEST h5diff_417.txt -l -v $FILE13 $FILE13 /softlink_noexist /softlink_dset2 - +TOOLTEST h5diff_417.txt --follow-links -v $FILE13 $FILE13 /softlink_noexist /softlink_dset2 # softlink vs non-exist-softlink" -TOOLTEST h5diff_418.txt -l -v $FILE13 $FILE13 /softlink_dset2 /softlink_noexist - +TOOLTEST h5diff_418.txt --follow-links -v $FILE13 $FILE13 /softlink_dset2 /softlink_noexist # non-exist-extlink_file vs extlink" -if test -n "$pmode"; then - # TODO: Skip below test due to hang in prarllel mode - echo "Skip below test due to hang in prarllel mode" - SKIP -l -v $FILE15 $FILE15 /ext_link_noexist2 /ext_link_dset2 -else - TOOLTEST h5diff_419.txt -l -v $FILE15 $FILE15 /ext_link_noexist2 /ext_link_dset2 -fi - +TOOLTEST h5diff_419.txt --follow-links -v $FILE15 $FILE15 /ext_link_noexist2 /ext_link_dset2 # exlink vs non-exist-extlink_file" -if test -n "$pmode"; then - # TODO: Skip below test due to hang in prarllel mode - echo "Skip below test due to hang in prarllel mode" - SKIP -l -v $FILE15 $FILE15 /ext_link_dset2 /ext_link_noexist2 -else - TOOLTEST h5diff_420.txt -l -v $FILE15 $FILE15 /ext_link_dset2 /ext_link_noexist2 -fi - +TOOLTEST h5diff_420.txt --follow-links -v $FILE15 $FILE15 /ext_link_dset2 /ext_link_noexist2 # extlink vs non-exist-extlink_obj" -TOOLTEST h5diff_421.txt -l -v $FILE15 $FILE15 /ext_link_dset2 /ext_link_noexist1 - +TOOLTEST h5diff_421.txt --follow-links -v $FILE15 $FILE15 /ext_link_dset2 /ext_link_noexist1 # non-exist-extlink_obj vs extlink" -TOOLTEST h5diff_422.txt -l -v $FILE15 $FILE15 /ext_link_noexist1 /ext_link_dset2 - +TOOLTEST h5diff_422.txt --follow-links -v $FILE15 $FILE15 /ext_link_noexist1 /ext_link_dset2 # extlink_to_softlink_to_dset1 vs dset2" -TOOLTEST h5diff_423.txt -l -v $FILE17 $FILE18 /ext_link_to_slink1 /dset2 - +TOOLTEST h5diff_423.txt --follow-links -v $FILE17 $FILE18 /ext_link_to_slink1 /dset2 # dset2 vs extlink_to_softlink_to_dset1" -TOOLTEST h5diff_424.txt -l -v $FILE18 $FILE17 /dset2 /ext_link_to_slink1 - +TOOLTEST h5diff_424.txt --follow-links -v $FILE18 $FILE17 /dset2 /ext_link_to_slink1 # extlink_to_softlink_to_dset1 vs extlink_to_softlink_to_dset2" -TOOLTEST h5diff_425.txt -l -v $FILE17 $FILE17 /ext_link_to_slink1 /ext_link_to_slink2 +TOOLTEST h5diff_425.txt --follow-links -v $FILE17 $FILE17 /ext_link_to_slink1 /ext_link_to_slink2 # ############################################################################## # 19. The comparision for the two datasets between the 2 files should be the same @@ -673,6 +653,39 @@ TOOLTEST h5diff_425.txt -l -v $FILE17 $FILE17 /ext_link_to_slink1 /ext_link_to_s # ############################################################################## TOOLTEST h5diff_idx.txt -v $FILE19 $FILE20 +# ############################################################################## +# # Dangling links compare (--follow-links and --no-dangling-links) +# ############################################################################## +# dangling links --follow-links (FILE to FILE) +TOOLTEST h5diff_450.txt --follow-links -v $DANGLE_LINK_FILE1 $DANGLE_LINK_FILE2 + +# dangling links --follow-links and --no-dangling-links (FILE to FILE) +TOOLTEST h5diff_451.txt --follow-links -v --no-dangling-links $DANGLE_LINK_FILE1 $DANGLE_LINK_FILE2 + +# try --no-dangling-links without --follow-links options +TOOLTEST h5diff_452.txt --no-dangling-links $FILE13 $FILE13 + +# dangling link found for soft links (FILE to FILE) +TOOLTEST h5diff_453.txt --follow-links -v --no-dangling-links $FILE13 $FILE13 + +# dangling link found for soft links (obj to obj) +TOOLTEST h5diff_454.txt --follow-links -v --no-dangling-links $FILE13 $FILE13 /softlink_dset2 /softlink_noexist + +# dangling link found for soft links (obj to obj) Both dangle links +TOOLTEST h5diff_455.txt --follow-links -v --no-dangling-links $FILE13 $FILE13 /softlink_noexist /softlink_noexist + +# dangling link found for ext links (FILE to FILE) +TOOLTEST h5diff_456.txt --follow-links -v --no-dangling-links $FILE15 $FILE15 + +# dangling link found for ext links (obj to obj). target file exist +TOOLTEST h5diff_457.txt --follow-links -v --no-dangling-links $FILE15 $FILE15 /ext_link_dset1 /ext_link_noexist1 + +# dangling link found for ext links (obj to obj). target file NOT exist +TOOLTEST h5diff_458.txt --follow-links -v --no-dangling-links $FILE15 $FILE15 /ext_link_dset1 /ext_link_noexist2 + +# dangling link found for ext links (obj to obj). Both dangle links +TOOLTEST h5diff_459.txt --follow-links -v --no-dangling-links $FILE15 $FILE15 /ext_link_noexist1 /ext_link_noexist2 + # ############################################################################## # # END |