mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-11-03 19:12:47 +00:00
Merge pull request #69 from sjanc/test_build_fix
nimble/host: Fix tests build
This commit is contained in:
@@ -243,7 +243,6 @@ ble_hs_hci_process_ack(uint16_t expected_opcode,
|
||||
static int
|
||||
ble_hs_hci_wait_for_ack(void)
|
||||
{
|
||||
uint32_t cmd_tmo;
|
||||
int rc;
|
||||
|
||||
#if MYNEWT_VAL(BLE_HS_PHONY_HCI_ACKS)
|
||||
@@ -256,8 +255,8 @@ ble_hs_hci_wait_for_ack(void)
|
||||
rc = ble_hs_hci_phony_ack_cb(ble_hs_hci_ack, 260);
|
||||
}
|
||||
#else
|
||||
cmd_tmo = os_time_ms_to_ticks32(BLE_HCI_CMD_TIMEOUT_MS);
|
||||
rc = os_sem_pend(&ble_hs_hci_sem, cmd_tmo);
|
||||
rc = os_sem_pend(&ble_hs_hci_sem,
|
||||
os_time_ms_to_ticks32(BLE_HCI_CMD_TIMEOUT_MS));
|
||||
switch (rc) {
|
||||
case 0:
|
||||
BLE_HS_DBG_ASSERT(ble_hs_hci_ack != NULL);
|
||||
|
||||
@@ -583,7 +583,7 @@ TEST_CASE(ble_gatt_disc_c_test_oom_all)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
/* Verify the procedure proceeds after mbufs become available. */
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
@@ -604,7 +604,7 @@ TEST_CASE(ble_gatt_disc_c_test_oom_all)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
/* Verify that procedure completes when mbufs are available. */
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
@@ -670,7 +670,7 @@ TEST_CASE(ble_gatt_disc_c_test_oom_uuid)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
/* Verify the procedure proceeds after mbufs become available. */
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
@@ -690,7 +690,7 @@ TEST_CASE(ble_gatt_disc_c_test_oom_uuid)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
/* Verify that procedure completes when mbufs are available. */
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
|
||||
@@ -400,7 +400,7 @@ TEST_CASE(ble_gatt_disc_d_test_oom_all)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
/* Verify the procedure proceeds after mbufs become available. */
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
@@ -420,7 +420,7 @@ TEST_CASE(ble_gatt_disc_d_test_oom_all)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
/* Verify the procedure succeeds after mbufs become available. */
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
|
||||
@@ -434,7 +434,7 @@ TEST_CASE(ble_gatt_disc_s_test_oom_all)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
/* Verify the procedure proceeds after mbufs become available. */
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
@@ -454,7 +454,7 @@ TEST_CASE(ble_gatt_disc_s_test_oom_all)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
TEST_ASSERT_FATAL(rc == 0);
|
||||
@@ -511,7 +511,7 @@ TEST_CASE(ble_gatt_disc_s_test_oom_uuid)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
/* Verify the procedure proceeds after mbufs become available. */
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
@@ -531,7 +531,7 @@ TEST_CASE(ble_gatt_disc_s_test_oom_uuid)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
/* Verify that procedure completes when mbufs are available. */
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
@@ -592,7 +592,7 @@ TEST_CASE(ble_gatt_disc_s_test_oom_timeout)
|
||||
* second.
|
||||
*/
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
os_time_advance(ticks_until);
|
||||
}
|
||||
|
||||
@@ -387,7 +387,7 @@ TEST_CASE(ble_gatt_find_s_test_oom)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
/* Verify the procedure succeeds after mbufs become available. */
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
|
||||
@@ -855,7 +855,7 @@ TEST_CASE(ble_gatt_read_test_long_oom)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
/* Verify the procedure proceeds after mbufs become available. */
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
@@ -878,7 +878,7 @@ TEST_CASE(ble_gatt_read_test_long_oom)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
/* Verify that procedure completes when mbufs are available. */
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
|
||||
@@ -655,7 +655,7 @@ TEST_CASE(ble_gatt_write_test_long_oom)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
/* Verify the procedure proceeds after mbufs become available. */
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
@@ -681,7 +681,7 @@ TEST_CASE(ble_gatt_write_test_long_oom)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
/* Verify that procedure completes when mbufs are available. */
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
@@ -749,7 +749,7 @@ TEST_CASE(ble_gatt_write_test_reliable_oom)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
/* Verify the procedure proceeds after mbufs become available. */
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
@@ -775,7 +775,7 @@ TEST_CASE(ble_gatt_write_test_reliable_oom)
|
||||
|
||||
/* Verify that we will resume the stalled GATT procedure in one second. */
|
||||
ticks_until = ble_gattc_timer();
|
||||
TEST_ASSERT(ticks_until == BLE_GATT_RESUME_RATE_TICKS);
|
||||
TEST_ASSERT(ticks_until == os_time_ms_to_ticks32(MYNEWT_VAL(BLE_GATT_RESUME_RATE)));
|
||||
|
||||
/* Verify that procedure completes when mbufs are available. */
|
||||
rc = os_mbuf_free_chain(oms);
|
||||
|
||||
Reference in New Issue
Block a user