diff --git a/src/test/tpkg/125-valgrind-checks.tpkg/125-valgrind-checks.test b/src/test/tpkg/125-valgrind-checks.tpkg/125-valgrind-checks.test index 110c98d7..6891eb2d 100644 --- a/src/test/tpkg/125-valgrind-checks.tpkg/125-valgrind-checks.test +++ b/src/test/tpkg/125-valgrind-checks.tpkg/125-valgrind-checks.test @@ -12,6 +12,11 @@ qwerlkjhasdfpuiqwyerm.1234kjhrqwersv.com -H 8.8.8.8 -H 2a04:b900:0:100::37 EOT -valgrind -v --leak-check=full --error-exitcode=1 --errors-for-leak-kinds=definite,possible --track-origins=yes true || valgrind --help -"${BUILDDIR}/build/libtool" exec valgrind -v --leak-check=full --error-exitcode=1 --errors-for-leak-kinds=definite,possible --track-origins=yes "${GETDNS_QUERY}" -F queries -f "${TPKG_NAME}.ds" +dnssec_return_validation_chain - +( + if ! "${BUILDDIR}/build/libtool" exec valgrind -v --leak-check=full --error-exitcode=1 --track-origins=yes "${GETDNS_QUERY}" -F queries -f "${TPKG_NAME}.ds" +dnssec_return_validation_chain + then + exit 1 + fi +) 2>&1 | tee output +awk '/^==.*(definitely|indirectly|possibly) lost/{print;if($4>0)exit(1)}' output +exit 1 \ No newline at end of file diff --git a/src/test/tpkg/225-stub-only-valgrind-checks.tpkg/225-stub-only-valgrind-checks.test b/src/test/tpkg/225-stub-only-valgrind-checks.tpkg/225-stub-only-valgrind-checks.test index 71aa6cc3..5a0ad456 100644 --- a/src/test/tpkg/225-stub-only-valgrind-checks.tpkg/225-stub-only-valgrind-checks.test +++ b/src/test/tpkg/225-stub-only-valgrind-checks.tpkg/225-stub-only-valgrind-checks.test @@ -12,4 +12,10 @@ qwerlkjhasdfpuiqwyerm.1234kjhrqwersv.com -H 8.8.8.8 -H 2a04:b900:0:100::37 EOT -"${BUILDDIR}/build-stub-only/libtool" exec valgrind -v --leak-check=full --error-exitcode=1 --errors-for-leak-kinds=definite,possible --track-origins=yes "${GETDNS_STUB_QUERY}" -F queries -f "${TPKG_NAME}.ds" +dnssec_return_validation_chain +( + if ! "${BUILDDIR}/build-stub-only/libtool" exec valgrind -v --leak-check=full --error-exitcode=1 --track-origins=yes "${GETDNS_STUB_QUERY}" -F queries -f "${TPKG_NAME}.ds" +dnssec_return_validation_chain + then + exit 1 + fi +) 2>&1 | tee output +awk '/^==.*(definitely|indirectly|possibly) lost/{print;if($4>0)exit(1)}' output