From: Arkadiusz Drabczyk <arkadiusz-42WfZ8EewN5g9hUCZPvPmw@public.gmane.org>
To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: valgrind tests don't test anything
Date: Sun, 8 Mar 2020 19:32:21 +0100 [thread overview]
Message-ID: <20200308183221.GA10025@comp.lan> (raw)
I'm not sure this is what David Gibson meant in
67b6b33b9b413a450a72135b5dc59c0a1e33e647 when he said:
"At present the valgrinding won't do anything useful for testcases
invoked via a shell script - which includes all the dtc testcases. I
plan to fix that later."
but if valgrind is called without --leak-check=full as in line 1038 in
tests/run_tests.sh it always returns 0 to the parent process and it
looks like there are no errors but in fact dtc suffers from memory
leaks:
$ valgrind ~/dtc/dtc -O dts t2080qds.dts
(...)
==9428==
==9428== HEAP SUMMARY:
==9428== in use at exit: 286,968 bytes in 8,355 blocks
==9428== total heap usage: 11,162 allocs, 2,807 frees, 1,157,178 bytes allocated
==9428==
==9428== LEAK SUMMARY:
==9428== definitely lost: 5,619 bytes in 174 blocks
==9428== indirectly lost: 106 bytes in 6 blocks
==9428== possibly lost: 0 bytes in 0 blocks
==9428== still reachable: 281,243 bytes in 8,175 blocks
==9428== suppressed: 0 bytes in 0 blocks
==9428== Rerun with --leak-check=full to see details of leaked memory
==9428==
==9428== For lists of detected and suppressed errors, rerun with: -s
==9428== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
If valgrind invocation in tests/run_tests is changed to something like
this:
VALGRIND="valgrind --leak-check=full --tool=memcheck -q --error-exitcode=$VGCODE"
then `make checkm' fails:
********** TEST SUMMARY
* Total testcases: 2067
* PASS: 1552
* FAIL: 1
* Bad configuration: 0
* valgrind errors: 514
* Strange test result: 0
**********
tests/Makefile.tests:92: recipe for target 'checkm' failed
make: *** [checkm] Error 1
--
Arkadiusz Drabczyk <arkadiusz-42WfZ8EewN5g9hUCZPvPmw@public.gmane.org>
next reply other threads:[~2020-03-08 18:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-08 18:32 Arkadiusz Drabczyk [this message]
[not found] ` <20200308183221.GA10025-Zrdc6muVEXg@public.gmane.org>
2020-03-09 8:29 ` valgrind tests don't test anything David Gibson
[not found] ` <20200309082920.GF617846-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2020-03-09 16:31 ` Arkadiusz Drabczyk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200308183221.GA10025@comp.lan \
--to=arkadiusz-42wfz8eewn5g9huczpvpmw@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.