mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2025-01-22 04:13:30 +08:00
tools/l2cap-tester: Add basic LE client test cases
This commit is contained in:
parent
37585d8ce1
commit
3651a17f88
@ -315,6 +315,16 @@ static const struct l2cap_server_data l2cap_server_nval_cid_test2 = {
|
||||
.expect_rsp_len = sizeof(l2cap_nval_cfg_rsp),
|
||||
};
|
||||
|
||||
static const struct l2cap_client_data le_client_connect_success_test = {
|
||||
.client_psm = 0x0080,
|
||||
.server_psm = 0x0080,
|
||||
};
|
||||
|
||||
static const struct l2cap_client_data le_client_connect_nval_psm_test = {
|
||||
.client_psm = 0x0080,
|
||||
.expect_err = ECONNREFUSED,
|
||||
};
|
||||
|
||||
static void client_connectable_complete(uint16_t opcode, uint8_t status,
|
||||
const void *param, uint8_t len,
|
||||
void *user_data)
|
||||
@ -737,5 +747,12 @@ int main(int argc, char *argv[])
|
||||
&l2cap_server_nval_cid_test2,
|
||||
setup_powered_server, test_server);
|
||||
|
||||
test_l2cap_le("L2CAP LE Client - Success",
|
||||
&le_client_connect_success_test,
|
||||
setup_powered_client, test_connect);
|
||||
test_l2cap_le("L2CAP LE Client - Invalid PSM",
|
||||
&le_client_connect_nval_psm_test,
|
||||
setup_powered_client, test_connect);
|
||||
|
||||
return tester_run();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user