From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 2/2] auto-t: don't print valgrind log if there was no error
Date: Wed, 24 Jul 2024 05:14:43 -0700 [thread overview]
Message-ID: <20240724121443.1425256-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20240724121443.1425256-1-prestwoj@gmail.com>
If valgrind didn't report any issues, don't dump the logs. This
makes the test run a lot easier to look at without having to scroll
through pages of valgrind logs that provide no value.
---
tools/run-tests | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/tools/run-tests b/tools/run-tests
index fdd0b989..e043965b 100755
--- a/tools/run-tests
+++ b/tools/run-tests
@@ -899,12 +899,18 @@ def post_test(ctx, to_copy):
if ctx.args.valgrind:
for f in os.listdir('/tmp'):
- if f.startswith("valgrind.log."):
- dbg(f)
- with open('/tmp/' + f, 'r') as v:
- dbg(v.read())
+ if not f.startswith("valgrind.log."):
+ continue
+
+ with open('/tmp/' + f, 'r') as v:
+ result = v.read()
+
+ # Don't print out the result if there were no issues
+ if "0 errors from 0 contexts" not in result:
+ dbg(result)
dbg("\n")
- os.remove('/tmp/' + f)
+
+ os.remove('/tmp/' + f)
# Special case for when logging is enabled
if os.path.isfile('/tmp/iwd-tls-debug-server-cert.pem'):
--
2.34.1
next prev parent reply other threads:[~2024-07-24 12:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-24 12:14 [PATCH 1/2] scan: fix invalid read when canceling an ongoing scan James Prestwood
2024-07-24 12:14 ` James Prestwood [this message]
2024-07-24 14:14 ` Denis Kenzior
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=20240724121443.1425256-2-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox