From aeed33339cf73e30de28dee2504f90ec169145c6 Mon Sep 17 00:00:00 2001 From: Jakub Tyszkowski Date: Tue, 4 Feb 2014 15:38:59 +0100 Subject: [PATCH] android/unit: Fix checking for expected termination 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 8af573987..d0f3f6b81 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; -- 2.47.3