diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2020-11-12 17:22:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-12 17:22:10 (GMT) |
commit | fa40c6c59af5d9aabd4b478cd02f8a9f7ebf7922 (patch) | |
tree | 75c00aea365eda20d91a2f1f90b2fa7e573ec4b9 /tools/test/h5repack/h5repack.sh.in | |
parent | cfb82afb80dca259ac2cf96bf24a941d27869a52 (diff) | |
parent | 9cde5c52b8183e9899a42fe161556a3969095fb1 (diff) | |
download | hdf5-fa40c6c59af5d9aabd4b478cd02f8a9f7ebf7922.zip hdf5-fa40c6c59af5d9aabd4b478cd02f8a9f7ebf7922.tar.gz hdf5-fa40c6c59af5d9aabd4b478cd02f8a9f7ebf7922.tar.bz2 |
Merge pull request #60 from bmribler/develop
Fix HDFFV-10590
Diffstat (limited to 'tools/test/h5repack/h5repack.sh.in')
-rw-r--r-- | tools/test/h5repack/h5repack.sh.in | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in index a95a22e..3764081 100644 --- a/tools/test/h5repack/h5repack.sh.in +++ b/tools/test/h5repack/h5repack.sh.in @@ -128,6 +128,8 @@ $SRC_H5REPACK_TESTFILES/h5repack_paged_nopersist.h5 $SRC_H5REPACK_TESTFILES/h5repack_paged_persist.h5 ########h5diff/testfile######## $SRC_H5DIFF_TESTFILES/h5diff_attr1.h5 +########test#HDFFV-10590######## +$SRC_H5REPACK_TESTFILES/h5repack_HDFFV-10590_CVE-2018-17432.h5 ########tools/testfiles#for#external#links######## $SRC_TOOLS_TESTFILES/tsoftlinks.h5 $SRC_TOOLS_TESTFILES/textlinkfar.h5 @@ -865,6 +867,34 @@ TOOLTESTV() rm -f $outfile } +# Same as TOOLTEST, but expects h5repack fails +# +TOOLTEST_FAIL() +{ + infile=$1 + outfile=$2 + expect="$TESTDIR/$2-$1.ddl" + actual="$TESTDIR/$2-$1.out" + actual_err="$TESTDIR/$2-$1.err" + shift + shift + + # Run test. + TESTING $H5REPACK $@ + ( + cd $TESTDIR + $ENVCMD $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile + ) >$actual + RET=$? + if [ $RET == 0 ] ; then + nerrors="`expr $nerrors + 1`" + echo " FAILED" + else + echo " PASSED" + fi + rm -f $outfile +} + # This is same as TOOLTESTV() with comparing display output # with actual filename swapped # @@ -1681,6 +1711,10 @@ TOOLTEST HDFFV-5932 h5repack_attr_refs.h5 # Note: this test is experimental for sharing test file among tools TOOLTEST HDFFV-7840 h5diff_attr1.h5 +# test HDFFV-10590 +arg="h5repack_HDFFV-10590_CVE-2018-17432.h5 h5repack_HDFFV-10590_CVE-2018-17432_out.h5 --low=1 --high=2 -f GZIP=8 -l dset1:CHUNK=5x6" +TOOLTEST_FAIL $arg + # tests for metadata block size option TOOLTEST_META meta_short h5repack_layout.h5 -M 8192 TOOLTEST_META meta_long h5repack_layout.h5 --metadata_block_size=8192 |