diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-04-29 18:38:41 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-04-29 18:38:41 (GMT) |
commit | 87994982f9a061f8a8c5584dcafbde7b3b33b790 (patch) | |
tree | 511d65dcf60397c626db8283490dc0a2855bfd60 /tools/h5dump/testh5dump.sh.in | |
parent | 170e7e53a515be431a33c4e191b0be7c74e14ae5 (diff) | |
download | hdf5-87994982f9a061f8a8c5584dcafbde7b3b33b790.zip hdf5-87994982f9a061f8a8c5584dcafbde7b3b33b790.tar.gz hdf5-87994982f9a061f8a8c5584dcafbde7b3b33b790.tar.bz2 |
[svn-r20677] Merge packed bits option from 1.8 branch to trunk. CMake only. Autotools merge to come.
Tested: local Linux
Diffstat (limited to 'tools/h5dump/testh5dump.sh.in')
-rw-r--r-- | tools/h5dump/testh5dump.sh.in | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 9b56f7c..f8da64b 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -23,6 +23,9 @@ USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@" USE_FILTER_NBIT="@USE_FILTER_NBIT@" USE_FILTER_SCALEOFFSET="@USE_FILTER_SCALEOFFSET@" +# Determine if H5dump packed bits feature is included +Have_Packed_Bits="@PACKED_BITS@" + TESTNAME=h5dump EXIT_SUCCESS=0 EXIT_FAILURE=1 @@ -433,7 +436,11 @@ TOOLTEST tchar1.ddl -r tchar.h5 # test failure handling # Missing file name +if test "$Have_Packed_Bits" = "yes"; then + TOOLTEST tnofilename-with-packed-bits.ddl +else TOOLTEST tnofilename.ddl +fi # rev. 2004 @@ -638,6 +645,90 @@ TOOLTEST3 filter_fail.ddl --enable-error-stack filter_fail.h5 # test for -o -y for dataset with attributes TOOLTEST1 tall-6.ddl -y -o $TESTDIR/data -d /g1/g1.1/dset1.1.1 tall.h5 +# test for dataset packed bits +# Set up xCMD to test or skip. +if test "$Have_Packed_Bits" = "yes"; then + xCMD=TOOLTEST +else + xCMD=SKIP +fi +# Limits: +# Maximum number of packed bits is 8 (for now). +# Maximum integer size is 64 (for now). +# Maximun Offset is 63 (Maximum size - 1). +# Maximum Offset+Length is 64 (Maximum size). +# Tests: +# Normal operation on both signed and unsigned int datasets. +# Sanity check +# Their rawdata output should be the same. +$xCMD tpbitsSignedWhole.ddl -d /DS08BITS -M 0,8 packedbits.h5 +$xCMD tpbitsUnsignedWhole.ddl -d /DU08BITS -M 0,8 packedbits.h5 +$xCMD tpbitsSignedIntWhole.ddl -d /DS16BITS -M 0,16 packedbits.h5 +$xCMD tpbitsUnsignedIntWhole.ddl -d /DU16BITS -M 0,16 packedbits.h5 +$xCMD tpbitsSignedLongWhole.ddl -d /DS32BITS -M 0,32 packedbits.h5 +$xCMD tpbitsUnsignedLongWhole.ddl -d /DU32BITS -M 0,32 packedbits.h5 +$xCMD tpbitsSignedLongLongWhole.ddl -d /DS64BITS -M 0,64 packedbits.h5 +$xCMD tpbitsUnsignedLongLongWhole.ddl -d /DU64BITS -M 0,64 packedbits.h5 +$xCMD tpbitsSignedLongLongWhole63.ddl -d /DS64BITS -M 0,63 packedbits.h5 +$xCMD tpbitsUnsignedLongLongWhole63.ddl -d /DU64BITS -M 0,63 packedbits.h5 +$xCMD tpbitsSignedLongLongWhole1.ddl -d /DS64BITS -M 1,63 packedbits.h5 +$xCMD tpbitsUnsignedLongLongWhole1.ddl -d /DU64BITS -M 1,63 packedbits.h5 +# Half sections +$xCMD tpbitsSigned4.ddl -d /DS08BITS -M 0,4,4,4 packedbits.h5 +$xCMD tpbitsUnsigned4.ddl -d /DU08BITS -M 0,4,4,4 packedbits.h5 +$xCMD tpbitsSignedInt8.ddl -d /DS16BITS -M 0,8,8,8 packedbits.h5 +$xCMD tpbitsUnsignedInt8.ddl -d /DU16BITS -M 0,8,8,8 packedbits.h5 +$xCMD tpbitsSignedLong16.ddl -d /DS32BITS -M 0,16,16,16 packedbits.h5 +$xCMD tpbitsUnsignedLong16.ddl -d /DU32BITS -M 0,16,16,16 packedbits.h5 +$xCMD tpbitsSignedLongLong32.ddl -d /DS64BITS -M 0,32,32,32 packedbits.h5 +$xCMD tpbitsUnsignedLongLong32.ddl -d /DU64BITS -M 0,32,32,32 packedbits.h5 +# Quarter sections +$xCMD tpbitsSigned2.ddl -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5 +$xCMD tpbitsUnsigned2.ddl -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5 +$xCMD tpbitsSignedInt4.ddl -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5 +$xCMD tpbitsUnsignedInt4.ddl -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5 +$xCMD tpbitsSignedLong8.ddl -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5 +$xCMD tpbitsUnsignedLong8.ddl -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5 +$xCMD tpbitsSignedLongLong16.ddl -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5 +$xCMD tpbitsUnsignedLongLong16.ddl -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5 +# Begin and End +$xCMD tpbitsSigned.ddl -d /DS08BITS -M 0,2,2,6 packedbits.h5 +$xCMD tpbitsUnsigned.ddl -d /DU08BITS -M 0,2,2,6 packedbits.h5 +$xCMD tpbitsSignedInt.ddl -d /DS16BITS -M 0,2,10,6 packedbits.h5 +$xCMD tpbitsUnsignedInt.ddl -d /DU16BITS -M 0,2,10,6 packedbits.h5 +$xCMD tpbitsSignedLong.ddl -d /DS32BITS -M 0,2,26,6 packedbits.h5 +$xCMD tpbitsUnsignedLong.ddl -d /DU32BITS -M 0,2,26,6 packedbits.h5 +$xCMD tpbitsSignedLongLong.ddl -d /DS64BITS -M 0,2,58,6 packedbits.h5 +$xCMD tpbitsUnsignedLongLong.ddl -d /DU64BITS -M 0,2,58,6 packedbits.h5 +# Overlapped packed bits. +$xCMD tpbitsOverlapped.ddl -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5 +# Maximum number of packed bits. +$xCMD tpbitsMax.ddl -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5 +# Compound type. +$xCMD tpbitsCompound.ddl -d /dset1 -M 0,1,1,1 tcompound.h5 +# Array type. +$xCMD tpbitsArray.ddl -d /Dataset1 -M 0,1,1,1 tarray1.h5 +# Test Error handling. +# Too many packed bits requested. Max is 8 for now. +$xCMD tpbitsMaxExceeded.ddl -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5 +# Offset too large. Max is 7 (8-1) for now. +$xCMD tpbitsOffsetExceeded.ddl -d /DS08BITS -M 64,1 packedbits.h5 +$xCMD tpbitsCharOffsetExceeded.ddl -d /DS08BITS -M 8,1 packedbits.h5 +$xCMD tpbitsIntOffsetExceeded.ddl -d /DS16BITS -M 16,1 packedbits.h5 +$xCMD tpbitsLongOffsetExceeded.ddl -d /DS32BITS -M 32,1 packedbits.h5 +# Bad offset, must not be negative. +$xCMD tpbitsOffsetNegative.ddl -d /DS08BITS -M -1,1 packedbits.h5 +# Bad length, must not be positive. +$xCMD tpbitsLengthPositive.ddl -d /DS08BITS -M 4,0 packedbits.h5 +# Offset+Length is too large. Max is 8 for now. +$xCMD tpbitsLengthExceeded.ddl -d /DS08BITS -M 37,28 packedbits.h5 +$xCMD tpbitsCharLengthExceeded.ddl -d /DS08BITS -M 2,7 packedbits.h5 +$xCMD tpbitsIntLengthExceeded.ddl -d /DS16BITS -M 10,7 packedbits.h5 +$xCMD tpbitsLongLengthExceeded.ddl -d /DS32BITS -M 26,7 packedbits.h5 +# Incomplete pair of packed bits request. +$xCMD tpbitsIncomplete.ddl -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5 + + # Report test results and exit if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." |