summaryrefslogtreecommitdiff
path: root/unit
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-12-01 18:02:19 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-12-05 12:36:03 +0200
commit8affb8d345713bae7aa04b717ae3314fd3c9ec07 (patch)
tree6c60bc754b024ecc8d4d78d3373b7a8c905f9332 /unit
parente02a835a942363908f384744137b7f024d9806ba (diff)
unit/AVDTP: Add /TP/SIG/SMG/BI-18-C test
Verify that the IUT (ACP) is able to issue a reject response signal upon tester's request in answer to an open stream command.
Diffstat (limited to 'unit')
-rw-r--r--unit/test-avdtp.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/unit/test-avdtp.c b/unit/test-avdtp.c
index 73a5d4511..f8ecf1d84 100644
--- a/unit/test-avdtp.c
+++ b/unit/test-avdtp.c
@@ -270,6 +270,11 @@ static gboolean sep_open_ind(struct avdtp *session, struct avdtp_local_sep *sep,
{
struct context *context = user_data;
+ if (g_str_equal(context->data->test_name, "/TP/SIG/SMG/BI-18-C")) {
+ *err = 0xc0;
+ return FALSE;
+ }
+
context->pending_open = TRUE;
context->stream = stream;
@@ -821,6 +826,17 @@ int main(int argc, char *argv[])
0xff, 0xff, 0x02, 0x40),
raw_pdu(0x30, 0x06, 0x04),
raw_pdu(0x33, 0x06, 0x31));
+ define_test("/TP/SIG/SMG/BI-18-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(0x33, 0x06, 0xc0));
return g_test_run();
}