summaryrefslogtreecommitdiff
path: root/regress/test-exec.sh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2019-07-18 11:09:38 +1000
committerDarren Tucker <dtucker@dtucker.net>2019-07-18 11:09:38 +1000
commita192021fedead23c375077f92346336d531f8cad (patch)
tree1f193999f987b637985e7464a18054525d356599 /regress/test-exec.sh
parentd1c491ecb939ee10b341fa7bb6205dff19d297e5 (diff)
downloadopenssh-git-a192021fedead23c375077f92346336d531f8cad.tar.gz
Fail tests if Valgrind enabled and reports errors.
Also dump the failing valgrind report to stdout (not the cleanest solution, but better than nothing).
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r--regress/test-exec.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index a0bff311..f699f34d 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -587,6 +587,21 @@ start_sshd ()
# kill sshd
cleanup
+
+if [ "x$USE_VALGRIND" != "x" ]; then
+ # wait for any running process to complete
+ wait; sleep 1
+ VG_ERROR=0
+ for i in $OBJ/valgrind-out/*; do
+ if grep "ERROR SUMMARY" $i >/dev/null && \
+ ! grep "ERROR SUMMARY: 0 errors" $i >/dev/null; then
+ RESULT=1
+ verbose valgrind failure $i
+ cat $i
+ fi
+ done
+fi
+
if [ $RESULT -eq 0 ]; then
verbose ok $tid
else