summaryrefslogtreecommitdiff
path: root/net/nimble/host/src/test/ble_l2cap_test.c
diff options
context:
space:
mode:
authorChristopher Collins <ccollins@apache.org>2016-04-12 11:31:14 -0700
committerChristopher Collins <ccollins@apache.org>2016-04-19 17:52:53 -0700
commite32f9f9f20666ecbb42598db0737b9c8f1ca6c74 (patch)
tree884ea6afcbbddc58831c10bb9f11ab00e5a00788 /net/nimble/host/src/test/ble_l2cap_test.c
parentf6bc99f0a1d9d1daa1c8e35d171075f2f2129548 (diff)
ble host - major changes.
These changes are detailed in this thread on the mynewt dev list: http://mail-archives.apache.org/mod_mbox/incubator-mynewt-dev/201604.mbox/%3C20160417225734.GB8991%40iori.nightmare-heaven.no-ip.biz%3E Here is a summary of the changes: 1. All HCI command/acknowledgement exchanges are blocking. * FSM machinery goes away; controller response is indicated in the return code of the HCI send function. * Nearly all HCI failures are indicated to the application immediately, so there is no need for lots of mutexes and temporary copies of data structures. * API is simplified; operation results are indicated via a simple function return code. 2. The Nimble host is "taskless" the Nimble host is now a "flat" library that runs in an application task. When the application initializes the host, it indicates which OS event queue should be used for host-related events. Host operations are captured in OS_EVENT_TIMER events that the application task would need to handle generically, as it most likely already does.
Diffstat (limited to 'net/nimble/host/src/test/ble_l2cap_test.c')
-rw-r--r--net/nimble/host/src/test/ble_l2cap_test.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/net/nimble/host/src/test/ble_l2cap_test.c b/net/nimble/host/src/test/ble_l2cap_test.c
index c9e116c5..9cde6421 100644
--- a/net/nimble/host/src/test/ble_l2cap_test.c
+++ b/net/nimble/host/src/test/ble_l2cap_test.c
@@ -471,10 +471,6 @@ ble_l2cap_test_util_peer_updates(int accept)
ble_l2cap_test_util_verify_tx_update_rsp(1, !accept);
if (accept) {
- /* Ensure update request gets sent. */
- ble_gattc_wakeup();
- ble_hci_sched_wakeup();
-
params.itvl_min = 0x200;
params.itvl_max = 0x300;
params.latency = 0;
@@ -574,13 +570,11 @@ TEST_CASE(ble_l2cap_test_case_sig_update_init_fail_master)
params.timeout_multiplier = 0x100;
rc = ble_l2cap_sig_update(conn->bhc_handle, &params,
ble_l2cap_test_util_update_cb, NULL);
- TEST_ASSERT_FATAL(rc == 0);
+ TEST_ASSERT_FATAL(rc == BLE_HS_EINVAL);
+ /* Ensure callback never called. */
ble_hs_test_util_tx_all();
-
- /* Ensure callback indicates failure. */
- TEST_ASSERT(ble_l2cap_test_update_status == BLE_HS_EINVAL);
- TEST_ASSERT(ble_l2cap_test_update_arg == NULL);
+ TEST_ASSERT(ble_l2cap_test_update_status == -1);
}
TEST_CASE(ble_l2cap_test_case_sig_update_init_fail_bad_id)