diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2013-12-02 09:51:38 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2013-12-05 12:36:03 +0200 |
commit | e8fc8d87302aa7e53ca2ca4b3366e35dfba7303f (patch) | |
tree | 2fbdfe7f140cae6b42c7b9c245ca2ec3e4c57c14 /unit/test-avdtp.c | |
parent | 65959c7a55a964c498d3f5d690625c727c285b11 (diff) | |
download | bluez-e8fc8d87302aa7e53ca2ca4b3366e35dfba7303f.tar.gz |
unit/AVDTP: Add /TP/SIG/SMG/BI-21-C test
Verify that the IUT (ACP) is able to issue a reject response signal upon
tester's request in answer to a start stream command.
Diffstat (limited to 'unit/test-avdtp.c')
-rw-r--r-- | unit/test-avdtp.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/unit/test-avdtp.c b/unit/test-avdtp.c index b02334ff5..f6c7fb785 100644 --- a/unit/test-avdtp.c +++ b/unit/test-avdtp.c @@ -298,10 +298,27 @@ static gboolean sep_setconf_ind(struct avdtp *session, return TRUE; } +static gboolean sep_start_ind(struct avdtp *session, + struct avdtp_local_sep *sep, + struct avdtp_stream *stream, + uint8_t *err, + void *user_data) +{ + struct context *context = user_data; + + if (g_str_equal(context->data->test_name, "/TP/SIG/SMG/BI-21-C")) { + *err = 0xc0; + return FALSE; + } + + return TRUE; +} + static struct avdtp_sep_ind sep_ind = { .get_capability = sep_getcap_ind, .set_configuration = sep_setconf_ind, .open = sep_open_ind, + .start = sep_start_ind, }; static void sep_setconf_cfm(struct avdtp *session, struct avdtp_local_sep *sep, @@ -868,6 +885,19 @@ int main(int argc, char *argv[]) raw_pdu(0x22, 0x03), raw_pdu(0x30, 0x07, 0x04), raw_pdu(0x33, 0x07, 0x04, 0x31)); + define_test("/TP/SIG/SMG/BI-21-C", test_server, + raw_pdu(0x00, 0x01), + raw_pdu(0x02, 0x01, 0x04, 0x00), + raw_pdu(0x10, 0x02, 0x04), + raw_pdu(0x12, 0x02, 0x01, 0x00, 0x07, 0x06, 0x00, 0x00, + 0xff, 0xff, 0x02, 0x40), + raw_pdu(0x20, 0x03, 0x04, 0x04, 0x01, 0x00, 0x07, 0x06, + 0x00, 0x00, 0x21, 0x02, 0x02, 0x20), + raw_pdu(0x22, 0x03), + raw_pdu(0x30, 0x06, 0x04), + raw_pdu(0x32, 0x06), + raw_pdu(0x40, 0x07, 0x04), + raw_pdu(0x43, 0x07, 0x04, 0xc0)); return g_test_run(); } |