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.'
diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index c7a8fa5..371cb46 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -4461,5 +4461,11 @@
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();
}