summaryrefslogtreecommitdiff
path: root/unit
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2017-05-01 18:00:31 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2017-05-02 14:22:37 +0300
commitd99df1d384750b2d578db6fc4679ecb091613e0f (patch)
tree2b0bdb4c0543803bdc5503df9ccc1189ffa161ff /unit
parentde01c27a8b508442fdf46ef20a0d299ba3da8312 (diff)
downloadbluez-d99df1d384750b2d578db6fc4679ecb091613e0f.tar.gz
unit/test-gatt: Add test for unknown request
This send an unknown request (0xbf) to test if a response is sent since the spec mandates the server to always respond to all requests it receives: BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part F page 2173 'A client may send attribute protocol requests to a server, and the server shall respond to all requests that it receives.'
Diffstat (limited to 'unit')
-rw-r--r--unit/test-gatt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index c7a8fa55a..371cb467b 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -4461,5 +4461,11 @@ int main(int argc, char *argv[])
raw_pdu(0x18, 0x01),
raw_pdu(0x01, 0x18, 0x25, 0x00, 0x06));
+ define_test_server("/robustness/unkown-request",
+ test_server, service_db_1, NULL,
+ raw_pdu(0x03, 0x00, 0x02),
+ raw_pdu(0xbf, 0x00),
+ raw_pdu(0x01, 0xbf, 0x00, 0x00, 0x06));
+
return tester_run();
}