summaryrefslogtreecommitdiff
path: root/unit
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-11-28 15:28:54 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-12-05 12:36:03 +0200
commit2efe4e4a433cc39f126d30789eff51dc378d27bc (patch)
tree9f37e8b8c5858581bb7c0a3289ea32f054864536 /unit
parent262e11982bfb94d0da66a862facf6e71330ef23f (diff)
unit/AVDTP: Add /TP/SIG/SMG/BI-02-C test
Verify that the IUT (iACP) is able to discard a corrupted stream discover command received by the INT.
Diffstat (limited to 'unit')
-rw-r--r--unit/test-avdtp.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/unit/test-avdtp.c b/unit/test-avdtp.c
index 59feb680e..0451904a6 100644
--- a/unit/test-avdtp.c
+++ b/unit/test-avdtp.c
@@ -99,9 +99,13 @@ static void test_free(gconstpointer user_data)
g_free(data->pdu_list);
}
-static void context_quit(struct context *context)
+static gboolean context_quit(gpointer user_data)
{
+ struct context *context = user_data;
+
g_main_loop_quit(context->main_loop);
+
+ return FALSE;
}
static gboolean send_pdu(gpointer user_data)
@@ -119,6 +123,9 @@ static gboolean send_pdu(gpointer user_data)
g_assert(len == (ssize_t) pdu->size);
+ if (g_str_equal(context->data->test_name, "/TP/SIG/SMG/BI-02-C"))
+ g_timeout_add_seconds(1, context_quit, context);
+
return FALSE;
}
@@ -685,6 +692,8 @@ int main(int argc, char *argv[])
define_test("/TP/SIG/SMG/BI-01-C", test_client,
raw_pdu(0xb0, 0x01),
raw_pdu(0xb3, 0x01, 0x01));
+ define_test("/TP/SIG/SMG/BI-02-C", test_server,
+ raw_pdu(0x01, 0x01));
return g_test_run();
}