All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] Add bonding test cases
@ 2014-02-02 11:16 Andrzej Kaczmarek
  2014-02-02 11:16 ` [PATCH 01/11] android/tester: Coding style and syntax fix Andrzej Kaczmarek
                   ` (10 more replies)
  0 siblings, 11 replies; 17+ messages in thread
From: Andrzej Kaczmarek @ 2014-02-02 11:16 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Andrzej Kaczmarek

Hi,

A bit more explanation for last patch in this series:

We've encountered random timeouts for test cases which we found to be
because of missing "credit" in bthost which queued HCI command
indefinitely. The problem here was that previous HCI command in bthost
was sent from notification_handler thread in android-tester while reply
was handled in main thread. This caused race condition in bthost code
which is not thread-safe.

A quick fix for this would be to simply change order of operations in
send_command as follows:

if (bthost->ncmd) {
	bthost->ncmd--;
	send_packet(bthost, pkt_data, pkt_len);
} else {


So, first decrease number of "credits" and then send packet, so command
complete received in another thread cannot overwrite this value before
it's updated. But since this does not make code thread-safe and just
hides problem temporarily, we've decided to wrap all callbacks from
notification_thread to serialize their execution in main loop.


Andrzej Kaczmarek (1):
  android/tester: Make bt_callbacks thread-safe

Grzegorz Kolodziejczyk (10):
  android/tester: Coding style and syntax fix
  android/tester: Add create bond with PIN success test case
  android/tester: Add create bond with PIN fail test case
  android/tester: Add create bond with SSP sucess test case
  android/tester: Add create bond with SSP fail test case
  android/tester: Add create bond with no discovery test case
  android/tester: Add create bond with bad addr fail test case
  android/tester: Add cancel bond success test case
  android/tester: Add remove bond success test case
  android/tester: Add remove bond bad addr dev test case

 android/android-tester.c | 809 ++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 763 insertions(+), 46 deletions(-)

-- 
1.8.5.2


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

end of thread, other threads:[~2014-02-16 21:04 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-02 11:16 [PATCH 00/11] Add bonding test cases Andrzej Kaczmarek
2014-02-02 11:16 ` [PATCH 01/11] android/tester: Coding style and syntax fix Andrzej Kaczmarek
2014-02-02 11:16 ` [PATCH 02/11] android/tester: Add create bond with PIN success test case Andrzej Kaczmarek
2014-02-02 12:45   ` Anderson Lizardo
2014-02-02 11:16 ` [PATCH 03/11] android/tester: Add create bond with PIN fail " Andrzej Kaczmarek
2014-02-02 11:16 ` [PATCH 04/11] android/tester: Add create bond with SSP sucess " Andrzej Kaczmarek
2014-02-02 11:16 ` [PATCH 05/11] android/tester: Add create bond with SSP fail " Andrzej Kaczmarek
2014-02-02 11:16 ` [PATCH 06/11] android/tester: Add create bond with no discovery " Andrzej Kaczmarek
2014-02-02 11:16 ` [PATCH 07/11] android/tester: Add create bond with bad addr fail " Andrzej Kaczmarek
2014-02-02 11:16 ` [PATCH 08/11] android/tester: Add cancel bond success " Andrzej Kaczmarek
2014-02-02 11:16 ` [PATCH 09/11] android/tester: Add remove " Andrzej Kaczmarek
2014-02-02 11:16 ` [PATCH 10/11] android/tester: Add remove bond bad addr dev " Andrzej Kaczmarek
2014-02-02 11:16 ` [PATCH 11/11] android/tester: Make bt_callbacks thread-safe Andrzej Kaczmarek
2014-02-02 13:27   ` Anderson Lizardo
2014-02-02 16:55     ` Marcel Holtmann
2014-02-02 20:12       ` Anderson Lizardo
2014-02-16 21:04       ` Szymon Janc

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.