summaryrefslogtreecommitdiffstats
path: root/tools/test
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2022-04-01 19:19:43 (GMT)
committerGitHub <noreply@github.com>2022-04-01 19:19:43 (GMT)
commit210e0d91d158ea80e6d76d5656b2b467d0d1a9e6 (patch)
tree3b6cf0aaf9163158c22b36f092819c206383c9f3 /tools/test
parentf280d68e851015fed9db6b56dee05414c8f08921 (diff)
downloadhdf5-210e0d91d158ea80e6d76d5656b2b467d0d1a9e6.zip
hdf5-210e0d91d158ea80e6d76d5656b2b467d0d1a9e6.tar.gz
hdf5-210e0d91d158ea80e6d76d5656b2b467d0d1a9e6.tar.bz2
October 2021 Pull Requests not previously merged to 1.12 (#1570)
Diffstat (limited to 'tools/test')
-rw-r--r--tools/test/h5repack/CMakeTests.cmake4
-rw-r--r--tools/test/h5repack/h5repack.sh.in17
2 files changed, 16 insertions, 5 deletions
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index 6e9cdf7..09648ff 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -1552,12 +1552,12 @@
ADD_H5_TEST (HDFFV-7840 "TEST" h5diff_attr1.h5)
# test CVE-2018-17432 fix
- set (arg h5repack_CVE-2018-17432.h5 h5repack__CVE-2018-17432_out.h5 --low=1 --high=2 -f GZIP=8 -l dset1:CHUNK=5x6)
+ set (arg h5repack_CVE-2018-17432.h5 --low=1 --high=2 -f GZIP=8 -l dset1:CHUNK=5x6)
set (TESTTYPE "TEST")
ADD_H5_FILTER_TEST (HDFFV-10590 "" ${TESTTYPE} 1 ${arg})
# test CVE-2018-14460 fix
- set (arg h5repack_CVE-2018-14460.h5 h5repack_CVE-2018-14460_out.h5)
+ set (arg h5repack_CVE-2018-14460.h5)
set (TESTTYPE "TEST")
ADD_H5_FILTER_TEST (HDFFV-11223 "" ${TESTTYPE} 1 ${arg})
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in
index 3756a95..1e54670 100644
--- a/tools/test/h5repack/h5repack.sh.in
+++ b/tools/test/h5repack/h5repack.sh.in
@@ -885,13 +885,24 @@ TOOLTEST_FAIL()
(
cd $TESTDIR
$ENVCMD $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
- ) >$actual
+ ) >&$actual
RET=$?
- if [ $RET == 0 ] ; then
+
+ # Normally h5repack of files tested with this function are expected
+ # to return not 0, but if the command results in "Segmentation fault"
+ # or "core dumped" it is a failure regardless of the return value.
+ failure=`grep -e 'Segmentation fault' -e 'core dumped' $actual`
+ if [ "$failure" != "" ]; then
nerrors="`expr $nerrors + 1`"
echo " FAILED"
+ echo " $failure"
else
- echo " PASSED"
+ if [ $RET == 0 ] ; then
+ nerrors="`expr $nerrors + 1`"
+ echo " FAILED"
+ else
+ echo " PASSED"
+ fi
fi
rm -f $outfile
}