summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-08-25 12:01:37 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2017-08-27 15:58:28 +0200
commit2d41a382c2812b93782f7502f688bd00f5611c6d (patch)
tree71200554ec17e679f0ae24bfb351067c707af853
parent2a1aca3f99cafa9d01fe5c28285e3fdfbfbba591 (diff)
downloadgnutls-2d41a382c2812b93782f7502f688bd00f5611c6d.tar.gz
tests: krb5-test: disable valgrind mem leak checks for negative checks
Resolves #192 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rwxr-xr-xtests/cert-tests/krb5-test8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/cert-tests/krb5-test b/tests/cert-tests/krb5-test
index a331acbb4f..3eca7d7e31 100755
--- a/tests/cert-tests/krb5-test
+++ b/tests/cert-tests/krb5-test
@@ -37,6 +37,7 @@ export TZ="UTC"
check_for_datefudge
if ! test -z "${VALGRIND}"; then
+ ORIG_VALGRIND=${VALGRIND}
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=3"
fi
@@ -59,6 +60,13 @@ if test "${rc}" != "0"; then
exit ${rc}
fi
+# disable all parameters to valgrind, to prevent memleak checking on
+# the following tests (negative tests which have leaks in the tools).
+if ! test -z "${ORIG_VALGRIND}"; then
+ VALGRIND=$(echo ${ORIG_VALGRIND}|cut -d ' ' -f 1)
+ VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=3"
+fi
+
# Negative tests. Check against values which may cause problems
cp "${srcdir}/templates/template-krb5name.tmpl" ${TMPLFILE}
echo "krb5_principal = 'xxxxxxxxxxxxxx'" >>${TMPLFILE}