From eebcecdd22b126fb57e7472a343987279639e8a6 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 27 Nov 2013 16:25:06 +0200 Subject: [PATCH] unit/AVDTP: Add /TP/SIG/SMG/BV-25-C test Verify that the IUT (INT) is able to issue a valid query for remote SEP capabilities and reports the replied ones using Get_All_Capabilities. --- unit/test-avdtp.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/unit/test-avdtp.c b/unit/test-avdtp.c index 0ddfa79d0..aad0dc591 100644 --- a/unit/test-avdtp.c +++ b/unit/test-avdtp.c @@ -367,7 +367,8 @@ static void discover_cb(struct avdtp *session, GSList *seps, int ret; if (g_str_equal(context->data->test_name, "/TP/SIG/SMG/BV-05-C") || - g_str_equal(context->data->test_name, "/TP/SIG/SMG/BV-07-C")) + g_str_equal(context->data->test_name, "/TP/SIG/SMG/BV-07-C") || + g_str_equal(context->data->test_name, "/TP/SIG/SMG/BV-25-C")) return; g_assert(err == NULL); @@ -416,6 +417,23 @@ static void test_client(gconstpointer data) avdtp_unregister_sep(sep); } +static void test_client_1_3(gconstpointer data) +{ + struct context *context = create_context(0x0103, data); + struct avdtp_local_sep *sep; + + sep = avdtp_register_sep(AVDTP_SEP_TYPE_SINK, AVDTP_MEDIA_TYPE_AUDIO, + 0x00, TRUE, NULL, &sep_cfm, + context); + context->sep = sep; + + avdtp_discover(context->session, discover_cb, context); + + execute_context(context); + + avdtp_unregister_sep(sep); +} + int main(int argc, char *argv[]) { g_test_init(&argc, &argv, NULL); @@ -608,6 +626,10 @@ int main(int argc, char *argv[]) raw_pdu(0x22, 0x03), raw_pdu(0x30, 0x0a, 0x04), raw_pdu(0x32, 0x0a)); + define_test("/TP/SIG/SMG/BV-25-C", test_client_1_3, + raw_pdu(0x30, 0x01), + raw_pdu(0x32, 0x01, 0x04, 0x00), + raw_pdu(0x40, 0x0c, 0x04)); return g_test_run(); }