[PATCH 1/2] tester: Remove test timeout for setup failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If setup fails, timeout function is not removed and still can be called,
causing random subsequent case failure.
---
 src/shared/tester.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/shared/tester.c b/src/shared/tester.c
index f3edd74..06fc415 100644
--- a/src/shared/tester.c
+++ b/src/shared/tester.c
@@ -460,6 +460,11 @@ void tester_setup_failed(void)
 	if (test->stage != TEST_STAGE_SETUP)
 		return;
 
+	if (test->timeout_id > 0) {
+		g_source_remove(test->timeout_id);
+		test->timeout_id = 0;
+	}
+
 	print_progress(test->name, COLOR_RED, "setup failed");
 
 	g_idle_add(done_callback, test);
-- 
1.8.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux