summaryrefslogtreecommitdiff
path: root/unit
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-12-01 18:17:09 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-12-05 12:36:03 +0200
commit74ffa14d50220aab298a3753ba743e2c266a8a64 (patch)
treeb6711227e42a252bf66b75bd484759004348381d /unit
parent8affb8d345713bae7aa04b717ae3314fd3c9ec07 (diff)
unit/AVDTP: Add /TP/SIG/SMG/BI-19-C test
Verify that the IUT (INT) is able to report the rejection by the remote device of the start stream command.
Diffstat (limited to 'unit')
-rw-r--r--unit/test-avdtp.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/unit/test-avdtp.c b/unit/test-avdtp.c
index f8ecf1d84..9919b6d0e 100644
--- a/unit/test-avdtp.c
+++ b/unit/test-avdtp.c
@@ -367,6 +367,13 @@ 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")) {
+ g_assert(err != NULL);
+ g_assert_cmpint(avdtp_error_error_code(err), ==, 0x31);
+ context_quit(context);
+ return;
+ }
+
g_assert(err == NULL);
if (g_str_equal(context->data->test_name, "/TP/SIG/SMG/BV-19-C"))
@@ -837,6 +844,19 @@ int main(int argc, char *argv[])
raw_pdu(0x22, 0x03),
raw_pdu(0x30, 0x06, 0x04),
raw_pdu(0x33, 0x06, 0xc0));
+ define_test("/TP/SIG/SMG/BI-19-C", test_client,
+ raw_pdu(0x50, 0x01),
+ raw_pdu(0x52, 0x01, 0x04, 0x00),
+ raw_pdu(0x60, 0x02, 0x04),
+ raw_pdu(0x62, 0x02, 0x01, 0x00, 0x07, 0x06, 0x00, 0x00,
+ 0xff, 0xff, 0x02, 0x40),
+ raw_pdu(0x70, 0x03, 0x04, 0x04, 0x01, 0x00, 0x07, 0x06,
+ 0x00, 0x00, 0x21, 0x02, 0x02, 0x20),
+ raw_pdu(0x72, 0x03),
+ raw_pdu(0x80, 0x06, 0x04),
+ raw_pdu(0x82, 0x06),
+ raw_pdu(0x90, 0x07, 0x04),
+ raw_pdu(0x93, 0x07, 0x04, 0x31));
return g_test_run();
}