summaryrefslogtreecommitdiffstats
path: root/tools/test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test')
-rw-r--r--tools/test/h5repack/CMakeTests.cmake13
-rw-r--r--tools/test/h5repack/Makefile.am5
-rw-r--r--tools/test/h5repack/h5repack.sh.in106
-rw-r--r--tools/test/h5repack/h5repackgentest.c205
-rw-r--r--tools/test/h5repack/testfiles/h5repack-help.txt71
-rw-r--r--tools/test/h5repack/testfiles/h5repack_int32le.h5bin0 -> 4096 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5repack_int32le_ex-0.datbin0 -> 2048 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5repack_int32le_ex.h5bin0 -> 1472 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5repack_uint8be.h5bin0 -> 2560 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5repack_uint8be_ex-0.datbin0 -> 64 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5repack_uint8be_ex-1.dat1
-rw-r--r--tools/test/h5repack/testfiles/h5repack_uint8be_ex-2.dat1
-rw-r--r--tools/test/h5repack/testfiles/h5repack_uint8be_ex-3.dat1
-rw-r--r--tools/test/h5repack/testfiles/h5repack_uint8be_ex-4.datbin0 -> 64 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5repack_uint8be_ex-5.datbin0 -> 64 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5repack_uint8be_ex-6.datbin0 -> 64 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5repack_uint8be_ex-7.datbin0 -> 64 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5repack_uint8be_ex.h5bin0 -> 1912 bytes
18 files changed, 374 insertions, 29 deletions
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index 3a90b2c..fe59c2e 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -30,6 +30,9 @@
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_filters.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fletcher.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_hlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_int32le.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_int32le_ex.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_int32le_ex-0.dat
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layouto.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout2.h5
@@ -51,6 +54,16 @@
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_none.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_paged_nopersist.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_paged_persist.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_uint8be.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_uint8be_ex.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_uint8be_ex-0.dat
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_uint8be_ex-1.dat
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_uint8be_ex-2.dat
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_uint8be_ex-3.dat
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_uint8be_ex-4.dat
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_uint8be_ex-5.dat
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_uint8be_ex-6.dat
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_uint8be_ex-7.dat
# h5diff/testfile
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr1.h5
# tools/testfiles
diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am
index 59d7a6a..38f7b2f 100644
--- a/tools/test/h5repack/Makefile.am
+++ b/tools/test/h5repack/Makefile.am
@@ -22,10 +22,12 @@ include $(top_srcdir)/config/commence.am
AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib -I$(top_srcdir)/tools/src/h5repack
# Test programs and scripts
+TEST_PROG=h5repackgentest
TEST_SCRIPT=h5repack.sh
noinst_PROGRAMS=h5repacktst testh5repack_detect_szip
+check_PROGRAMS=$(TEST_PROG)
SCRIPT_DEPEND=../../src/h5repack/h5repack$(EXEEXT) h5repacktst$(EXEEXT)
if HAVE_SHARED_CONDITIONAL
if USE_PLUGINS_CONDITIONAL
@@ -57,7 +59,8 @@ endif
# Temporary files. *.h5 are generated by h5repack. They should
# copied to the testfiles/ directory if update is required.
-CHECK_CLEANFILES+=*.h5 *.bin testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5
+# *.dat files may be created by h5repackgentest.
+CHECK_CLEANFILES+=*.h5 *.dat *.bin testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5
DISTCLEANFILES=h5repack.sh h5repack_plugin.sh
include $(top_srcdir)/config/conclude.am
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in
index 282ba76..1af4fd0 100644
--- a/tools/test/h5repack/h5repack.sh.in
+++ b/tools/test/h5repack/h5repack.sh.in
@@ -115,6 +115,10 @@ $SRC_H5REPACK_TESTFILES/h5repack_fsm_aggr_persist.h5
$SRC_H5REPACK_TESTFILES/h5repack_none.h5
$SRC_H5REPACK_TESTFILES/h5repack_paged_nopersist.h5
$SRC_H5REPACK_TESTFILES/h5repack_paged_persist.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_ex.h5
+$SRC_H5REPACK_TESTFILES/h5repack_uint8be.h5
+$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex.h5
$SRC_H5DIFF_TESTFILES/h5diff_attr1.h5
$SRC_TOOLS_TESTFILES/tfamily00000.h5
$SRC_TOOLS_TESTFILES/tfamily00001.h5
@@ -160,10 +164,19 @@ $SRC_H5REPACK_TESTFILES/ublock.bin
$SRC_H5REPACK_TESTFILES/h5repack.info
$SRC_H5REPACK_TESTFILES/crtorder.tordergr.h5.ddl
$SRC_H5REPACK_TESTFILES/deflate_limit.h5repack_layout.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_ex-0.dat
$SRC_H5REPACK_TESTFILES/h5repack_layout.h5.ddl
$SRC_H5REPACK_TESTFILES/h5repack_filters.h5-gzip_verbose_filters.tst
$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-plugin_test.ddl
+$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-0.dat
+$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-1.dat
+$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-2.dat
+$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-3.dat
+$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-4.dat
+$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-5.dat
+$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-6.dat
+$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-7.dat
$SRC_H5REPACK_TESTFILES/plugin_test.h5repack_layout.h5.tst
$SRC_H5REPACK_TESTFILES/1_vds.h5-vds_dset_chunk20x10x5-v.ddl
$SRC_H5REPACK_TESTFILES/2_vds.h5-vds_chunk3x6x9-v.ddl
@@ -599,8 +612,94 @@ VERIFY_INVALIDBOUNDS()
} # end of VERIFY_INVALIDBOUNDS
+# -----------------------------------------------------------------------------
+# Expect h5diff to fail
+# -----------------------------------------------------------------------------
+DIFFFAIL()
+{
+ VERIFY h5diff unequal $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN -q "$@"
+ )
+ RET=$?
+ if [ $RET == 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ fi
+}
+
+# -----------------------------------------------------------------------------
+# Catchall test for repacking with external files
+# Loops over all (internally-listed) cases and applies the given arguments
+# to h5repack.
+# Each test file family must be listed in the for loop at the start of the
+# 'function'.
+# Expects case files to be of format:
+# + h5repack_<NAME>.h5
+# + h5repack_<NAME>_ex.h5
+# + h5repack_<NAME>_ex-<N>.dat
+# ...where NAME is part of the internal list, and N is a positive decimal
+# number; multiple external files (*.dat) are allowed per file, but they must
+# follow the pattern and be in contiguous numerical sequence starting at 0.
+# -----------------------------------------------------------------------------
+VERIFY_EXTERNAL_CONSOLIDATION()
+{
+ for name in int32le uint8be
+ do
+ basename="h5repack_${name}"
+ base_ext="${basename}_ex"
+ base_rpkg="${basename}_rp"
+ canonical="${basename}.h5"
+ external="${base_ext}.h5"
+ ex_dat="${base_ext}-0.dat"
+ ex_dat_mv="__${ext_dat}"
+ repacked="${base_rpkg}.h5"
+ prev_nerrors=$nerrors
+
+ TESTING external consolidation on $name with h5repack $@
+ echo " . . ."
+
+ # baseline comparison of known files
+ DIFFTEST $canonical $external
+
+ # repack the external file, verify integrity
+ ( cd $TESTDIR
+ $H5REPACK_BIN $@ $external $repacked
+ )
+ DIFFTEST $repacked $canonical
+ DIFFTEST $repacked $external
+
+ # invalidate external file by moving its data file; verify
+ ( cd $TESTDIR
+ mv $ex_dat $ex_dat_mv
+ )
+ DIFFFAIL $canonical $external
+ DIFFFAIL $repacked $external
+ DIFFTEST $canonical $repacked
+
+ # reset test state for re-runs with different h5repack arguments
+ ( cd $TESTDIR
+ mv $ex_dat_mv $ex_dat
+ rm $repacked
+ )
+
+ # flag if any of the above checks failed
+ if [ $prev_nerrors != $nerrors ]
+ then
+ echo ". . . *FAILED*"
+ nerrors="`expr $prev_nerrors + 1`"
+ else
+ echo ". . . PASSED"
+ fi
+ done
+} # end VERIFY_EXTERNAL_CONSOLIDATION
+
+# -----------------------------------------------------------------------------
# same as TOOLTEST, but it uses the old syntax -i input_file -o output_file
-#
+# -----------------------------------------------------------------------------
TOOLTEST0()
{
infile=$2
@@ -1464,6 +1563,11 @@ VERIFY_SUPERBLOCK 2 2 3 h5repack_layout.h5 -j 2 -k 2 h5repack_layout.h5
# -j 0 -k 1, file cannot be opened
VERIFY_INVALIDBOUNDS 0 1 bounds_latest_latest.h5
+########################################
+# Testing external storage
+########################################
+VERIFY_EXTERNAL_CONSOLIDATION -l CONTI
+
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
diff --git a/tools/test/h5repack/h5repackgentest.c b/tools/test/h5repack/h5repackgentest.c
new file mode 100644
index 0000000..27f6009
--- /dev/null
+++ b/tools/test/h5repack/h5repackgentest.c
@@ -0,0 +1,205 @@
+#include "hdf5.h"
+#include "H5private.h"
+
+/* For generating files for verifying h5repack with external storage. . .
+ *
+ * Each case file should follow the format of:
+ * + h5repack_<NAME>.h5
+ * + h5repack_<NAME>_ex.h5
+ * + h5repack_<NAME>_ex-<N>.dat
+ * ...where NAME idenfities the type, and N is a positive decimal number;
+ * multiple external files (*.dat) are allowed per file, but they must
+ * follow the pattern and be in contiguous numerical sequence starting at 0.
+ *
+ * Each file typename must be added to the listing for
+ * `VERIFY_EXTERNAL_CONSOLIDATION` in h5repack.sh
+ *
+ * There is no restriction on the name, number, or structure of datasets and
+ * groups in HDF5 file.
+ *
+ * The generated files will need to be moved "by hand" into the testfiles
+ * directory. (TODO)
+ */
+
+#define MAX_NAME_SIZE 256
+#define FILE_INT32LE "h5repack_int32le"
+#define FILE_UINT8BE "h5repack_uint8be"
+
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * TODO: error handling is a joke, but this seems normal for the tools'
+ * gentest operations.
+ */
+static void
+generate_int32le(hbool_t external)
+{
+ char filename[MAX_NAME_SIZE];
+ hid_t file;
+ hid_t dset;
+ hid_t dcpl = H5P_DEFAULT;
+ hid_t dspace;
+ hsize_t dims[] = {8, 8, 8};
+ int32_t wdata[512]; /* 8^3 */
+ int32_t n;
+ int i;
+ int j;
+ int k;
+ herr_t ret; /* error-checking */
+
+ /* generate values, alternating positive and negative
+ */
+ for (i=0, n=0; i < 8; i++)
+ for (j=0; j < 8; j++)
+ for (k=0; k < 8; k++, n++)
+ wdata[n] = (k + j*512 + i*4096) * ((n&1) ? (-1) : (1));
+
+ snprintf(filename,
+ MAX_NAME_SIZE,
+ "%s%s.h5",
+ FILE_INT32LE,
+ (external) ? "_ex" : "");
+
+ if (external) {
+ char name[MAX_NAME_SIZE];
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ HDassert(dcpl != H5I_INVALID_HID);
+ snprintf(name, MAX_NAME_SIZE, "%s_ex-0.dat", FILE_INT32LE);
+ ret = H5Pset_external(dcpl, name, 0, H5F_UNLIMITED);
+ HDassert(ret >= 0);
+ }
+
+ dspace = H5Screate_simple(3, dims, NULL);
+ HDassert(dspace != H5I_INVALID_HID);
+
+ file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(file != H5I_INVALID_HID);
+
+ dset = H5Dcreate2(
+ file,
+ "dset",
+ H5T_STD_I32LE,
+ dspace,
+ H5P_DEFAULT,
+ dcpl,
+ H5P_DEFAULT);
+ HDassert(dset != H5I_INVALID_HID);
+
+ ret = H5Dwrite(
+ dset,
+ H5T_STD_I32LE,
+ H5S_ALL,
+ H5S_ALL,
+ H5P_DEFAULT,
+ wdata);
+ HDassert(ret >= 0);
+
+ if (dcpl != H5P_DEFAULT) {
+ ret = H5Pclose(dcpl);
+ HDassert(ret >= 0);
+ }
+ ret = H5Dclose(dset);
+ HDassert(ret >= 0);
+ ret = H5Fclose(file);
+ HDassert(ret >= 0);
+ ret = H5Sclose(dspace);
+ HDassert(ret >= 0);
+
+} /* end generate_int32le() */
+
+
+static void
+generate_uint8be(hbool_t external)
+{
+ char filename[MAX_NAME_SIZE];
+ hid_t file;
+ hid_t dset;
+ hid_t dcpl = H5P_DEFAULT;
+ hid_t dspace;
+ hsize_t dims[] = {8, 8, 8};
+ uint8_t wdata[512]; /* 8^3 */
+ uint8_t n;
+ int i;
+ int j;
+ int k;
+ herr_t ret; /* error-checking */
+
+ /* Generate values, alternating positive and negative
+ * The latter half of the dataset is "overflow garbage" (TODO?)
+ */
+ for (i=0, n=0; i < 8; i++)
+ for (j=0; j < 8; j++)
+ for (k=0; k < 8; k++, n++)
+ wdata[n] = n * ((n&1) ? (-1) : (1));
+
+ snprintf(filename,
+ MAX_NAME_SIZE,
+ "%s%s.h5",
+ FILE_UINT8BE,
+ (external) ? "_ex" : "");
+
+ if (external) {
+ char name[MAX_NAME_SIZE];
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ HDassert(dcpl != H5I_INVALID_HID);
+ for (i = 0; i < 8; i++) {
+ snprintf(name, MAX_NAME_SIZE, "%s_ex-%d.dat", FILE_UINT8BE, i);
+ ret = H5Pset_external(dcpl, name, 0, 64 * sizeof(char));
+ HDassert(ret >= 0);
+ }
+ }
+
+ dspace = H5Screate_simple(3, dims, NULL);
+ HDassert(dspace != H5I_INVALID_HID);
+
+ file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(file != H5I_INVALID_HID);
+
+ dset = H5Dcreate2(
+ file,
+ "dset",
+ H5T_STD_U8BE,
+ dspace,
+ H5P_DEFAULT,
+ dcpl,
+ H5P_DEFAULT);
+ HDassert(dset != H5I_INVALID_HID);
+
+ ret = H5Dwrite(
+ dset,
+ H5T_STD_U8BE,
+ H5S_ALL,
+ H5S_ALL,
+ H5P_DEFAULT,
+ wdata);
+ HDassert(ret >= 0);
+
+ if (dcpl != H5P_DEFAULT) {
+ ret = H5Pclose(dcpl);
+ HDassert(ret >= 0);
+ }
+ ret = H5Dclose(dset);
+ HDassert(ret >= 0);
+ ret = H5Fclose(file);
+ HDassert(ret >= 0);
+ ret = H5Sclose(dspace);
+ HDassert(ret >= 0);
+
+} /* end generate_uint8be() */
+
+
+/* ----------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+ int i;
+
+ for (i=0; i < 2; i++) {
+ hbool_t external = (i&1) ? TRUE : FALSE;
+ generate_int32le(external);
+ generate_uint8be(external);
+ }
+ return 0;
+} /* end main() */
+
+
diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt
index 0eef0f5..ad07784 100644
--- a/tools/test/h5repack/testfiles/h5repack-help.txt
+++ b/tools/test/h5repack/testfiles/h5repack-help.txt
@@ -6,13 +6,17 @@ usage: h5repack [OPTIONS] file1 file2
-v, --verbose Verbose mode, print object information
-V, --version Print version number and exit
-n, --native Use a native HDF5 type when repacking
- --enable-error-stack Prints messages from the HDF5 error stack as they occur
+ --enable-error-stack Prints messages from the HDF5 error stack as they
+ occur
-L, --latest Use latest version of file format
- This option will take precedence over the -j and -k options
- --low=BOUND The low bound for library release versions to use when creating
- objects in the file (default is H5F_LIBVER_EARLIEST)
- --high=BOUND The high bound for library release versions to use when creating
- objects in the file (default is H5F_LIBVER_LATEST)
+ This option will take precedence over the options
+ --low and --high
+ --low=BOUND The low bound for library release versions to use
+ when creating objects in the file (default is 0
+ [H5F_LIBVER_EARLIEST])
+ --high=BOUND The high bound for library release versions to use
+ when creating objects in the file (default is 2
+ [H5F_LIBVER_V110 this release; H5F_LIBVER_LATEST])
-c L1, --compact=L1 Maximum number of links in header messages
-d L2, --indexed=L2 Minimum number of links in the indexed format
-s S[:F], --ssize=S[:F] Shared object header message minimum size
@@ -27,10 +31,14 @@ usage: h5repack [OPTIONS] file1 file2
-z Z, --sort_order=Z Sort groups and attributes by order Z
-f FILT, --filter=FILT Filter type
-l LAYT, --layout=LAYT Layout type
- -S FS_STRATEGY, --fs_strategy=FS_STRATEGY File space management strategy for H5Pset_file_space_strategy
- -P FS_PERSIST, --fs_persist=FS_PERSIST Persisting or not persisting free-space for H5Pset_file_space_strategy
- -T FS_THRESHOLD, --fs_threshold=FS_THRESHOLD Free-space section threshold for H5Pset_file_space_strategy
- -G FS_PAGESIZE, --fs_pagesize=FS_PAGESIZE File space page size for H5Pset_file_space_page_size
+ -S FS_STRATEGY, --fs_strategy=FS_STRATEGY File space management strategy for
+ H5Pset_file_space_strategy
+ -P FS_PERSIST, --fs_persist=FS_PERSIST Persisting or not persisting free-
+ space for H5Pset_file_space_strategy
+ -T FS_THRESHOLD, --fs_threshold=FS_THRESHOLD Free-space section threshold
+ for H5Pset_file_space_strategy
+ -G FS_PAGESIZE, --fs_pagesize=FS_PAGESIZE File space page size for
+ H5Pset_file_space_page_size
M - is an integer greater than 1, size of dataset in bytes (default is 0)
E - is a filename.
@@ -38,15 +46,17 @@ usage: h5repack [OPTIONS] file1 file2
U - is a filename.
T - is an integer
A - is an integer greater than zero
- Q - is the sort index type for the input file. It can be "name" or "creation_order" (default)
- Z - is the sort order type for the input file. It can be "descending" or "ascending" (default)
+ Q - is the sort index type for the input file. It can be "name" or
+ "creation_order" (default)
+ Z - is the sort order type for the input file. It can be "descending" or
+ "ascending" (default)
B - is the user block size, any value that is 512 or greater and is
a power of 2 (1024 default)
F - is the shared object header message type, any of <dspace|dtype|fill|
pline|attr>. If F is not specified, S applies to all messages
- BOUND is an integer indicating the library release versions to use when creating
- objects in the file (see H5Pset_libver_bounds()):
+ BOUND is an integer indicating the library release versions to use when
+ creating objects in the file (see H5Pset_libver_bounds()):
0: This is H5F_LIBVER_EARLIEST in H5F_libver_t struct
1: This is H5F_LIBVER_V18 in H5F_libver_t struct
2: This is H5F_LIBVER_V110 in H5F_libver_t struct
@@ -54,24 +64,31 @@ usage: h5repack [OPTIONS] file1 file2
FS_STRATEGY is a string indicating the file space strategy used:
FSM_AGGR:
- The mechanisms used in managing file space are free-space managers, aggregators and virtual file driver.
+ The mechanisms used in managing file space are free-space
+ managers, aggregators and virtual file driver.
PAGE:
- The mechanisms used in managing file space are free-space managers with embedded paged aggregation and virtual file driver.
+ The mechanisms used in managing file space are free-space
+ managers with embedded paged aggregation and virtual file driver.
AGGR:
- The mechanisms used in managing file space are aggregators and virtual file driver.
+ The mechanisms used in managing file space are aggregators and
+ virtual file driver.
NONE:
- The mechanisms used in managing file space are virtual file driver.
- The default strategy when not set is FSM_AGGR without persisting free-space.
+ The mechanisms used in managing file space are virtual file
+ driver.
+ The default strategy when not set is FSM_AGGR without persisting free-
+ space.
FS_PERSIST is 1 to persisting free-space or 0 to not persisting free-space.
The default when not set is not persisting free-space.
The value is ignored for AGGR and NONE strategies.
- FS_THRESHOLD is the minimum size (in bytes) of free-space sections to be tracked by the library.
+ FS_THRESHOLD is the minimum size (in bytes) of free-space sections to be
+ tracked by the library.
The default when not set is 1.
The value is ignored for AGGR and NONE strategies.
- FS_PAGESIZE is the size (in bytes) >=512 that is used by the library when the file space strategy PAGE is used.
+ FS_PAGESIZE is the size (in bytes) >=512 that is used by the library when
+ the file space strategy PAGE is used.
The default when not set is 4096.
FILT - is a string with the format:
@@ -99,9 +116,9 @@ usage: h5repack [OPTIONS] file1 file2
NBIT (no parameter)
SOFF=<scale_factor,scale_type> scale_factor is an integer and scale_type
is either IN or DS
- UD=<filter_number,filter_flag,cd_value_count,value_1[,value_2,...,value_N]>
- required values for filter_number,filter_flag,cd_value_count,value_1
- optional values for value_2 to value_N
+ UD=<filter_number,filter_flag,cd_value_count,value1[,value2,...,valueN]>
+ Required values: filter_number, filter_flag, cd_value_count, value1
+ Optional values: value2 to valueN
NONE (no parameter)
LAYT - is a string with the format:
@@ -138,12 +155,12 @@ Examples of use:
4) h5repack -L -c 10 -s 20:dtype file1 file2
Using latest file format with maximum compact group size of 10 and
- and minimum shared datatype size of 20
+ minimum shared datatype size of 20
5) h5repack --low=0 --high=1 file1 file2
- Set low=H5F_LIBVER_EARLIEST and high=H5F_LIBVER_V18 via H5Pset_libver_bounds() when
- creating the repacked file: file2
+ Set low=H5F_LIBVER_EARLIEST and high=H5F_LIBVER_V18 via
+ H5Pset_libver_bounds() when creating the repacked file, file2
5) h5repack -f SHUF -f GZIP=1 file1 file2
diff --git a/tools/test/h5repack/testfiles/h5repack_int32le.h5 b/tools/test/h5repack/testfiles/h5repack_int32le.h5
new file mode 100644
index 0000000..4e9500f
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_int32le.h5
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5repack_int32le_ex-0.dat b/tools/test/h5repack/testfiles/h5repack_int32le_ex-0.dat
new file mode 100644
index 0000000..b505eb4
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_int32le_ex-0.dat
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5repack_int32le_ex.h5 b/tools/test/h5repack/testfiles/h5repack_int32le_ex.h5
new file mode 100644
index 0000000..8c8b644
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_int32le_ex.h5
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5repack_uint8be.h5 b/tools/test/h5repack/testfiles/h5repack_uint8be.h5
new file mode 100644
index 0000000..f89bc03
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_uint8be.h5
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5repack_uint8be_ex-0.dat b/tools/test/h5repack/testfiles/h5repack_uint8be_ex-0.dat
new file mode 100644
index 0000000..f95b90a
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_uint8be_ex-0.dat
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5repack_uint8be_ex-1.dat b/tools/test/h5repack/testfiles/h5repack_uint8be_ex-1.dat
new file mode 100644
index 0000000..011ab48
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_uint8be_ex-1.dat
@@ -0,0 +1 @@
+@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~ \ No newline at end of file
diff --git a/tools/test/h5repack/testfiles/h5repack_uint8be_ex-2.dat b/tools/test/h5repack/testfiles/h5repack_uint8be_ex-2.dat
new file mode 100644
index 0000000..069b96d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_uint8be_ex-2.dat
@@ -0,0 +1 @@
+}{ywusqomkigeca_][YWUSQOMKIGECA \ No newline at end of file
diff --git a/tools/test/h5repack/testfiles/h5repack_uint8be_ex-3.dat b/tools/test/h5repack/testfiles/h5repack_uint8be_ex-3.dat
new file mode 100644
index 0000000..240d8ca
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_uint8be_ex-3.dat
@@ -0,0 +1 @@
+?=;97531/-+)'%#!  \ No newline at end of file
diff --git a/tools/test/h5repack/testfiles/h5repack_uint8be_ex-4.dat b/tools/test/h5repack/testfiles/h5repack_uint8be_ex-4.dat
new file mode 100644
index 0000000..b5c4e7c
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_uint8be_ex-4.dat
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5repack_uint8be_ex-5.dat b/tools/test/h5repack/testfiles/h5repack_uint8be_ex-5.dat
new file mode 100644
index 0000000..b77f32c
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_uint8be_ex-5.dat
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5repack_uint8be_ex-6.dat b/tools/test/h5repack/testfiles/h5repack_uint8be_ex-6.dat
new file mode 100644
index 0000000..1e335eb
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_uint8be_ex-6.dat
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5repack_uint8be_ex-7.dat b/tools/test/h5repack/testfiles/h5repack_uint8be_ex-7.dat
new file mode 100644
index 0000000..3dadb7d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_uint8be_ex-7.dat
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5repack_uint8be_ex.h5 b/tools/test/h5repack/testfiles/h5repack_uint8be_ex.h5
new file mode 100644
index 0000000..6f8c3fe
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_uint8be_ex.h5
Binary files differ