linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/11] android/unit: Fix checking for expected termination
@ 2014-02-04 14:38 Jakub Tyszkowski
  2014-02-04 14:39 ` [PATCH 02/11] android/unit: Rename cmd handler Jakub Tyszkowski
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Jakub Tyszkowski @ 2014-02-04 14:38 UTC (permalink / raw)
  To: linux-bluetooth

This fix makes sure that when signalled termination is expected,
it actually happens. If IPC termination is expected no response will be
sent, so cmd_watch will never be executed. But if it is executed when
expecting termination, its a failure.
---
 android/test-ipc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/android/test-ipc.c b/android/test-ipc.c
index 8af5739..d0f3f6b 100644
--- a/android/test-ipc.c
+++ b/android/test-ipc.c
@@ -82,6 +82,8 @@ static gboolean cmd_watch(GIOChannel *io, GIOCondition cond,
 	uint8_t buf[128];
 	int sk;
 
+	g_assert(test_data->expected_signal == 0);
+
 	if (cond & (G_IO_HUP | G_IO_ERR | G_IO_NVAL)) {
 		g_assert(FALSE);
 		return FALSE;
-- 
1.8.5.2


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

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

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-04 14:38 [PATCH 01/11] android/unit: Fix checking for expected termination Jakub Tyszkowski
2014-02-04 14:39 ` [PATCH 02/11] android/unit: Rename cmd handler Jakub Tyszkowski
2014-02-04 14:39 ` [PATCH 03/11] android/unit: Add test cases for proper handler calls Jakub Tyszkowski
2014-02-04 14:39 ` [PATCH 04/11] android/unit: Add case for opcode without handler Jakub Tyszkowski
2014-02-04 14:39 ` [PATCH 05/11] android/unit: Add support for variable length data Jakub Tyszkowski
2014-02-04 14:39 ` [PATCH 06/11] android/unit: Add test case for variable sized data Jakub Tyszkowski
2014-02-04 14:39 ` [PATCH 07/11] android/unit: Add another " Jakub Tyszkowski
2014-02-04 14:39 ` [PATCH 08/11] android/unit: Add case for out of range service Jakub Tyszkowski
2014-02-04 14:39 ` [PATCH 09/11] android/unit: Add negative case for msg size verification Jakub Tyszkowski
2014-02-04 14:39 ` [PATCH 10/11] android/unit: Add case for sending incomplete header Jakub Tyszkowski
2014-02-04 14:39 ` [PATCH 11/11] android/unit: Add cases for msg size verification Jakub Tyszkowski
2014-02-04 20:37 ` [PATCH 01/11] android/unit: Fix checking for expected termination Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).