diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-08-28 19:47:26 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-08-28 19:47:26 (GMT) |
commit | f384b17625179b29475b2ec836c949fe3b9d5e44 (patch) | |
tree | 2adc53784220241216b8ef41697c9e984889575d /tools/h5repack/h5repacktst.c | |
parent | a4c82ed0491ce7e28079cdde9745b8ddfa9d60bc (diff) | |
download | hdf5-f384b17625179b29475b2ec836c949fe3b9d5e44.zip hdf5-f384b17625179b29475b2ec836c949fe3b9d5e44.tar.gz hdf5-f384b17625179b29475b2ec836c949fe3b9d5e44.tar.bz2 |
[svn-r15551] 1) There are 2 new command line parameters for h5repack. Together they allow a call to H5Pset_alignment to be made
-t T, --threshold=T Threshold value for H5Pset_alignment
-a A, --alignment=A Alignment value for H5Pset_alignment
2) bug fix
the printing of the dataset name was not done for references (verbose mode)
tested: windows, linux
Diffstat (limited to 'tools/h5repack/h5repacktst.c')
-rw-r--r-- | tools/h5repack/h5repacktst.c | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c index e7024f2..75af4f1 100644 --- a/tools/h5repack/h5repacktst.c +++ b/tools/h5repack/h5repacktst.c @@ -1403,6 +1403,9 @@ if (szip_can_encode) { *------------------------------------------------------------------------- */ TESTING(" file with added userblock"); + +#ifdef H5_HAVE_FILTER_DEFLATE + if(h5repack_init(&pack_options, 0) < 0) GOERROR; @@ -1420,7 +1423,72 @@ if (szip_can_encode) { GOERROR; if(h5repack_end(&pack_options) < 0) GOERROR; + + + PASSED(); +#else + SKIPPED(); +#endif + + +/*------------------------------------------------------------------------- + * test file with aligment + *------------------------------------------------------------------------- + */ + TESTING(" file with aligment"); + +#ifdef H5_HAVE_FILTER_DEFLATE + + if(h5repack_init(&pack_options, 0) < 0) + GOERROR; + + /* add the options for aligment */ + pack_options.alignment = 1; + pack_options.threshold = 1; + + if(h5repack(FNAME8, FNAME8OUT, &pack_options) < 0) + GOERROR; + if(h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if(h5repack_verify(FNAME8OUT, &pack_options) <= 0) + GOERROR; + + + /* verify aligment */ + { + hsize_t threshold; + hsize_t alignment; + hid_t fapl; + hid_t fid; + + if (( fid = H5Fopen(FNAME8OUT, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0 ) + GOERROR; + if ((fapl = H5Fget_access_plist(fid)) < 0) + GOERROR; + if ( H5Pget_alignment(fapl, &threshold, &alignment ) < 0) + GOERROR; + if ( threshold != 1 ) + GOERROR; + if ( alignment != 1 ) + GOERROR; + if ( H5Pclose(fapl) < 0) + GOERROR; + if (H5Fclose(fid) < 0) + GOERROR; + + } + + + if(h5repack_end(&pack_options) < 0) + GOERROR; + + PASSED(); +#else + SKIPPED(); +#endif + + |