diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py index 9c15e78b..8a9954f0 100755 --- a/autotests/util/iwd.py +++ b/autotests/util/iwd.py @@ -851,6 +851,7 @@ class IWD(AsyncOpAbstract): if os.environ.get('IWD_TEST_VALGRIND', None) == 'on': args.append('valgrind') args.append('--leak-check=full') + args.append('--log-file=/tmp/valgrind.log') args.append('iwd') args.append('-c') diff --git a/tools/test-runner.c b/tools/test-runner.c index 415841c5..6d3e4574 100644 --- a/tools/test-runner.c +++ b/tools/test-runner.c @@ -1257,7 +1257,7 @@ done: static pid_t start_iwd(const char *config_dir, struct l_queue *wiphy_list, const char *ext_options) { - char *argv[12]; + char *argv[13]; char *iwd_phys = NULL; pid_t ret; int idx = 0; @@ -1265,6 +1265,7 @@ static pid_t start_iwd(const char *config_dir, struct l_queue *wiphy_list, if (valgrind) { argv[idx++] = "valgrind"; argv[idx++] = "--leak-check=full"; + argv[idx++] = "--log-file=/tmp/valgrind.log"; } if (strcmp(gdb_opt, "iwd") == 0) { @@ -1841,6 +1842,10 @@ static void create_network_and_run_tests(const void *key, void *value, if (iwd_pid > 0) terminate_iwd(iwd_pid); + if (valgrind) + if (system("cat /tmp/valgrind.log")) + l_info("cat /tmp/valgrind.log failed"); + if (ofono_req) { loopback_started = false; stop_ofono(ofono_pid);