Diff between 832348ac8e9c778fdf107a2f76bcaf14a10dc63b and 3f57f30a652cf5f2db1406f4787a7db7f7cb0950

Changed Files

File Additions Deletions Status
tools/mgmt-tester.c +19 -0 modified

Full Patch

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 2a6e847..f0cc659 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -2692,6 +2692,21 @@ static const struct generic_data load_irks_not_supported_test = {
 	.expect_status = MGMT_STATUS_NOT_SUPPORTED,
 };
 
+static const char set_privacy_valid_param[] = { 0x01,
+			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 };
+static const char set_privacy_settings_param[] = { 0x80, 0x20, 0x00, 0x00 };
+
+static const struct generic_data set_privacy_success_test = {
+	.send_opcode = MGMT_OP_SET_PRIVACY,
+	.send_param = set_privacy_valid_param,
+	.send_len = sizeof(set_privacy_valid_param),
+	.expect_status = MGMT_STATUS_SUCCESS,
+	.expect_param = set_privacy_settings_param,
+	.expect_len = sizeof(set_privacy_settings_param),
+	.expect_settings_set = MGMT_SETTING_PRIVACY,
+};
+
 static void client_cmd_complete(uint16_t opcode, uint8_t status,
 					const void *param, uint8_t len,
 					void *user_data)
@@ -4001,5 +4016,9 @@ int main(int argc, char *argv[])
 				&load_irks_not_supported_test,
 				NULL, test_command_generic);
 
+	test_bredrle("Set Privacy - Success",
+				&set_privacy_success_test,
+				NULL, test_command_generic);
+
 	return tester_run();
 }