summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/h5diff/CMakeLists.txt7
-rw-r--r--tools/h5diff/testfiles/h5diff_465.txt2
-rwxr-xr-xtools/h5diff/testh5diff.sh4
-rw-r--r--tools/lib/h5diff.c24
4 files changed, 26 insertions, 11 deletions
diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt
index cbb5ed3..1fa1cf3 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -130,6 +130,7 @@ IF (BUILD_TESTING)
h5diff_457.txt
h5diff_458.txt
h5diff_459.txt
+ h5diff_465.txt
h5diff_480.txt
h5diff_481.txt
h5diff_482.txt
@@ -655,6 +656,8 @@ IF (BUILD_TESTING)
h5diff_458.out.err
h5diff_459.out
h5diff_459.out.err
+ h5diff_465.out
+ h5diff_465.out.err
h5diff_480.out
h5diff_480.out.err
h5diff_481.out
@@ -1262,6 +1265,10 @@ ADD_H5_TEST (h5diff_458 2 --follow-symlinks -v --no-dangling-links ${FILE15} $
# dangling link found for ext links (obj to obj). Both dangle links
ADD_H5_TEST (h5diff_459 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_noexist1 /ext_link_noexist2)
+# dangling link --follow-symlinks (obj vs obj)
+# (HDFFV-7836)
+ADD_H5_TEST (h5diff_465 1 --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1)
+
# ##############################################################################
# # test for group diff recursivly
# ##############################################################################
diff --git a/tools/h5diff/testfiles/h5diff_465.txt b/tools/h5diff/testfiles/h5diff_465.txt
new file mode 100644
index 0000000..827e88e
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_465.txt
@@ -0,0 +1,2 @@
+1 differences found
+EXIT CODE: 1
diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh
index 8de12a5..aa0f502 100755
--- a/tools/h5diff/testh5diff.sh
+++ b/tools/h5diff/testh5diff.sh
@@ -200,6 +200,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_456.txt
$SRC_H5DIFF_TESTFILES/h5diff_457.txt
$SRC_H5DIFF_TESTFILES/h5diff_458.txt
$SRC_H5DIFF_TESTFILES/h5diff_459.txt
+$SRC_H5DIFF_TESTFILES/h5diff_465.txt
$SRC_H5DIFF_TESTFILES/h5diff_480.txt
$SRC_H5DIFF_TESTFILES/h5diff_481.txt
$SRC_H5DIFF_TESTFILES/h5diff_482.txt
@@ -939,6 +940,9 @@ TOOLTEST h5diff_458.txt --follow-symlinks -v --no-dangling-links h5diff_extlin
# dangling link found for ext links (obj to obj). Both dangle links
TOOLTEST h5diff_459.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_noexist1 /ext_link_noexist2
+# dangling link --follow-symlinks (obj vs obj)
+# (HDFFV-7836)
+TOOLTEST h5diff_465.txt --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1
# ##############################################################################
# # test for group diff recursivly
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 6e9fee8..be20ed4 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -861,17 +861,6 @@ hsize_t h5diff(const char *fname1,
HDstrcat(obj2fullname, "/");
}
- /*
- * If verbose options is used, need to traverse thorugh the list of objects
- * in the group to print out objects information.
- * Use h5tools_is_obj_same() to improve performance by skipping
- * comparing details of same objects.
- */
- if(!(options->m_verbose || options->m_report))
- {
- if (h5tools_is_obj_same(file1_id,obj1fullname,file2_id,obj2fullname)!=0)
- goto out;
- }
/*---------------------------------------------
* check for following symlinks
@@ -949,6 +938,19 @@ hsize_t h5diff(const char *fname1,
obj2type = trg_linfo2.trg_type;
} /* end of if follow symlinks */
+ /*
+ * If verbose options is not used, don't need to traverse thorugh the list
+ * of objects in the group to display objects information,
+ * So use h5tools_is_obj_same() to improve performance by skipping
+ * comparing details of same objects.
+ */
+
+ if(!(options->m_verbose || options->m_report))
+ {
+ if (h5tools_is_obj_same(file1_id,obj1fullname,file2_id,obj2fullname)!=0)
+ goto out;
+ }
+
/* if both obj1 and obj2 are group */
if (obj1type == H5TRAV_TYPE_GROUP && obj2type == H5TRAV_TYPE_GROUP)