Diff between 5bf4196468fe39d7631c3fcc3b8cfab1637dfe47 and fd25d1adb6db9da1e008c5a772d1ad42ae3eefec

Changed Files

File Additions Deletions Status
tools/l2cap-tester.c +22 -3 modified

Full Patch

diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c
index e52d5b8..62802d7 100644
--- a/tools/l2cap-tester.c
+++ b/tools/l2cap-tester.c
@@ -280,11 +280,22 @@ static const struct  l2cap_client_data client_connect_write_success_test = {
 	.data_len = sizeof(l2_data),
 };
 
-static const struct l2cap_client_data client_connect_nval_psm_test = {
+static const struct l2cap_client_data client_connect_nval_psm_test_1 = {
 	.client_psm = 0x1001,
 	.expect_err = ECONNREFUSED,
 };
 
+static const struct l2cap_client_data client_connect_nval_psm_test_2 = {
+	.client_psm = 0x0001,
+	.expect_err = ECONNREFUSED,
+};
+
+static const struct l2cap_client_data client_connect_nval_psm_test_3 = {
+	.client_psm = 0x0001,
+	.expect_err = ECONNREFUSED,
+	.enable_ssp = true,
+};
+
 static const uint8_t l2cap_connect_req[] = { 0x01, 0x10, 0x41, 0x00 };
 
 static const struct l2cap_server_data l2cap_server_success_test = {
@@ -1036,8 +1047,16 @@ int main(int argc, char *argv[])
 					&client_connect_write_success_test,
 					setup_powered_client, test_connect);
 
-	test_l2cap_bredr("L2CAP BR/EDR Client - Invalid PSM",
-					&client_connect_nval_psm_test,
+	test_l2cap_bredr("L2CAP BR/EDR Client - Invalid PSM 1",
+					&client_connect_nval_psm_test_1,
+					setup_powered_client, test_connect);
+
+	test_l2cap_bredr("L2CAP BR/EDR Client - Invalid PSM 2",
+					&client_connect_nval_psm_test_2,
+					setup_powered_client, test_connect);
+
+	test_l2cap_bredr("L2CAP BR/EDR Client - Invalid PSM 3",
+					&client_connect_nval_psm_test_3,
 					setup_powered_client, test_connect);
 
 	test_l2cap_bredr("L2CAP BR/EDR Server - Success",