Skip to contentSkip to conversation

tester: Remove timeout if pre-setup failed

PATCH Applied Inga Stotland 2 participants 2 messages Apr 23, 2021 – Apr 26, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tester: Remove timeout if pre-setup failed

If test pre setup stage fails, remove test run timeout. Also, fix a stray call to free(): should be l_free().

---
 ell/tester.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
ell/tester.c +4 -1
index 54fbb4b..7625b93 100644
@@ -279,6 +279,9 @@ LIB_EXPORT void l_tester_pre_setup_failed(struct l_tester *tester)
 
 	print_progress(test->name, COLOR_RED, "pre setup failed");
 
+	l_timeout_remove(test->run_timer);
+	test->run_timer = NULL;
+
 	l_idle_oneshot(done_callback, tester, NULL);
 }
 
@@ -501,7 +504,7 @@ static void wait_callback(struct l_timeout *timer, void *user_data)
 
 	wait->func(wait->user_data);
 
-	free(wait);
+	l_free(wait);
 
 	l_timeout_remove(timer);
 }
Signature · 1 line
2.26.3
#1 lore raw

Hi Inga,

Quoted 6 lines · Inga Stotland

If test pre setup stage fails, remove test run timeout. Also, fix a stray call to free(): should be l_free().

---
  ell/tester.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

Applied, thanks.

Regards,
-Denis