summaryrefslogtreecommitdiffstats
path: root/tools/test/h5repack
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/h5repack')
-rw-r--r--tools/test/h5repack/CMakeTests.cmake6
-rw-r--r--tools/test/h5repack/h5repack.sh.in12
-rw-r--r--tools/test/h5repack/testfiles/textlink-base-textlink.h5.ddl12
-rw-r--r--tools/test/h5repack/testfiles/textlinkfar-base-textlinkfar.h5.ddl116
-rw-r--r--tools/test/h5repack/testfiles/textlinksrc-base-textlinksrc.h5.ddl150
-rw-r--r--tools/test/h5repack/testfiles/textlinktar-base-textlinktar.h5.ddl168
-rw-r--r--tools/test/h5repack/testfiles/tsoftlinks-base-tsoftlinks.h5.ddl77
7 files changed, 541 insertions, 0 deletions
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index 2a34438..1bf3fa2 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -170,6 +170,12 @@
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/attrregion.tattrreg.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/dataregion.tdatareg.h5
# tools/testfiles for external links
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-base.textlinkfar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-base.textlinksrc.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-base.textlinktar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-base.textlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-base.tsoftlinks.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-prune.textlinkfar.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-prune.textlinksrc.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-prune.textlinktar.h5
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in
index 3d4e0ea..e4ae008 100644
--- a/tools/test/h5repack/h5repack.sh.in
+++ b/tools/test/h5repack/h5repack.sh.in
@@ -213,6 +213,18 @@ $SRC_H5REPACK_TESTFILES/4_vds.h5-vds_conti-v.ddl
$SRC_H5REPACK_TESTFILES/attrregion.tattrreg.h5.ddl
$SRC_H5REPACK_TESTFILES/dataregion.tdatareg.h5.ddl
########external#links#files########
+$SRC_H5REPACK_TESTFILES/textlinkfar-base.textlinkfar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinksrc-base.textlinksrc.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinktar-base.textlinktar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlink-base.textlink.h5.ddl
+$SRC_H5REPACK_TESTFILES/tsoftlinks-base.tsoftlinks.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinkfar-merge.textlinkfar.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinksrc-merge.textlinksrc.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinktar-merge.textlinktar.h5.tst
+$SRC_H5REPACK_TESTFILES/textlink-merge.textlink.h5.tst
+$SRC_H5REPACK_TESTFILES/tsoftlinks-merge.tsoftlinks.h5.tst
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
$SRC_H5REPACK_TESTFILES/textlinkfar-prune.textlinkfar.h5.ddl
$SRC_H5REPACK_TESTFILES/textlinksrc-prune.textlinksrc.h5.ddl
$SRC_H5REPACK_TESTFILES/textlinktar-prune.textlinktar.h5.ddl
diff --git a/tools/test/h5repack/testfiles/textlink-base-textlink.h5.ddl b/tools/test/h5repack/testfiles/textlink-base-textlink.h5.ddl
new file mode 100644
index 0000000..b87a17d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlink-base-textlink.h5.ddl
@@ -0,0 +1,12 @@
+HDF5 "out-textlink-base.textlink.h5" {
+GROUP "/" {
+ EXTERNAL_LINK "extlink1" {
+ TARGETFILE "filename"
+ TARGETPATH "objname"
+ }
+ EXTERNAL_LINK "extlink2" {
+ TARGETFILE "anotherfile"
+ TARGETPATH "anotherobj"
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinkfar-base-textlinkfar.h5.ddl b/tools/test/h5repack/testfiles/textlinkfar-base-textlinkfar.h5.ddl
new file mode 100644
index 0000000..a5eb497
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinkfar-base-textlinkfar.h5.ddl
@@ -0,0 +1,116 @@
+HDF5 "out-textlinkfar-base.textlinkfar.h5" {
+GROUP "/" {
+ EXTERNAL_LINK "src_file" {
+ 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 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ HARDLINK "/"
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinksrc-base-textlinksrc.h5.ddl b/tools/test/h5repack/testfiles/textlinksrc-base-textlinksrc.h5.ddl
new file mode 100644
index 0000000..9a9a9aa
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinksrc-base-textlinksrc.h5.ddl
@@ -0,0 +1,150 @@
+HDF5 "out-textlinksrc-base.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 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ HARDLINK "/dset1"
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ HARDLINK "/group"
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ HARDLINK "/dset"
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" HARDLINK "/type"
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ HARDLINK "/empty_group"
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinktar-base-textlinktar.h5.ddl b/tools/test/h5repack/testfiles/textlinktar-base-textlinktar.h5.ddl
new file mode 100644
index 0000000..3f02ff2
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinktar-base-textlinktar.h5.ddl
@@ -0,0 +1,168 @@
+HDF5 "out-textlinktar-base.textlinktar.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "empty_group" {
+ }
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2072
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ 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 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ HARDLINK "/"
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ DATATYPE "type" H5T_STD_I32LE;
+}
+}
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-base-tsoftlinks.h5.ddl b/tools/test/h5repack/testfiles/tsoftlinks-base-tsoftlinks.h5.ddl
new file mode 100644
index 0000000..b0cd32d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/tsoftlinks-base-tsoftlinks.h5.ddl
@@ -0,0 +1,77 @@
+HDF5 "out-tsoftlinks-base.tsoftlinks.h5" {
+GROUP "/" {
+ DATASET "dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATASET "dset2" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2080
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "dtype" H5T_STD_I32BE;
+ GROUP "group1" {
+ SOFTLINK "soft_dangle" {
+ LINKTARGET "not_yet"
+ }
+ SOFTLINK "soft_dset1" {
+ LINKTARGET "/dset1"
+ }
+ SOFTLINK "soft_dset2" {
+ LINKTARGET "/dset2"
+ }
+ SOFTLINK "soft_dtype" {
+ LINKTARGET "/dtype"
+ }
+ SOFTLINK "soft_empty_grp" {
+ LINKTARGET "/group_empty"
+ }
+ }
+ GROUP "group_empty" {
+ }
+ SOFTLINK "soft_dangle" {
+ LINKTARGET "not_yet"
+ }
+ SOFTLINK "soft_dset1" {
+ LINKTARGET "/dset1"
+ }
+ SOFTLINK "soft_dtype" {
+ LINKTARGET "/dtype"
+ }
+ SOFTLINK "soft_empty_grp" {
+ LINKTARGET "/group_empty"
+ }
+ SOFTLINK "soft_group1" {
+ LINKTARGET "/group1"
+ }
+}
+}