With some tests (specifically notification / indication tests), the client sets up a condition and then the server does something without a message from the client. This patch makes it possible to add a zero-length PDU which indicates that no message is expected from the client after a server response. --- unit/test-gatt.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/unit/test-gatt.c b/unit/test-gatt.c index cd90d83..7bc2168 100644 --- a/unit/test-gatt.c +++ b/unit/test-gatt.c @@ -250,6 +250,15 @@ static gboolean send_pdu(gpointer user_data) g_assert_cmpint(len, ==, pdu->size); context->process = 0; + + pdu = &context->data->pdu_list[context->pdu_offset]; + if (pdu->valid && (pdu->size == 0)) { + if (g_test_verbose()) + test_debug("(no action expected)", "GATT: "); + context->pdu_offset++; + return send_pdu(context); + } + return FALSE; } -- 2.2.0.rc0.207.ga3a616c -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html