unit/AVDTP: Add /TP/SIG/SMG/BV-07-C test

Verify that the IUT (INT) is able to issue a valid query for remote SEP
capabilities and reports the replied ones.
This commit is contained in:
Luiz Augusto von Dentz 2013-11-21 11:15:01 +02:00
parent 9b2143fa11
commit 498f18c908

View File

@ -198,11 +198,12 @@ static void execute_context(struct context *context)
static void test_server(gconstpointer data)
{
const struct test_data *test = data;
struct context *context = create_context();
struct context *context = create_context(0x0100);
context->pdu_list = test->pdu_list;
avdtp_register_sep(AVDTP_SEP_TYPE_SOURCE, AVDTP_MEDIA_TYPE_AUDIO, 0x00,
TRUE, NULL, NULL, NULL);
TRUE, NULL, NULL, NULL);
g_idle_add(send_pdu, context);
@ -230,6 +231,20 @@ static void test_discover(gconstpointer data)
g_free(test->pdu_list);
}
static void test_get_capabilities(gconstpointer data)
{
const struct test_data *test = data;
struct context *context = create_context(0x0100);
context->pdu_list = test->pdu_list;
avdtp_discover(context->session, discover_cb, NULL);
execute_context(context);
g_free(test->pdu_list);
}
int main(int argc, char *argv[])
{
g_test_init(&argc, &argv, NULL);
@ -248,6 +263,10 @@ int main(int argc, char *argv[])
define_test("/TP/SIG/SMG/BV-06-C", test_server,
raw_pdu(0x00, 0x01),
raw_pdu(0x02, 0x01, 0x04, 0x00));
define_test("/TP/SIG/SMG/BV-07-C", test_get_capabilities,
raw_pdu(0x10, 0x01),
raw_pdu(0x12, 0x01, 0x04, 0x00),
raw_pdu(0x20, 0x02, 0x04));
return g_test_run();
}