mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
test-runner: erase valgrind log after each test
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.
This commit is contained in:
parent
cb00ae1481
commit
186a5195b5
@ -2226,10 +2226,14 @@ static void create_network_and_run_tests(void *data, void *user_data)
|
|||||||
terminate_iwd(iwd_pid);
|
terminate_iwd(iwd_pid);
|
||||||
|
|
||||||
/* /tmp/valgrind.log will only exist without logging turned on */
|
/* /tmp/valgrind.log will only exist without logging turned on */
|
||||||
if (valgrind && !log)
|
if (valgrind && !log) {
|
||||||
if (system("cat /tmp/valgrind.log"))
|
if (system("cat /tmp/valgrind.log"))
|
||||||
l_info("cat /tmp/valgrind.log failed");
|
l_info("cat /tmp/valgrind.log failed");
|
||||||
|
|
||||||
|
if (system("echo \"\" > /tmp/valgrind.log"))
|
||||||
|
l_info("Failed to reset /tmp/valgrind.log");
|
||||||
|
}
|
||||||
|
|
||||||
if (log) {
|
if (log) {
|
||||||
L_AUTO_FREE_VAR(char *, dmesg);
|
L_AUTO_FREE_VAR(char *, dmesg);
|
||||||
L_AUTO_FREE_VAR(char *, kernel_log);
|
L_AUTO_FREE_VAR(char *, kernel_log);
|
||||||
|
Loading…
Reference in New Issue
Block a user