mirror of https://github.com/getdnsapi/getdns.git
Extend server capabilities with valgrind
This commit is contained in:
parent
193bc618a5
commit
6f7f6046eb
|
@ -76,6 +76,7 @@ void handler(getdns_context *context, getdns_callback_type_t callback_type,
|
|||
} else {
|
||||
if (getdns_reply(context, request, request_id))
|
||||
getdns_reply(context, NULL, request_id);
|
||||
getdns_dict_destroy(request);
|
||||
return;
|
||||
}
|
||||
getdns_dict_destroy(request);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
make clean || true
|
||||
rm -fr .libs Makefile *_out
|
||||
rm -fr .libs Makefile *_out valgrind.log
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
|
||||
|
||||
make && "./${TPKG_NAME}" | (
|
||||
make && "${BUILDDIR}/build/libtool" exec valgrind -v --log-file=valgrind.log --leak-check=full --error-exitcode=1 --track-origins=yes "./${TPKG_NAME}" | (
|
||||
read PORT
|
||||
read PORT2
|
||||
|
||||
|
@ -15,6 +15,12 @@ make && "./${TPKG_NAME}" | (
|
|||
|
||||
${GETDNS_STUB_QUERY} -s -q @127.0.0.1:$PORT TXT quit.
|
||||
)
|
||||
if grep -q 'definitely lost: [^0]' valgrind.log
|
||||
then
|
||||
cat valgrind.log
|
||||
echo "error: Memory loss!"
|
||||
exit 1
|
||||
fi
|
||||
if ! grep -q '"status": GETDNS_RESPSTATUS_ALL_TIMEOUT' time_out
|
||||
then
|
||||
cat time_out
|
||||
|
|
Loading…
Reference in New Issue