* [PATCH] test-runner: erase valgrind log after each test
@ 2019-11-13 19:41 James Prestwood
2019-11-13 22:36 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: James Prestwood @ 2019-11-13 19:41 UTC (permalink / raw
To: iwd
[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]
After changing the valgrind log to --log-fd, it appears that
the log file just gets appended, where before it was overwritten.
This makes test print out all previous tests valgrind results.
Now after printing out the valgrind info we can erase the file
for the next test.
---
tools/test-runner.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/test-runner.c b/tools/test-runner.c
index 043e8cc7..075f56d6 100644
--- a/tools/test-runner.c
+++ b/tools/test-runner.c
@@ -2226,10 +2226,14 @@ static void create_network_and_run_tests(void *data, void *user_data)
terminate_iwd(iwd_pid);
/* /tmp/valgrind.log will only exist without logging turned on */
- if (valgrind && !log)
+ if (valgrind && !log) {
if (system("cat /tmp/valgrind.log"))
l_info("cat /tmp/valgrind.log failed");
+ if (system("echo \"\" > /tmp/valgrind.log"))
+ l_info("Failed to reset /tmp/valgrind.log");
+ }
+
if (log) {
L_AUTO_FREE_VAR(char *, dmesg);
L_AUTO_FREE_VAR(char *, kernel_log);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] test-runner: erase valgrind log after each test
2019-11-13 19:41 [PATCH] test-runner: erase valgrind log after each test James Prestwood
@ 2019-11-13 22:36 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2019-11-13 22:36 UTC (permalink / raw
To: iwd
[-- Attachment #1: Type: text/plain, Size: 488 bytes --]
Hi James,
On 11/13/19 1:41 PM, James Prestwood wrote:
> After changing the valgrind log to --log-fd, it appears that
> the log file just gets appended, where before it was overwritten.
> This makes test print out all previous tests valgrind results.
>
> Now after printing out the valgrind info we can erase the file
> for the next test.
> ---
> tools/test-runner.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
Applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-13 22:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-13 19:41 [PATCH] test-runner: erase valgrind log after each test James Prestwood
2019-11-13 22:36 ` Denis Kenzior
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.