Return-Path: From: Jakub Tyszkowski To: linux-bluetooth@vger.kernel.org Subject: [PATCH 01/11] android/unit: Fix checking for expected termination Date: Tue, 4 Feb 2014 15:38:59 +0100 Message-Id: <1391524749-2518-1-git-send-email-jakub.tyszkowski@tieto.com> Sender: linux-bluetooth-owner@vger.kernel.org List-ID: 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