diff options
-rw-r--r-- | tools/h5dump/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tools/h5dump/h5dumpgentest.c | 5 | ||||
-rw-r--r-- | tools/testfiles/textlinkfar.ddl | 18 | ||||
-rw-r--r-- | tools/testfiles/textlinksrc-1-old.ls | 4 | ||||
-rw-r--r-- | tools/testfiles/textlinksrc-1.ls | 4 | ||||
-rw-r--r-- | tools/testfiles/textlinksrc-3-old.ls | 2 | ||||
-rw-r--r-- | tools/testfiles/textlinksrc-3.ls | 2 | ||||
-rw-r--r-- | tools/testfiles/textlinksrc-4.ls | 2 | ||||
-rw-r--r-- | tools/testfiles/textlinksrc-6-old.ls | 2 | ||||
-rw-r--r-- | tools/testfiles/textlinksrc-6.ls | 2 | ||||
-rw-r--r-- | tools/testfiles/textlinksrc-nodangle-2.ls | 2 | ||||
-rw-r--r-- | tools/testfiles/textlinksrc.ddl | 18 | ||||
-rw-r--r-- | tools/testfiles/textlinksrc.h5 | bin | 1104 -> 1224 bytes |
13 files changed, 62 insertions, 0 deletions
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 2010b5c..a02388a 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -251,6 +251,7 @@ IF (BUILD_TESTING) tdatareg.h5 tdset.h5 tempty.h5 + tsoftlinks.h5 textlinkfar.h5 textlinksrc.h5 textlinktar.h5 diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index 452441a..ab67db8 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -6887,6 +6887,11 @@ gent_extlinks(void) H5Lcreate_external(FILE62, "type", source_fid, "ext_link3", H5P_DEFAULT, H5P_DEFAULT); H5Lcreate_external(FILE62, "group/elink_t2", source_fid, "ext_link4", H5P_DEFAULT, H5P_DEFAULT); H5Lcreate_external(FILE62, "empty_group", source_fid, "ext_link5", H5P_DEFAULT, H5P_DEFAULT); +/* external link to soft link which linked to a dataset */ + H5Lcreate_external(FILE4_1, "/soft_dset1", source_fid, "ext2soft_link1", H5P_DEFAULT, H5P_DEFAULT); + +/* external link to dangle soft link */ + H5Lcreate_external(FILE4_1, "/soft_dangle", source_fid, "ext2softdangle_link1", H5P_DEFAULT, H5P_DEFAULT); /*------------------------------------------------------------------------- * create external link in the "far" file pointing to the source file diff --git a/tools/testfiles/textlinkfar.ddl b/tools/testfiles/textlinkfar.ddl index 4151710..e2bbf92 100644 --- a/tools/testfiles/textlinkfar.ddl +++ b/tools/testfiles/textlinkfar.ddl @@ -7,6 +7,24 @@ GROUP "/" { TARGETFILE "textlinksrc.h5" TARGETPATH "/" GROUP "/" { + EXTERNAL_LINK "ext2soft_link1" { + TARGETFILE "tsoftlinks.h5" + TARGETPATH "/soft_dset1" + DATASET "/soft_dset1" { + DATATYPE H5T_STD_I32BE + DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) } + DATA { + (0,0): 0, 0, + (1,0): 1, 1, + (2,0): 2, 2, + (3,0): 3, 3 + } + } + } + EXTERNAL_LINK "ext2softdangle_link1" { + TARGETFILE "tsoftlinks.h5" + TARGETPATH "/soft_dangle" + } EXTERNAL_LINK "ext_link1" { TARGETFILE "textlinktar.h5" TARGETPATH "group" diff --git a/tools/testfiles/textlinksrc-1-old.ls b/tools/testfiles/textlinksrc-1-old.ls index 5e81dec..488c9cf 100644 --- a/tools/testfiles/textlinksrc-1-old.ls +++ b/tools/testfiles/textlinksrc-1-old.ls @@ -2,9 +2,13 @@ output for 'h5ls -w80 -Er textlinksrc.h5' ############################# / Group +/ext2soft_link1 External Link {tsoftlinks.h5//soft_dset1} {Dataset {4, 2}} +/ext2softdangle_link1 External Link {tsoftlinks.h5//soft_dangle} {**NOT FOUND**} /ext_link1 External Link {textlinktar.h5//group} {Group} /ext_link1/dset Dataset {6} /ext_link1/elink_t1 External Link {textlinksrc.h5//} {Group} +/ext_link1/elink_t1/ext2soft_link1 External Link {tsoftlinks.h5//soft_dset1} {Already Visited} +/ext_link1/elink_t1/ext2softdangle_link1 External Link {tsoftlinks.h5//soft_dangle} {Already Visited} /ext_link1/elink_t1/ext_link1 External Link {textlinktar.h5//group} {Already Visited} /ext_link1/elink_t1/ext_link2 External Link {textlinktar.h5//dset} {Dataset {6}} /ext_link1/elink_t1/ext_link3 External Link {textlinktar.h5//type} {Type} diff --git a/tools/testfiles/textlinksrc-1.ls b/tools/testfiles/textlinksrc-1.ls index f39eec9..8d946d7 100644 --- a/tools/testfiles/textlinksrc-1.ls +++ b/tools/testfiles/textlinksrc-1.ls @@ -2,9 +2,13 @@ output for 'h5ls -w80 --follow-symlinks -r textlinksrc.h5' ############################# / Group +/ext2soft_link1 External Link {tsoftlinks.h5//soft_dset1} {Dataset {4, 2}} +/ext2softdangle_link1 External Link {tsoftlinks.h5//soft_dangle} {**NOT FOUND**} /ext_link1 External Link {textlinktar.h5//group} {Group} /ext_link1/dset Dataset {6} /ext_link1/elink_t1 External Link {textlinksrc.h5//} {Group} +/ext_link1/elink_t1/ext2soft_link1 External Link {tsoftlinks.h5//soft_dset1} {Already Visited} +/ext_link1/elink_t1/ext2softdangle_link1 External Link {tsoftlinks.h5//soft_dangle} {Already Visited} /ext_link1/elink_t1/ext_link1 External Link {textlinktar.h5//group} {Already Visited} /ext_link1/elink_t1/ext_link2 External Link {textlinktar.h5//dset} {Dataset {6}} /ext_link1/elink_t1/ext_link3 External Link {textlinktar.h5//type} {Type} diff --git a/tools/testfiles/textlinksrc-3-old.ls b/tools/testfiles/textlinksrc-3-old.ls index a86ca32..c10cc1d 100644 --- a/tools/testfiles/textlinksrc-3-old.ls +++ b/tools/testfiles/textlinksrc-3-old.ls @@ -4,6 +4,8 @@ ext_link1 External Link {textlinktar.h5//group} {Group} /dset Dataset {6} /elink_t1 External Link {textlinksrc.h5//} {Group} +/elink_t1/ext2soft_link1 External Link {tsoftlinks.h5//soft_dset1} {Dataset {4, 2}} +/elink_t1/ext2softdangle_link1 External Link {tsoftlinks.h5//soft_dangle} {**NOT FOUND**} /elink_t1/ext_link1 External Link {textlinktar.h5//group} {Already Visited} /elink_t1/ext_link2 External Link {textlinktar.h5//dset} {Dataset {6}} /elink_t1/ext_link3 External Link {textlinktar.h5//type} {Type} diff --git a/tools/testfiles/textlinksrc-3.ls b/tools/testfiles/textlinksrc-3.ls index bd173f3..fc3c6a2 100644 --- a/tools/testfiles/textlinksrc-3.ls +++ b/tools/testfiles/textlinksrc-3.ls @@ -4,6 +4,8 @@ ext_link1 External Link {textlinktar.h5//group} {Group} /dset Dataset {6} /elink_t1 External Link {textlinksrc.h5//} {Group} +/elink_t1/ext2soft_link1 External Link {tsoftlinks.h5//soft_dset1} {Dataset {4, 2}} +/elink_t1/ext2softdangle_link1 External Link {tsoftlinks.h5//soft_dangle} {**NOT FOUND**} /elink_t1/ext_link1 External Link {textlinktar.h5//group} {Already Visited} /elink_t1/ext_link2 External Link {textlinktar.h5//dset} {Dataset {6}} /elink_t1/ext_link3 External Link {textlinktar.h5//type} {Type} diff --git a/tools/testfiles/textlinksrc-4.ls b/tools/testfiles/textlinksrc-4.ls index f440d9c..4e9414e 100644 --- a/tools/testfiles/textlinksrc-4.ls +++ b/tools/testfiles/textlinksrc-4.ls @@ -2,6 +2,8 @@ output for 'h5ls -w80 -r textlinksrc.h5' ############################# / Group +/ext2soft_link1 External Link {tsoftlinks.h5//soft_dset1} +/ext2softdangle_link1 External Link {tsoftlinks.h5//soft_dangle} /ext_link1 External Link {textlinktar.h5//group} /ext_link2 External Link {textlinktar.h5//dset} /ext_link3 External Link {textlinktar.h5//type} diff --git a/tools/testfiles/textlinksrc-6-old.ls b/tools/testfiles/textlinksrc-6-old.ls index e1b8b74..578e78e 100644 --- a/tools/testfiles/textlinksrc-6-old.ls +++ b/tools/testfiles/textlinksrc-6-old.ls @@ -1,6 +1,8 @@ ############################# output for 'h5ls -w80 -E textlinksrc.h5' ############################# +ext2soft_link1 External Link {tsoftlinks.h5//soft_dset1} {Dataset {4, 2}} +ext2softdangle_link1 External Link {tsoftlinks.h5//soft_dangle} {**NOT FOUND**} ext_link1 External Link {textlinktar.h5//group} {Group} ext_link2 External Link {textlinktar.h5//dset} {Dataset {6}} ext_link3 External Link {textlinktar.h5//type} {Type} diff --git a/tools/testfiles/textlinksrc-6.ls b/tools/testfiles/textlinksrc-6.ls index 6cda888..b8ea95e 100644 --- a/tools/testfiles/textlinksrc-6.ls +++ b/tools/testfiles/textlinksrc-6.ls @@ -1,6 +1,8 @@ ############################# output for 'h5ls -w80 --follow-symlinks textlinksrc.h5' ############################# +ext2soft_link1 External Link {tsoftlinks.h5//soft_dset1} {Dataset {4, 2}} +ext2softdangle_link1 External Link {tsoftlinks.h5//soft_dangle} {**NOT FOUND**} ext_link1 External Link {textlinktar.h5//group} {Group} ext_link2 External Link {textlinktar.h5//dset} {Dataset {6}} ext_link3 External Link {textlinktar.h5//type} {Type} diff --git a/tools/testfiles/textlinksrc-nodangle-2.ls b/tools/testfiles/textlinksrc-nodangle-2.ls index 4713849..e483dd1 100644 --- a/tools/testfiles/textlinksrc-nodangle-2.ls +++ b/tools/testfiles/textlinksrc-nodangle-2.ls @@ -1,6 +1,8 @@ ############################# output for 'h5ls -w80 --follow-symlinks --no-dangling-links textlinksrc.h5' ############################# +ext2soft_link1 External Link {tsoftlinks.h5//soft_dset1} {Dataset {4, 2}} +ext2softdangle_link1 External Link {tsoftlinks.h5//soft_dangle} {**NOT FOUND**} ext_link1 External Link {textlinktar.h5//group} {Group} ext_link2 External Link {textlinktar.h5//dset} {Dataset {6}} ext_link3 External Link {textlinktar.h5//type} {Type} diff --git a/tools/testfiles/textlinksrc.ddl b/tools/testfiles/textlinksrc.ddl index b806c56..d41bb6d 100644 --- a/tools/testfiles/textlinksrc.ddl +++ b/tools/testfiles/textlinksrc.ddl @@ -3,6 +3,24 @@ Expected output for 'h5dump textlinksrc.h5' ############################# HDF5 "textlinksrc.h5" { GROUP "/" { + EXTERNAL_LINK "ext2soft_link1" { + TARGETFILE "tsoftlinks.h5" + TARGETPATH "/soft_dset1" + DATASET "/soft_dset1" { + DATATYPE H5T_STD_I32BE + DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) } + DATA { + (0,0): 0, 0, + (1,0): 1, 1, + (2,0): 2, 2, + (3,0): 3, 3 + } + } + } + EXTERNAL_LINK "ext2softdangle_link1" { + TARGETFILE "tsoftlinks.h5" + TARGETPATH "/soft_dangle" + } EXTERNAL_LINK "ext_link1" { TARGETFILE "textlinktar.h5" TARGETPATH "group" diff --git a/tools/testfiles/textlinksrc.h5 b/tools/testfiles/textlinksrc.h5 Binary files differindex 062acbe..4db1cc4 100644 --- a/tools/testfiles/textlinksrc.h5 +++ b/tools/testfiles/textlinksrc.h5 |