From 962a69ec72d4a2329d2eaaf535f132233793e409 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 2 Dec 2013 12:25:52 +0200 Subject: [PATCH] unit/AVDTP: Add /TP/SIG/SMG/BI-22-C test Verify that the IUT (INT) is able to report the rejection by the remote device of the close stream command. --- unit/test-avdtp.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/unit/test-avdtp.c b/unit/test-avdtp.c index f6c7fb785..f05a1b1d7 100644 --- a/unit/test-avdtp.c +++ b/unit/test-avdtp.c @@ -384,7 +384,8 @@ static void sep_start_cfm(struct avdtp *session, struct avdtp_local_sep *sep, struct context *context = user_data; int ret; - if (g_str_equal(context->data->test_name, "/TP/SIG/SMG/BI-19-C")) { + if (g_str_equal(context->data->test_name, "/TP/SIG/SMG/BI-19-C") || + g_str_equal(context->data->test_name, "/TP/SIG/SMG/BI-22-C")) { g_assert(err != NULL); g_assert_cmpint(avdtp_error_error_code(err), ==, 0x31); context_quit(context); @@ -898,6 +899,19 @@ int main(int argc, char *argv[]) raw_pdu(0x32, 0x06), raw_pdu(0x40, 0x07, 0x04), raw_pdu(0x43, 0x07, 0x04, 0xc0)); + define_test("/TP/SIG/SMG/BI-22-C", test_client, + raw_pdu(0xa0, 0x01), + raw_pdu(0xa2, 0x01, 0x04, 0x00), + raw_pdu(0xb0, 0x02, 0x04), + raw_pdu(0xb2, 0x02, 0x01, 0x00, 0x07, 0x06, 0x00, 0x00, + 0xff, 0xff, 0x02, 0x40), + raw_pdu(0xc0, 0x03, 0x04, 0x04, 0x01, 0x00, 0x07, 0x06, + 0x00, 0x00, 0x21, 0x02, 0x02, 0x20), + raw_pdu(0xc2, 0x03), + raw_pdu(0xd0, 0x06, 0x04), + raw_pdu(0xd2, 0x06), + raw_pdu(0xe0, 0x07, 0x04), + raw_pdu(0xe3, 0x07, 0x04, 0x31)); return g_test_run(); } -- 2.47.3