Diff between d74154846f166aa00f0fb978ce55e1ff5399040c and 8b82f1875e6ec13781d71020c0280c33a15e809b

Changed Files

File Additions Deletions Status
doc/test-coverage.txt +2 -2 modified
tools/mgmt-tester.c +20 -0 modified

Full Patch

diff --git a/doc/test-coverage.txt b/doc/test-coverage.txt
index 89d9991..9c8b9bc 100644
--- a/doc/test-coverage.txt
+++ b/doc/test-coverage.txt
@@ -39,7 +39,7 @@ Automated end-to-end testing
 
 Application		Count	Description
 -------------------------------------------
-mgmt-tester		 297	Kernel management interface testing
+mgmt-tester		 298	Kernel management interface testing
 l2cap-tester		  27	Kernel L2CAP implementation testing
 rfcomm-tester		   9	Kernel RFCOMM implementation testing
 bnep-tester		   1	Kernel BNEP implementation testing
@@ -49,7 +49,7 @@ gap-tester		   1	Daemon D-Bus API testing
 hci-tester		  14	Controller hardware testing
 userchan-tester		   3	Kernel HCI User Channel testting
 			-----
-			 368
+			 369
 
 
 Android end-to-end testing
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 0100f51..8e56b6c 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -4507,6 +4507,18 @@ static const struct generic_data add_advertising_power_off = {
 	.expect_alt_ev_len = sizeof(advertising_instance1_param),
 };
 
+static const struct generic_data add_advertising_success_18 = {
+	.send_opcode = MGMT_OP_ADD_ADVERTISING,
+	.send_param = add_advertising_param_uuid,
+	.send_len = sizeof(add_advertising_param_uuid),
+	.expect_param = advertising_instance1_param,
+	.expect_len = sizeof(advertising_instance1_param),
+	.expect_status = MGMT_STATUS_SUCCESS,
+	.expect_hci_command = BT_HCI_CMD_LE_SET_ADV_DATA,
+	.expect_hci_param = set_adv_data_uuid,
+	.expect_hci_len = sizeof(set_adv_data_uuid),
+};
+
 static const uint8_t remove_advertising_param_1[] = {
 	0x01,
 };
@@ -6699,6 +6711,14 @@ int main(int argc, char *argv[])
 					&add_advertising_success_pwron_data,
 					setup_add_advertising_power_cycle,
 					test_command_generic);
+	/* Changing an advertising instance while it is still being
+	 * advertised will immediately update the advertised data if
+	 * there is no other instance to switch to.
+	 */
+	test_bredrle("Add Advertising - Success 20 (Add Adv override)",
+					&add_advertising_success_18,
+					setup_add_advertising,
+					test_command_generic);
 
 	test_bredrle("Remove Advertising - Invalid Params 1",
 					&remove_advertising_fail_1,