All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tester: Remove test timeout for setup failure
@ 2014-01-20 10:00 Jakub Tyszkowski
  2014-01-20 10:00 ` [PATCH 2/2] android/pan: Initialize GError with NULL Jakub Tyszkowski
  2014-01-20 10:20 ` [PATCH 1/2] tester: Remove test timeout for setup failure Johan Hedberg
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Tyszkowski @ 2014-01-20 10:00 UTC (permalink / raw)
  To: linux-bluetooth

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] android/pan: Initialize GError with NULL
  2014-01-20 10:00 [PATCH 1/2] tester: Remove test timeout for setup failure Jakub Tyszkowski
@ 2014-01-20 10:00 ` Jakub Tyszkowski
  2014-01-20 10:20 ` [PATCH 1/2] tester: Remove test timeout for setup failure Johan Hedberg
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Tyszkowski @ 2014-01-20 10:00 UTC (permalink / raw)
  To: linux-bluetooth

This patch fixes the following issue:

bluetoothd[10552]: android/pan.c:register_nap_server()
bluetoothd[10552]: android/pan.c:nap_create_bridge() bnep
(bluetoothd:10552): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: l2cap_bind: Address already in use (98)
bluetoothd[10552]: android/pan.c:destroy_nap_device()
---
 android/pan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/android/pan.c b/android/pan.c
index dfd7762..3544d74 100644
--- a/android/pan.c
+++ b/android/pan.c
@@ -542,7 +542,7 @@ static void destroy_nap_device(void)
 
 static int register_nap_server(void)
 {
-	GError *gerr;
+	GError *gerr = NULL;
 	int err;
 
 	DBG("");
-- 
1.8.5.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] tester: Remove test timeout for setup failure
  2014-01-20 10:00 [PATCH 1/2] tester: Remove test timeout for setup failure Jakub Tyszkowski
  2014-01-20 10:00 ` [PATCH 2/2] android/pan: Initialize GError with NULL Jakub Tyszkowski
@ 2014-01-20 10:20 ` Johan Hedberg
  1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2014-01-20 10:20 UTC (permalink / raw)
  To: Jakub Tyszkowski; +Cc: linux-bluetooth

Hi Jakub,

On Mon, Jan 20, 2014, Jakub Tyszkowski wrote:
> 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(+)

Both patches have been applied. Thanks.

Johan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-20 10:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-20 10:00 [PATCH 1/2] tester: Remove test timeout for setup failure Jakub Tyszkowski
2014-01-20 10:00 ` [PATCH 2/2] android/pan: Initialize GError with NULL Jakub Tyszkowski
2014-01-20 10:20 ` [PATCH 1/2] tester: Remove test timeout for setup failure Johan Hedberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.