summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/CMakeLists.txt
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2012-09-24 23:13:57 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2012-09-24 23:13:57 (GMT)
commit50e3990f2a9e3bba421460d8d5cb21bb6f6e98fe (patch)
tree764c642d62a1082e02cb0004871dc33b81dbff08 /tools/h5repack/CMakeLists.txt
parent528bd520b83136e9c50ac6cff4ac116fc8054e7a (diff)
downloadhdf5-50e3990f2a9e3bba421460d8d5cb21bb6f6e98fe.zip
hdf5-50e3990f2a9e3bba421460d8d5cb21bb6f6e98fe.tar.gz
hdf5-50e3990f2a9e3bba421460d8d5cb21bb6f6e98fe.tar.bz2
[svn-r22805] Purpose:
HDFFV-8012 - h5repack changes max dims and cause failure if only "-f none" is used without changing layout for chunked dataset when a chunk dim is bigger than a dataset dim Description: "h5repack -f <obj>:NONE <file.h5> out.h5" command failed if source file contains chunked dataset and a chunk dim is bigger than a dataset dim. Another issue is that the command changed max dims if chunk dim is smaller than the dataset dim. These issue occurred when dataset size is smaller than 64k (compact size limit) Fixed them. Tested: jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Windows (32-LE cmake), cmake (jam)
Diffstat (limited to 'tools/h5repack/CMakeLists.txt')
-rw-r--r--tools/h5repack/CMakeLists.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index 3ee1cba..7351fd5 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -800,6 +800,28 @@ ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CONT
ADD_H5_TEST (chunk2compa "TEST" h5repack_layout3.h5 -l chunk_unlimit1:COMPA)
ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK)
+#--------------------------------------------------------------------------
+# Test -f for some specific cases. Chunked dataset with unlimited max dims.
+# (HDFFV-8012)
+#--------------------------------------------------------------------------
+# - should not fail
+# - should not change max dims from unlimit
+
+# chunk dim is bigger than dataset dim. ( dset size < 64k )
+ADD_H5_TEST (error1 "TEST" h5repack_layout3.h5 -f chunk_unlimit1:NONE)
+ADD_H5_VERIFY_TEST (error1 "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED)
+
+# chunk dim is bigger than dataset dim. ( dset size > 64k )
+ADD_H5_TEST (error2 "TEST" h5repack_layout3.h5 -f chunk_unlimit2:NONE)
+ADD_H5_VERIFY_TEST (error2 "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED)
+
+# chunk dims are smaller than dataset dims. ( dset size < 64k )
+ADD_H5_TEST (error3 "TEST" h5repack_layout3.h5 -f chunk_unlimit3:NONE)
+ADD_H5_VERIFY_TEST (error3 "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED)
+
+# file input - should not fail
+ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE)
+
# Native option
# Do not use FILE1, as the named dtype will be converted to native, and h5diff will
# report a difference.