From e5d47b64971abc7c826edae3945410a63b23ab61 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 16 Nov 2015 12:31:18 +0200 Subject: tools/mgmt-tester: Wait before checking BR/EDR scan state Like the LE scan state, recent kernels moved to updating the BR/EDR scan state for Add/Remove Device independent from the mgmt command completion. We should therefore update the corresponding mgmt-tester cases to wait a bit before making a test result conclusion. --- tools/mgmt-tester.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index d5917756f..85f5823f8 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -3846,9 +3846,6 @@ static const struct generic_data remove_device_success_3 = { .expect_alt_ev = MGMT_EV_DEVICE_REMOVED, .expect_alt_ev_param = remove_device_param_1, .expect_alt_ev_len = sizeof(remove_device_param_1), - .expect_hci_command = BT_HCI_CMD_WRITE_SCAN_ENABLE, - .expect_hci_param = set_connectable_off_scan_enable_param, - .expect_hci_len = sizeof(set_connectable_off_scan_enable_param), }; static const uint8_t remove_device_param_2[] = { @@ -5854,6 +5851,12 @@ static void check_scan(void *user_data) return; } + if (hciemu_get_master_scan_enable(data->hciemu)) { + tester_warn("BR/EDR scan still enabled"); + tester_test_failed(); + return; + } + test_condition_complete(data); } @@ -6798,7 +6801,7 @@ int main(int argc, char *argv[]) setup_add_device, test_command_generic); test_bredrle("Remove Device - Success 3", &remove_device_success_3, - setup_add_device, test_command_generic); + setup_add_device, test_remove_device); test_le("Remove Device - Success 4", &remove_device_success_4, setup_add_device, test_remove_device); -- cgit v1.2.1