3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 01:19:23 +01:00

test-runner: fix warning in gdb patch

This commit is contained in:
James Prestwood 2018-04-03 13:34:56 -07:00 committed by Denis Kenzior
parent cb1ed123e4
commit f67505c5df

View File

@ -1523,7 +1523,7 @@ static void run_py_tests(struct l_settings *hw_settings,
struct l_queue *test_stats_queue) struct l_queue *test_stats_queue)
{ {
char *argv[3]; char *argv[3];
pid_t test_exec_pid, test_timer_pid; pid_t test_exec_pid, test_timer_pid = -1;
struct timeval time_before, time_after, time_elapsed; struct timeval time_before, time_after, time_elapsed;
unsigned int max_exec_interval; unsigned int max_exec_interval;
char *py_test = NULL; char *py_test = NULL;
@ -1575,7 +1575,8 @@ start_next_test:
if (test_exec_pid == corpse) { if (test_exec_pid == corpse) {
gettimeofday(&time_after, NULL); gettimeofday(&time_after, NULL);
kill_process(test_timer_pid); if (test_timer_pid != -1)
kill_process(test_timer_pid);
timersub(&time_after, &time_before, &time_elapsed); timersub(&time_after, &time_before, &time_elapsed);
interval = time_elapsed.tv_sec + interval = time_elapsed.tv_sec +