summaryrefslogtreecommitdiffstats
path: root/tools/h5diff/h5diffgentest.c
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2012-04-26 15:56:16 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2012-04-26 15:56:16 (GMT)
commit1b35c60118c2f48ee9022a667aa9ed31c191af80 (patch)
treed9667613622d0d004b95c7f3929c52c8b4648236 /tools/h5diff/h5diffgentest.c
parent8c138d7844935a882c70f1db20c691c9a04b38af (diff)
downloadhdf5-1b35c60118c2f48ee9022a667aa9ed31c191af80.zip
hdf5-1b35c60118c2f48ee9022a667aa9ed31c191af80.tar.gz
hdf5-1b35c60118c2f48ee9022a667aa9ed31c191af80.tar.bz2
[svn-r22319] Purpose:
Fix for HDFFV-7998-h5diff: incorrect behavior and output for comparing symbolic dangling links without following-symlinks option Description: Fix not to check and display dangling link status without --follow-symlinks option. Berfor the fix, when comparing symbolic link to symbolic link without follow-symlinks option, h5diff followed to check if those links are dangling or not. It caused to display output incorrectly (dangling link instead of symbolic link). The fix also improved performance when comparing lots of symbolic links without the --follow-symlinks option. Test cases were added and tagged with jira#. Tested: jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Windows (32-LE cmake), Cmake (jam)
Diffstat (limited to 'tools/h5diff/h5diffgentest.c')
-rw-r--r--tools/h5diff/h5diffgentest.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index 0b8b4cf..c370f79 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -2181,6 +2181,14 @@ static int test_dangle_links(const char *fname1, const char *fname2)
goto out;
}
+ status = H5Lcreate_soft("no_obj1", fid1, "soft_link4", 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)
@@ -2206,6 +2214,14 @@ static int test_dangle_links(const char *fname1, const char *fname2)
goto out;
}
+ status = H5Lcreate_soft("no_obj2", fid2, "soft_link4", H5P_DEFAULT, H5P_DEFAULT);
+ if (status < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2);
+ status = FAIL;
+ goto out;
+ }
+
/*-----------------------------------------------------------------------
* External Links
*------------------------------------------------------------------------*/
@@ -2234,7 +2250,7 @@ static int test_dangle_links(const char *fname1, const char *fname2)
goto out;
}
- status = H5Lcreate_external("no_file1.h5", "no_obj", fid1, "ext_link4", H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Lcreate_external("no_file.h5", "no_obj", fid1, "ext_link4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1);
@@ -2267,7 +2283,7 @@ static int test_dangle_links(const char *fname1, const char *fname2)
goto out;
}
- status = H5Lcreate_external("no_file2.h5", "no_obj", fid2, "ext_link4", H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Lcreate_external("no_file.h5", "no_obj", fid2, "ext_link4", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2);