diff --git a/nimble/host/test/src/ble_att_clt_test.c b/nimble/host/test/src/ble_att_clt_test.c index 3b1eee54a..703ad00db 100644 --- a/nimble/host/test/src/ble_att_clt_test.c +++ b/nimble/host/test/src/ble_att_clt_test.c @@ -74,7 +74,7 @@ ble_att_clt_test_tx_write_req_or_cmd(uint16_t conn_handle, uint16_t handle, TEST_ASSERT(rc == 0); } -TEST_CASE(ble_att_clt_test_tx_find_info) +TEST_CASE_SELF(ble_att_clt_test_tx_find_info) { uint16_t conn_handle; int rc; @@ -98,7 +98,7 @@ TEST_CASE(ble_att_clt_test_tx_find_info) TEST_ASSERT(rc == 0); } -TEST_CASE(ble_att_clt_test_rx_find_info) +TEST_CASE_SELF(ble_att_clt_test_rx_find_info) { struct ble_att_find_info_rsp rsp; uint16_t conn_handle; @@ -265,13 +265,13 @@ ble_att_clt_test_misc_tx_mtu(uint16_t conn_handle, uint16_t mtu, int status) } } -TEST_CASE(ble_att_clt_test_tx_write) +TEST_CASE_SELF(ble_att_clt_test_tx_write) { ble_att_clt_test_case_tx_write_req_or_cmd(0); ble_att_clt_test_case_tx_write_req_or_cmd(1); } -TEST_CASE(ble_att_clt_test_tx_read) +TEST_CASE_SELF(ble_att_clt_test_tx_read) { uint16_t conn_handle; int rc; @@ -287,7 +287,7 @@ TEST_CASE(ble_att_clt_test_tx_read) TEST_ASSERT(rc == BLE_HS_EINVAL); } -TEST_CASE(ble_att_clt_test_rx_read) +TEST_CASE_SELF(ble_att_clt_test_rx_read) { uint16_t conn_handle; uint8_t buf[1024]; @@ -313,7 +313,7 @@ TEST_CASE(ble_att_clt_test_rx_read) TEST_ASSERT(rc == 0); } -TEST_CASE(ble_att_clt_test_tx_read_blob) +TEST_CASE_SELF(ble_att_clt_test_tx_read_blob) { uint16_t conn_handle; int rc; @@ -329,7 +329,7 @@ TEST_CASE(ble_att_clt_test_tx_read_blob) TEST_ASSERT(rc == BLE_HS_EINVAL); } -TEST_CASE(ble_att_clt_test_rx_read_blob) +TEST_CASE_SELF(ble_att_clt_test_rx_read_blob) { uint16_t conn_handle; uint8_t buf[1024]; @@ -355,7 +355,7 @@ TEST_CASE(ble_att_clt_test_rx_read_blob) TEST_ASSERT(rc == 0); } -TEST_CASE(ble_att_clt_test_tx_read_mult) +TEST_CASE_SELF(ble_att_clt_test_tx_read_mult) { struct os_mbuf *om; uint16_t conn_handle; @@ -380,7 +380,7 @@ TEST_CASE(ble_att_clt_test_tx_read_mult) TEST_ASSERT(rc == BLE_HS_EINVAL); } -TEST_CASE(ble_att_clt_test_rx_read_mult) +TEST_CASE_SELF(ble_att_clt_test_rx_read_mult) { uint16_t conn_handle; uint8_t buf[1024]; @@ -413,7 +413,7 @@ TEST_CASE(ble_att_clt_test_rx_read_mult) TEST_ASSERT(rc == 0); } -TEST_CASE(ble_att_clt_test_tx_prep_write) +TEST_CASE_SELF(ble_att_clt_test_tx_prep_write) { uint8_t attr_data[512]; int i; @@ -444,7 +444,7 @@ TEST_CASE(ble_att_clt_test_tx_prep_write) BLE_HS_EINVAL); } -TEST_CASE(ble_att_clt_test_rx_prep_write) +TEST_CASE_SELF(ble_att_clt_test_rx_prep_write) { struct ble_att_prep_write_cmd rsp; uint16_t conn_handle; @@ -472,7 +472,7 @@ TEST_CASE(ble_att_clt_test_rx_prep_write) TEST_ASSERT(rc == 0); } -TEST_CASE(ble_att_clt_test_tx_exec_write) +TEST_CASE_SELF(ble_att_clt_test_tx_exec_write) { uint16_t conn_handle; int rc; @@ -488,7 +488,7 @@ TEST_CASE(ble_att_clt_test_tx_exec_write) TEST_ASSERT(rc == 0); } -TEST_CASE(ble_att_clt_test_tx_mtu) +TEST_CASE_SELF(ble_att_clt_test_tx_mtu) { uint16_t conn_handle; @@ -520,11 +520,3 @@ TEST_SUITE(ble_att_clt_suite) ble_att_clt_test_tx_exec_write(); ble_att_clt_test_tx_mtu(); } - -int -ble_att_clt_test_all(void) -{ - ble_att_clt_suite(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_att_svr_test.c b/nimble/host/test/src/ble_att_svr_test.c index e91277d7c..d3489e75f 100644 --- a/nimble/host/test/src/ble_att_svr_test.c +++ b/nimble/host/test/src/ble_att_svr_test.c @@ -780,7 +780,7 @@ ble_att_svr_test_misc_verify_indicate(uint16_t conn_handle, } } -TEST_CASE(ble_att_svr_test_mtu) +TEST_CASE_SELF(ble_att_svr_test_mtu) { /*** MTU too low; should pretend peer sent default value instead. */ ble_att_svr_test_misc_mtu_exchange(BLE_ATT_MTU_DFLT, 5, @@ -796,7 +796,7 @@ TEST_CASE(ble_att_svr_test_mtu) ble_att_svr_test_misc_mtu_exchange(100, 50, 50, 50); } -TEST_CASE(ble_att_svr_test_read) +TEST_CASE_SELF(ble_att_svr_test_read) { struct ble_hs_conn *conn; struct os_mbuf *om; @@ -888,7 +888,7 @@ TEST_CASE(ble_att_svr_test_read) BLE_ATT_MTU_DFLT - 1); } -TEST_CASE(ble_att_svr_test_read_blob) +TEST_CASE_SELF(ble_att_svr_test_read_blob) { uint16_t attr_handle; uint16_t conn_handle; @@ -934,7 +934,7 @@ TEST_CASE(ble_att_svr_test_read_blob) 0); } -TEST_CASE(ble_att_svr_test_read_mult) +TEST_CASE_SELF(ble_att_svr_test_read_mult) { uint16_t conn_handle; int rc; @@ -1011,7 +1011,7 @@ TEST_CASE(ble_att_svr_test_read_mult) } -TEST_CASE(ble_att_svr_test_write) +TEST_CASE_SELF(ble_att_svr_test_write) { struct ble_hs_conn *conn; uint16_t conn_handle; @@ -1100,7 +1100,7 @@ TEST_CASE(ble_att_svr_test_write) ble_hs_test_util_verify_tx_write_rsp(); } -TEST_CASE(ble_att_svr_test_find_info) +TEST_CASE_SELF(ble_att_svr_test_find_info) { uint16_t conn_handle; uint16_t handle1; @@ -1203,7 +1203,7 @@ TEST_CASE(ble_att_svr_test_find_info) } -TEST_CASE(ble_att_svr_test_find_type_value) +TEST_CASE_SELF(ble_att_svr_test_find_type_value) { uint16_t conn_handle; uint16_t handle1; @@ -1491,13 +1491,13 @@ ble_att_svr_test_misc_read_type(uint16_t mtu) } -TEST_CASE(ble_att_svr_test_read_type) +TEST_CASE_SELF(ble_att_svr_test_read_type) { ble_att_svr_test_misc_read_type(0); ble_att_svr_test_misc_read_type(128); } -TEST_CASE(ble_att_svr_test_read_group_type) +TEST_CASE_SELF(ble_att_svr_test_read_group_type) { uint16_t conn_handle; int rc; @@ -1608,7 +1608,7 @@ TEST_CASE(ble_att_svr_test_read_group_type) } -TEST_CASE(ble_att_svr_test_prep_write) +TEST_CASE_SELF(ble_att_svr_test_prep_write) { struct ble_hs_conn *conn; uint16_t conn_handle; @@ -1769,7 +1769,7 @@ TEST_CASE(ble_att_svr_test_prep_write) BLE_ATT_ERR_INVALID_ATTR_VALUE_LEN, 6); } -TEST_CASE(ble_att_svr_test_notify) +TEST_CASE_SELF(ble_att_svr_test_notify) { uint16_t conn_handle; @@ -1792,7 +1792,7 @@ TEST_CASE(ble_att_svr_test_notify) } -TEST_CASE(ble_att_svr_test_prep_write_tmo) +TEST_CASE_SELF(ble_att_svr_test_prep_write_tmo) { int32_t ticks_from_now; uint16_t conn_handle; @@ -1852,7 +1852,7 @@ TEST_CASE(ble_att_svr_test_prep_write_tmo) TEST_ASSERT_FATAL(rc == 0); } -TEST_CASE(ble_att_svr_test_indicate) +TEST_CASE_SELF(ble_att_svr_test_indicate) { uint16_t conn_handle; @@ -1874,7 +1874,7 @@ TEST_CASE(ble_att_svr_test_indicate) (uint8_t[]) { 1, 2, 3 }, 3, 0); } -TEST_CASE(ble_att_svr_test_oom) +TEST_CASE_SELF(ble_att_svr_test_oom) { struct os_mbuf *oms; uint16_t conn_handle; @@ -2052,7 +2052,7 @@ TEST_CASE(ble_att_svr_test_oom) TEST_ASSERT_FATAL(rc == 0); } -TEST_CASE(ble_att_svr_test_unsupported_req) +TEST_CASE_SELF(ble_att_svr_test_unsupported_req) { uint16_t conn_handle; int rc; @@ -2105,11 +2105,3 @@ TEST_SUITE(ble_att_svr_suite) ble_att_svr_test_oom(); ble_att_svr_test_unsupported_req(); } - -int -ble_att_svr_test_all(void) -{ - ble_att_svr_suite(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_gap_test.c b/nimble/host/test/src/ble_gap_test.c index 015e39471..588239eb7 100644 --- a/nimble/host/test/src/ble_gap_test.c +++ b/nimble/host/test/src/ble_gap_test.c @@ -434,7 +434,7 @@ ble_gap_test_util_wl_set(ble_addr_t *addrs, int addrs_count, int cmd_fail_idx, } } -TEST_CASE(ble_gap_test_case_wl_bad_args) +TEST_CASE_SELF(ble_gap_test_case_wl_bad_args) { int rc; @@ -465,7 +465,7 @@ TEST_CASE(ble_gap_test_case_wl_bad_args) TEST_ASSERT(rc == BLE_HS_EBUSY); } -TEST_CASE(ble_gap_test_case_wl_ctlr_fail) +TEST_CASE_SELF(ble_gap_test_case_wl_ctlr_fail) { int i; @@ -483,7 +483,7 @@ TEST_CASE(ble_gap_test_case_wl_ctlr_fail) } } -TEST_CASE(ble_gap_test_case_wl_good) +TEST_CASE_SELF(ble_gap_test_case_wl_good) { ble_addr_t addrs[] = { { BLE_ADDR_PUBLIC, { 1, 2, 3, 4, 5, 6 } }, @@ -558,7 +558,7 @@ ble_gap_test_util_disc(uint8_t own_addr_type, return rc; } -TEST_CASE(ble_gap_test_case_disc_bad_args) +TEST_CASE_SELF(ble_gap_test_case_disc_bad_args) { struct ble_gap_disc_params params; int rc; @@ -579,7 +579,7 @@ TEST_CASE(ble_gap_test_case_disc_bad_args) TEST_ASSERT(rc == BLE_HS_EINVAL); } -TEST_CASE(ble_gap_test_case_disc_good) +TEST_CASE_SELF(ble_gap_test_case_disc_good) { uint8_t adv_data[32]; uint8_t flags; @@ -634,7 +634,7 @@ TEST_CASE(ble_gap_test_case_disc_good) } } -TEST_CASE(ble_gap_test_case_disc_ltd_mismatch) +TEST_CASE_SELF(ble_gap_test_case_disc_ltd_mismatch) { int rc; struct ble_gap_disc_desc desc = { @@ -683,7 +683,7 @@ TEST_CASE(ble_gap_test_case_disc_ltd_mismatch) } -TEST_CASE(ble_gap_test_case_disc_hci_fail) +TEST_CASE_SELF(ble_gap_test_case_disc_hci_fail) { int fail_idx; int limited; @@ -751,13 +751,13 @@ ble_gap_test_util_disc_dflts_once(int limited) ble_gap_test_util_verify_tx_scan_enable(1, 0); } -TEST_CASE(ble_gap_test_case_disc_dflts) +TEST_CASE_SELF(ble_gap_test_case_disc_dflts) { ble_gap_test_util_disc_dflts_once(0); ble_gap_test_util_disc_dflts_once(1); } -TEST_CASE(ble_gap_test_case_disc_already) +TEST_CASE_SELF(ble_gap_test_case_disc_already) { static const struct ble_gap_disc_params disc_params = { 0 }; int rc; @@ -776,7 +776,7 @@ TEST_CASE(ble_gap_test_case_disc_already) TEST_ASSERT(rc == BLE_HS_EALREADY); } -TEST_CASE(ble_gap_test_case_disc_busy) +TEST_CASE_SELF(ble_gap_test_case_disc_busy) { static const struct ble_gap_disc_params disc_params = { 0 }; static const ble_addr_t peer_addr = { @@ -815,7 +815,7 @@ TEST_SUITE(ble_gap_test_suite_disc) * $direct connect * *****************************************************************************/ -TEST_CASE(ble_gap_test_case_conn_gen_good) +TEST_CASE_SELF(ble_gap_test_case_conn_gen_good) { struct hci_le_conn_complete evt; struct ble_gap_conn_params params; @@ -873,7 +873,7 @@ TEST_CASE(ble_gap_test_case_conn_gen_good) TEST_ASSERT(ble_hs_atomic_conn_flags(2, NULL) == 0); } -TEST_CASE(ble_gap_test_case_conn_gen_bad_args) +TEST_CASE_SELF(ble_gap_test_case_conn_gen_bad_args) { int rc; @@ -904,7 +904,7 @@ TEST_CASE(ble_gap_test_case_conn_gen_bad_args) TEST_ASSERT(rc == BLE_HS_EALREADY); } -TEST_CASE(ble_gap_test_case_conn_gen_dflt_params) +TEST_CASE_SELF(ble_gap_test_case_conn_gen_dflt_params) { static const ble_addr_t peer_addr = { BLE_ADDR_PUBLIC, @@ -920,7 +920,7 @@ TEST_CASE(ble_gap_test_case_conn_gen_dflt_params) TEST_ASSERT(rc == 0); } -TEST_CASE(ble_gap_test_case_conn_gen_already) +TEST_CASE_SELF(ble_gap_test_case_conn_gen_already) { static const struct ble_gap_conn_params conn_params = { 0 }; static const ble_addr_t peer_addr = { @@ -942,7 +942,7 @@ TEST_CASE(ble_gap_test_case_conn_gen_already) TEST_ASSERT(rc == BLE_HS_EALREADY); } -TEST_CASE(ble_gap_test_case_conn_gen_done) +TEST_CASE_SELF(ble_gap_test_case_conn_gen_done) { static const struct ble_gap_conn_params conn_params = { 0 }; static const ble_addr_t peer_addr = { @@ -965,7 +965,7 @@ TEST_CASE(ble_gap_test_case_conn_gen_done) TEST_ASSERT(rc == BLE_HS_EDONE); } -TEST_CASE(ble_gap_test_case_conn_gen_busy) +TEST_CASE_SELF(ble_gap_test_case_conn_gen_busy) { static const struct ble_gap_disc_params disc_params = { 0 }; static const struct ble_gap_conn_params conn_params = { 0 }; @@ -989,7 +989,7 @@ TEST_CASE(ble_gap_test_case_conn_gen_busy) TEST_ASSERT(rc == BLE_HS_EBUSY); } -TEST_CASE(ble_gap_test_case_conn_gen_fail_evt) +TEST_CASE_SELF(ble_gap_test_case_conn_gen_fail_evt) { static const ble_addr_t peer_addr = {BLE_ADDR_PUBLIC, {1, 2, 3, 4, 5, 6}}; struct hci_le_conn_complete evt; @@ -1103,7 +1103,7 @@ ble_gap_test_util_conn_and_cancel(uint8_t *peer_addr, uint8_t hci_status) TEST_ASSERT(ble_hs_atomic_conn_flags(2, NULL) == BLE_HS_ENOTCONN); } -TEST_CASE(ble_gap_test_case_conn_cancel_bad_args) +TEST_CASE_SELF(ble_gap_test_case_conn_cancel_bad_args) { int rc; @@ -1115,7 +1115,7 @@ TEST_CASE(ble_gap_test_case_conn_cancel_bad_args) TEST_ASSERT(rc == BLE_HS_EALREADY); } -TEST_CASE(ble_gap_test_case_conn_cancel_good) +TEST_CASE_SELF(ble_gap_test_case_conn_cancel_good) { uint8_t peer_addr[6] = { 1, 2, 3, 4, 5, 6 }; @@ -1126,7 +1126,7 @@ TEST_CASE(ble_gap_test_case_conn_cancel_good) TEST_ASSERT(ble_gap_test_conn_desc.conn_handle == BLE_HS_CONN_HANDLE_NONE); } -TEST_CASE(ble_gap_test_case_conn_cancel_ctlr_fail) +TEST_CASE_SELF(ble_gap_test_case_conn_cancel_ctlr_fail) { struct hci_le_conn_complete evt; int rc; @@ -1213,7 +1213,7 @@ ble_gap_test_util_terminate(uint8_t *peer_addr, uint8_t hci_status) } } -TEST_CASE(ble_gap_test_case_conn_terminate_bad_args) +TEST_CASE_SELF(ble_gap_test_case_conn_terminate_bad_args) { int rc; @@ -1224,7 +1224,7 @@ TEST_CASE(ble_gap_test_case_conn_terminate_bad_args) TEST_ASSERT(rc == BLE_HS_ENOTCONN); } -TEST_CASE(ble_gap_test_case_conn_terminate_good) +TEST_CASE_SELF(ble_gap_test_case_conn_terminate_good) { uint8_t peer_addr[6] = { 1, 2, 3, 4, 5, 6 }; @@ -1244,7 +1244,7 @@ TEST_CASE(ble_gap_test_case_conn_terminate_good) TEST_ASSERT(!ble_gap_master_in_progress()); } -TEST_CASE(ble_gap_test_case_conn_terminate_ctlr_fail) +TEST_CASE_SELF(ble_gap_test_case_conn_terminate_ctlr_fail) { struct hci_disconn_complete evt; int rc; @@ -1285,7 +1285,7 @@ TEST_CASE(ble_gap_test_case_conn_terminate_ctlr_fail) TEST_ASSERT(!ble_gap_master_in_progress()); } -TEST_CASE(ble_gap_test_case_conn_terminate_hci_fail) +TEST_CASE_SELF(ble_gap_test_case_conn_terminate_hci_fail) { uint8_t peer_addr[6] = { 1, 2, 3, 4, 5, 6 }; @@ -1310,7 +1310,7 @@ TEST_SUITE(ble_gap_test_suite_conn_terminate) * $conn find * *****************************************************************************/ -TEST_CASE(ble_gap_test_case_conn_find) +TEST_CASE_SELF(ble_gap_test_case_conn_find) { struct ble_gap_conn_desc desc; @@ -1321,6 +1321,9 @@ TEST_CASE(ble_gap_test_case_conn_find) /*** We are master; public addresses. */ ble_gap_test_util_init(); + rc = ble_hs_id_copy_addr(BLE_ADDR_PUBLIC, pub_addr, NULL); + TEST_ASSERT_FATAL(rc == 0); + ble_hs_test_util_create_rpa_conn(8, BLE_OWN_ADDR_PUBLIC, ((uint8_t[6]){0,0,0,0,0,0}), @@ -1331,9 +1334,6 @@ TEST_CASE(ble_gap_test_case_conn_find) ble_gap_test_util_connect_cb, NULL); - rc = ble_hs_id_copy_addr(BLE_ADDR_PUBLIC, pub_addr, NULL); - TEST_ASSERT_FATAL(rc == 0); - rc = ble_gap_conn_find(8, &desc); TEST_ASSERT_FATAL(rc == 0); TEST_ASSERT(desc.conn_handle == 8); @@ -1369,6 +1369,9 @@ TEST_CASE(ble_gap_test_case_conn_find) /*** We are master; RPAs. */ ble_gap_test_util_init(); + rc = ble_hs_id_copy_addr(BLE_ADDR_PUBLIC, pub_addr, NULL); + TEST_ASSERT_FATAL(rc == 0); + ble_hs_test_util_create_rpa_conn(54, BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT, ((uint8_t[6]){0x40,1,2,3,4,5}), @@ -1534,7 +1537,7 @@ ble_gap_test_util_adv(uint8_t own_addr_type, } } -TEST_CASE(ble_gap_test_case_adv_bad_args) +TEST_CASE_SELF(ble_gap_test_case_adv_bad_args) { struct ble_gap_adv_params adv_params; ble_addr_t peer_addr = { BLE_ADDR_PUBLIC, { 1, 2, 3, 4, 5, 6 }}; @@ -1657,7 +1660,7 @@ ble_gap_test_util_adv_verify_dflt_params(uint8_t own_addr_type, } } -TEST_CASE(ble_gap_test_case_adv_dflt_params) +TEST_CASE_SELF(ble_gap_test_case_adv_dflt_params) { ble_addr_t peer_addr = { BLE_ADDR_PUBLIC, { 1, 2, 3, 4, 5, 6 }}; @@ -1672,7 +1675,7 @@ TEST_CASE(ble_gap_test_case_adv_dflt_params) } } -TEST_CASE(ble_gap_test_case_adv_good) +TEST_CASE_SELF(ble_gap_test_case_adv_good) { ble_addr_t peer_addr = { BLE_ADDR_PUBLIC, { 1, 2, 3, 4, 5, 6 }}; int d; @@ -1696,7 +1699,7 @@ TEST_CASE(ble_gap_test_case_adv_good) } } -TEST_CASE(ble_gap_test_case_adv_ctlr_fail) +TEST_CASE_SELF(ble_gap_test_case_adv_ctlr_fail) { ble_addr_t peer_addr = { BLE_ADDR_PUBLIC, { 1, 2, 3, 4, 5, 6 }}; int d; @@ -1717,7 +1720,7 @@ TEST_CASE(ble_gap_test_case_adv_ctlr_fail) } } -TEST_CASE(ble_gap_test_case_adv_hci_fail) +TEST_CASE_SELF(ble_gap_test_case_adv_hci_fail) { ble_addr_t peer_addr = { BLE_ADDR_PUBLIC, { 1, 2, 3, 4, 5, 6 }}; int fail_idx; @@ -1779,7 +1782,7 @@ ble_gap_test_util_stop_adv(const ble_addr_t *peer_addr, ble_gap_test_util_verify_tx_adv_enable(0); } -TEST_CASE(ble_gap_test_case_stop_adv_good) +TEST_CASE_SELF(ble_gap_test_case_stop_adv_good) { ble_addr_t peer_addr = { BLE_ADDR_PUBLIC, { 1, 2, 3, 4, 5, 6 }}; int d; @@ -1797,7 +1800,7 @@ TEST_CASE(ble_gap_test_case_stop_adv_good) } } -TEST_CASE(ble_gap_test_case_stop_adv_hci_fail) +TEST_CASE_SELF(ble_gap_test_case_stop_adv_hci_fail) { ble_addr_t peer_addr = { BLE_ADDR_PUBLIC, { 1, 2, 3, 4, 5, 6 }}; int d; @@ -2379,7 +2382,7 @@ hci_fail: BLE_GAP_INITIAL_SUPERVISION_TIMEOUT); } -TEST_CASE(ble_gap_test_case_update_conn_good) +TEST_CASE_SELF(ble_gap_test_case_update_conn_good) { ble_gap_test_util_update_no_l2cap( ((struct ble_gap_upd_params[]) { { @@ -2402,7 +2405,7 @@ TEST_CASE(ble_gap_test_case_update_conn_good) 1, 0, 0); } -TEST_CASE(ble_gap_test_case_update_conn_verify_params) +TEST_CASE_SELF(ble_gap_test_case_update_conn_verify_params) { /* GOOD */ ble_gap_test_util_update_verify_params( @@ -2469,7 +2472,7 @@ TEST_CASE(ble_gap_test_case_update_conn_verify_params) BLE_HS_EINVAL); } -TEST_CASE(ble_gap_test_case_update_conn_bad) +TEST_CASE_SELF(ble_gap_test_case_update_conn_bad) { ble_gap_test_util_update_no_l2cap( ((struct ble_gap_upd_params[]) { { @@ -2482,7 +2485,7 @@ TEST_CASE(ble_gap_test_case_update_conn_bad) 1, 0, BLE_ERR_LMP_COLLISION); } -TEST_CASE(ble_gap_test_case_update_conn_hci_fail) +TEST_CASE_SELF(ble_gap_test_case_update_conn_hci_fail) { ble_gap_test_util_update_no_l2cap( ((struct ble_gap_upd_params[]) { { @@ -2495,7 +2498,7 @@ TEST_CASE(ble_gap_test_case_update_conn_hci_fail) 1, BLE_ERR_UNSUPPORTED, 0); } -TEST_CASE(ble_gap_test_case_update_conn_l2cap) +TEST_CASE_SELF(ble_gap_test_case_update_conn_l2cap) { struct ble_gap_upd_params params = { .itvl_min = 10, @@ -2514,7 +2517,7 @@ TEST_CASE(ble_gap_test_case_update_conn_l2cap) BLE_L2CAP_SIG_UPDATE_RSP_RESULT_REJECT); } -TEST_CASE(ble_gap_test_case_update_peer_good) +TEST_CASE_SELF(ble_gap_test_case_update_peer_good) { ble_gap_test_util_update_peer(0, ((struct ble_gap_upd_params[]) { { @@ -2535,7 +2538,7 @@ TEST_CASE(ble_gap_test_case_update_peer_good) }})); } -TEST_CASE(ble_gap_test_case_update_req_good) +TEST_CASE_SELF(ble_gap_test_case_update_req_good) { ble_gap_test_util_update_req_pos( ((struct ble_gap_upd_params[]) { { @@ -2572,7 +2575,7 @@ TEST_CASE(ble_gap_test_case_update_req_good) -1, 0); } -TEST_CASE(ble_gap_test_case_update_req_hci_fail) +TEST_CASE_SELF(ble_gap_test_case_update_req_hci_fail) { ble_gap_test_util_update_req_pos( ((struct ble_gap_upd_params[]) { { @@ -2592,7 +2595,7 @@ TEST_CASE(ble_gap_test_case_update_req_hci_fail) 0, BLE_ERR_UNSUPPORTED); } -TEST_CASE(ble_gap_test_case_update_req_reject) +TEST_CASE_SELF(ble_gap_test_case_update_req_reject) { ble_gap_test_util_update_req_neg( ((struct ble_gap_upd_params[]) { { @@ -2615,7 +2618,7 @@ TEST_CASE(ble_gap_test_case_update_req_reject) -1, 0); } -TEST_CASE(ble_gap_test_case_update_concurrent_good) +TEST_CASE_SELF(ble_gap_test_case_update_concurrent_good) { ble_gap_test_util_update_req_concurrent( ((struct ble_gap_upd_params[]) { { @@ -2666,7 +2669,7 @@ TEST_CASE(ble_gap_test_case_update_concurrent_good) -1, 0); } -TEST_CASE(ble_gap_test_case_update_concurrent_hci_fail) +TEST_CASE_SELF(ble_gap_test_case_update_concurrent_hci_fail) { ble_gap_test_util_update_req_concurrent( ((struct ble_gap_upd_params[]) { { @@ -2888,7 +2891,7 @@ ble_gap_test_util_disc_timeout(int32_t duration_ms) ble_gap_test_util_reset_cb_info(); } -TEST_CASE(ble_gap_test_case_update_timeout) +TEST_CASE_SELF(ble_gap_test_case_update_timeout) { struct ble_gap_upd_params params = { .itvl_min = 10, @@ -2913,7 +2916,7 @@ TEST_CASE(ble_gap_test_case_update_timeout) 1); } -TEST_CASE(ble_gap_test_case_conn_timeout_conn_forever) +TEST_CASE_SELF(ble_gap_test_case_conn_timeout_conn_forever) { ble_gap_test_util_init(); @@ -2925,7 +2928,7 @@ TEST_CASE(ble_gap_test_case_conn_timeout_conn_forever) } -TEST_CASE(ble_gap_test_case_conn_timeout_conn_timeout) +TEST_CASE_SELF(ble_gap_test_case_conn_timeout_conn_timeout) { ble_gap_test_util_init(); @@ -2937,7 +2940,7 @@ TEST_CASE(ble_gap_test_case_conn_timeout_conn_timeout) } -TEST_CASE(ble_gap_test_case_conn_forever_conn_timeout) +TEST_CASE_SELF(ble_gap_test_case_conn_forever_conn_timeout) { ble_gap_test_util_init(); @@ -2954,7 +2957,7 @@ TEST_CASE(ble_gap_test_case_conn_forever_conn_timeout) ble_gap_test_util_conn_timeout(30); } -TEST_CASE(ble_gap_test_case_disc_timeout_disc_forever) +TEST_CASE_SELF(ble_gap_test_case_disc_timeout_disc_forever) { ble_gap_test_util_init(); @@ -2966,7 +2969,7 @@ TEST_CASE(ble_gap_test_case_disc_timeout_disc_forever) } -TEST_CASE(ble_gap_test_case_disc_timeout_disc_timeout) +TEST_CASE_SELF(ble_gap_test_case_disc_timeout_disc_timeout) { ble_gap_test_util_init(); @@ -2978,7 +2981,7 @@ TEST_CASE(ble_gap_test_case_disc_timeout_disc_timeout) } -TEST_CASE(ble_gap_test_case_disc_forever_disc_timeout) +TEST_CASE_SELF(ble_gap_test_case_disc_forever_disc_timeout) { ble_gap_test_util_init(); @@ -2992,7 +2995,7 @@ TEST_CASE(ble_gap_test_case_disc_forever_disc_timeout) ble_gap_test_util_disc_timeout(30); } -TEST_CASE(ble_gap_test_case_conn_timeout_disc_timeout) +TEST_CASE_SELF(ble_gap_test_case_conn_timeout_disc_timeout) { ble_gap_test_util_init(); @@ -3020,7 +3023,7 @@ TEST_SUITE(ble_gap_test_suite_timeout) ble_gap_test_case_update_timeout(); } -TEST_CASE(ble_gap_test_case_mtu_us) +TEST_CASE_SELF(ble_gap_test_case_mtu_us) { const uint8_t peer_addr[6] = { 1,2,3,4,5,6 }; int rc; @@ -3044,7 +3047,7 @@ TEST_CASE(ble_gap_test_case_mtu_us) TEST_ASSERT(ble_gap_test_event.mtu.value == 123); } -TEST_CASE(ble_gap_test_case_mtu_peer) +TEST_CASE_SELF(ble_gap_test_case_mtu_peer) { const uint8_t peer_addr[6] = { 1,2,3,4,5,6 }; int rc; @@ -3090,7 +3093,7 @@ ble_gap_test_util_set_cb_event(struct ble_gap_event *event, void *arg) return 0; } -TEST_CASE(ble_gap_test_case_set_cb_good) +TEST_CASE_SELF(ble_gap_test_case_set_cb_good) { const uint8_t peer_addr[6] = { 1,2,3,4,5,6 }; struct hci_disconn_complete disconn_evt; @@ -3121,7 +3124,7 @@ TEST_CASE(ble_gap_test_case_set_cb_good) TEST_ASSERT(event.disconnect.conn.conn_handle == 2); } -TEST_CASE(ble_gap_test_case_set_cb_bad) +TEST_CASE_SELF(ble_gap_test_case_set_cb_bad) { int rc; @@ -3139,26 +3142,3 @@ TEST_SUITE(ble_gap_test_suite_set_cb) ble_gap_test_case_set_cb_good(); ble_gap_test_case_set_cb_bad(); } - -/***************************************************************************** - * $all * - *****************************************************************************/ - -int -ble_gap_test_all(void) -{ - ble_gap_test_suite_wl(); - ble_gap_test_suite_disc(); - ble_gap_test_suite_conn_gen(); - ble_gap_test_suite_conn_cancel(); - ble_gap_test_suite_conn_terminate(); - ble_gap_test_suite_conn_find(); - ble_gap_test_suite_adv(); - ble_gap_test_suite_stop_adv(); - ble_gap_test_suite_update_conn(); - ble_gap_test_suite_timeout(); - ble_gap_test_suite_mtu(); - ble_gap_test_suite_set_cb(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_gatt_conn_test.c b/nimble/host/test/src/ble_gatt_conn_test.c index 5c119866f..905d6c61f 100644 --- a/nimble/host/test/src/ble_gatt_conn_test.c +++ b/nimble/host/test/src/ble_gatt_conn_test.c @@ -365,7 +365,7 @@ ble_gatt_conn_test_write_rel_cb(uint16_t conn_handle, return 0; } -TEST_CASE(ble_gatt_conn_test_disconnect) +TEST_CASE_SELF(ble_gatt_conn_test_disconnect) { struct ble_gatt_conn_test_arg mtu_arg = { 0, BLE_HS_ENOTCONN }; struct ble_gatt_conn_test_arg disc_all_svcs_arg = { 0, BLE_HS_ENOTCONN }; @@ -583,7 +583,7 @@ ble_gatt_conn_test_util_timeout(uint16_t conn_handle, } } -TEST_CASE(ble_gatt_conn_test_timeout) +TEST_CASE_SELF(ble_gatt_conn_test_timeout) { static const uint8_t peer_addr[6] = { 1, 2, 3, 4, 5, 6 }; @@ -745,11 +745,3 @@ TEST_SUITE(ble_gatt_conn_suite) ble_gatt_conn_test_disconnect(); ble_gatt_conn_test_timeout(); } - -int -ble_gatt_conn_test_all(void) -{ - ble_gatt_conn_suite(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_gatt_disc_c_test.c b/nimble/host/test/src/ble_gatt_disc_c_test.c index 029e78cb2..d3e1d5a37 100644 --- a/nimble/host/test/src/ble_gatt_disc_c_test.c +++ b/nimble/host/test/src/ble_gatt_disc_c_test.c @@ -256,7 +256,7 @@ ble_gatt_disc_c_test_misc_uuid(uint16_t start_handle, uint16_t end_handle, ble_gatt_disc_c_test_misc_verify_chars(ret_chars, 0); } -TEST_CASE(ble_gatt_disc_c_test_disc_all) +TEST_CASE_SELF(ble_gatt_disc_c_test_disc_all) { /*** One 16-bit characteristic. */ ble_gatt_disc_c_test_misc_all(50, 100, 0, @@ -377,7 +377,7 @@ TEST_CASE(ble_gatt_disc_c_test_disc_all) }); } -TEST_CASE(ble_gatt_disc_c_test_disc_uuid) +TEST_CASE_SELF(ble_gatt_disc_c_test_disc_uuid) { /*** One 16-bit characteristic. */ ble_gatt_disc_c_test_misc_uuid(50, 100, 0, BLE_UUID16_DECLARE(0x2010), @@ -534,7 +534,7 @@ TEST_CASE(ble_gatt_disc_c_test_disc_uuid) ); } -TEST_CASE(ble_gatt_disc_c_test_oom_all) +TEST_CASE_SELF(ble_gatt_disc_c_test_oom_all) { /* Retrieve enough characteristics to require two transactions. */ struct ble_gatt_disc_c_test_char chrs[] = { @@ -620,7 +620,7 @@ TEST_CASE(ble_gatt_disc_c_test_oom_all) ble_gatt_disc_c_test_misc_verify_chars(chrs, 0); } -TEST_CASE(ble_gatt_disc_c_test_oom_uuid) +TEST_CASE_SELF(ble_gatt_disc_c_test_oom_uuid) { /* Retrieve enough characteristics to require two transactions. */ struct ble_gatt_disc_c_test_char chrs[] = { @@ -714,12 +714,3 @@ TEST_SUITE(ble_gatt_disc_c_test_suite) ble_gatt_disc_c_test_oom_all(); ble_gatt_disc_c_test_oom_uuid(); } - -int -ble_gatt_disc_c_test_all(void) -{ - ble_gatt_disc_c_test_suite(); - ble_gatt_disc_c_test_oom_all(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_gatt_disc_d_test.c b/nimble/host/test/src/ble_gatt_disc_d_test.c index 55b95386a..4a608e159 100644 --- a/nimble/host/test/src/ble_gatt_disc_d_test.c +++ b/nimble/host/test/src/ble_gatt_disc_d_test.c @@ -227,7 +227,7 @@ ble_gatt_disc_d_test_misc_all(uint16_t chr_val_handle, uint16_t end_handle, ble_gatt_disc_d_test_misc_verify_dscs(dscs, stop_after); } -TEST_CASE(ble_gatt_disc_d_test_1) +TEST_CASE_SELF(ble_gatt_disc_d_test_1) { /*** One 16-bit descriptor. */ ble_gatt_disc_d_test_misc_all(5, 10, 0, @@ -352,7 +352,7 @@ TEST_CASE(ble_gatt_disc_d_test_1) ); } -TEST_CASE(ble_gatt_disc_d_test_oom_all) +TEST_CASE_SELF(ble_gatt_disc_d_test_oom_all) { struct ble_gatt_disc_d_test_dsc dscs[] = { { @@ -442,11 +442,3 @@ TEST_SUITE(ble_gatt_disc_d_test_suite) ble_gatt_disc_d_test_1(); ble_gatt_disc_d_test_oom_all(); } - -int -ble_gatt_disc_d_test_all(void) -{ - ble_gatt_disc_d_test_suite(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_gatt_disc_s_test.c b/nimble/host/test/src/ble_gatt_disc_s_test.c index acd3dd29a..fb7301c9a 100644 --- a/nimble/host/test/src/ble_gatt_disc_s_test.c +++ b/nimble/host/test/src/ble_gatt_disc_s_test.c @@ -294,7 +294,7 @@ ble_gatt_disc_s_test_misc_good_uuid( ble_gatt_disc_s_test_misc_verify_services(services); } -TEST_CASE(ble_gatt_disc_s_test_disc_all) +TEST_CASE_SELF(ble_gatt_disc_s_test_disc_all) { /*** One 128-bit service. */ ble_gatt_disc_s_test_misc_good_all((struct ble_gatt_disc_s_test_svc[]) { @@ -334,7 +334,7 @@ TEST_CASE(ble_gatt_disc_s_test_disc_all) }); } -TEST_CASE(ble_gatt_disc_s_test_disc_uuid) +TEST_CASE_SELF(ble_gatt_disc_s_test_disc_uuid) { /*** 128-bit service; one entry. */ ble_gatt_disc_s_test_misc_good_uuid((struct ble_gatt_disc_s_test_svc[]) { @@ -397,7 +397,7 @@ TEST_CASE(ble_gatt_disc_s_test_disc_uuid) }); } -TEST_CASE(ble_gatt_disc_s_test_oom_all) +TEST_CASE_SELF(ble_gatt_disc_s_test_oom_all) { struct ble_gatt_disc_s_test_svc svcs[] = { { 1, 5, BLE_UUID128_DECLARE(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), }, @@ -468,7 +468,7 @@ TEST_CASE(ble_gatt_disc_s_test_oom_all) ble_gatt_disc_s_test_misc_verify_services(svcs); } -TEST_CASE(ble_gatt_disc_s_test_oom_uuid) +TEST_CASE_SELF(ble_gatt_disc_s_test_oom_uuid) { /* Retrieve enough services to require two transactions. */ struct ble_gatt_disc_s_test_svc svcs[] = { @@ -546,7 +546,7 @@ TEST_CASE(ble_gatt_disc_s_test_oom_uuid) ble_gatt_disc_s_test_misc_verify_services(svcs); } -TEST_CASE(ble_gatt_disc_s_test_oom_timeout) +TEST_CASE_SELF(ble_gatt_disc_s_test_oom_timeout) { struct ble_gatt_disc_s_test_svc svcs[] = { { 1, 5, BLE_UUID128_DECLARE(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), }, @@ -621,11 +621,3 @@ TEST_SUITE(ble_gatt_disc_s_test_suite) ble_gatt_disc_s_test_oom_uuid(); ble_gatt_disc_s_test_oom_timeout(); } - -int -ble_gatt_disc_s_test_all(void) -{ - ble_gatt_disc_s_test_suite(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_gatt_find_s_test.c b/nimble/host/test/src/ble_gatt_find_s_test.c index 4f88b88d4..adf23c1bf 100644 --- a/nimble/host/test/src/ble_gatt_find_s_test.c +++ b/nimble/host/test/src/ble_gatt_find_s_test.c @@ -249,7 +249,7 @@ ble_gatt_find_s_test_misc_find_inc(uint16_t conn_handle, } } -TEST_CASE(ble_gatt_find_s_test_1) +TEST_CASE_SELF(ble_gatt_find_s_test_1) { /* Two 16-bit UUID services; one response. */ ble_gatt_find_s_test_misc_init(); @@ -342,7 +342,7 @@ TEST_CASE(ble_gatt_find_s_test_1) ); } -TEST_CASE(ble_gatt_find_s_test_oom) +TEST_CASE_SELF(ble_gatt_find_s_test_oom) { struct ble_gatt_find_s_test_entry incs[] = { @@ -429,11 +429,3 @@ TEST_SUITE(ble_gatt_find_s_test_suite) ble_gatt_find_s_test_1(); ble_gatt_find_s_test_oom(); } - -int -ble_gatt_find_s_test_all(void) -{ - ble_gatt_find_s_test_suite(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_gatt_read_test.c b/nimble/host/test/src/ble_gatt_read_test.c index 263916db6..dd668d030 100644 --- a/nimble/host/test/src/ble_gatt_read_test.c +++ b/nimble/host/test/src/ble_gatt_read_test.c @@ -497,7 +497,7 @@ ble_gatt_read_test_misc_mult_verify_bad( TEST_ASSERT(!ble_gattc_any_jobs()); } -TEST_CASE(ble_gatt_read_test_by_handle) +TEST_CASE_SELF(ble_gatt_read_test_by_handle) { /* Read a seven-byte attribute. */ ble_gatt_read_test_misc_verify_good( @@ -540,7 +540,7 @@ TEST_CASE(ble_gatt_read_test_by_handle) } }); } -TEST_CASE(ble_gatt_read_test_by_uuid) +TEST_CASE_SELF(ble_gatt_read_test_by_uuid) { /* Read a single seven-byte attribute. */ ble_gatt_read_test_misc_uuid_verify_good(1, 100, BLE_UUID16_DECLARE(0x1234), 0, @@ -607,7 +607,7 @@ TEST_CASE(ble_gatt_read_test_by_uuid) } }); } -TEST_CASE(ble_gatt_read_test_long) +TEST_CASE_SELF(ble_gatt_read_test_long) { uint8_t data512[512]; int i; @@ -667,7 +667,7 @@ TEST_CASE(ble_gatt_read_test_long) } }); } -TEST_CASE(ble_gatt_read_test_mult) +TEST_CASE_SELF(ble_gatt_read_test_mult) { uint8_t data512[512]; int i; @@ -751,7 +751,7 @@ TEST_CASE(ble_gatt_read_test_mult) } }); } -TEST_CASE(ble_gatt_read_test_concurrent) +TEST_CASE_SELF(ble_gatt_read_test_concurrent) { int rc; int i; @@ -808,7 +808,7 @@ TEST_CASE(ble_gatt_read_test_concurrent) } } -TEST_CASE(ble_gatt_read_test_long_oom) +TEST_CASE_SELF(ble_gatt_read_test_long_oom) { static const struct ble_hs_test_util_flat_attr attr = { .handle = 34, @@ -911,11 +911,3 @@ TEST_SUITE(ble_gatt_read_test_suite) ble_gatt_read_test_concurrent(); ble_gatt_read_test_long_oom(); } - -int -ble_gatt_read_test_all(void) -{ - ble_gatt_read_test_suite(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_gatt_write_test.c b/nimble/host/test/src/ble_gatt_write_test.c index f0c7d8d49..d5c80a872 100644 --- a/nimble/host/test/src/ble_gatt_write_test.c +++ b/nimble/host/test/src/ble_gatt_write_test.c @@ -365,7 +365,7 @@ ble_gatt_write_test_misc_reliable_good( } } -TEST_CASE(ble_gatt_write_test_no_rsp) +TEST_CASE_SELF(ble_gatt_write_test_no_rsp) { int attr_len; int rc; @@ -386,7 +386,7 @@ TEST_CASE(ble_gatt_write_test_no_rsp) TEST_ASSERT(!ble_gatt_write_test_cb_called); } -TEST_CASE(ble_gatt_write_test_rsp) +TEST_CASE_SELF(ble_gatt_write_test_rsp) { int attr_len; @@ -412,7 +412,7 @@ TEST_CASE(ble_gatt_write_test_rsp) TEST_ASSERT(ble_gatt_write_test_cb_called); } -TEST_CASE(ble_gatt_write_test_long_good) +TEST_CASE_SELF(ble_gatt_write_test_long_good) { /*** 1 prep write req/rsp. */ ble_gatt_write_test_misc_long_good( @@ -426,7 +426,7 @@ TEST_CASE(ble_gatt_write_test_long_good) ble_gatt_write_test_misc_long_good(BLE_ATT_ATTR_MAX_LEN); } -TEST_CASE(ble_gatt_write_test_long_bad_handle) +TEST_CASE_SELF(ble_gatt_write_test_long_bad_handle) { /*** 1 prep write req/rsp. */ ble_gatt_write_test_misc_long_bad( @@ -444,7 +444,7 @@ TEST_CASE(ble_gatt_write_test_long_bad_handle) ble_gatt_write_test_misc_long_fail_handle); } -TEST_CASE(ble_gatt_write_test_long_bad_offset) +TEST_CASE_SELF(ble_gatt_write_test_long_bad_offset) { /*** 1 prep write req/rsp. */ ble_gatt_write_test_misc_long_bad( @@ -462,7 +462,7 @@ TEST_CASE(ble_gatt_write_test_long_bad_offset) ble_gatt_write_test_misc_long_fail_offset); } -TEST_CASE(ble_gatt_write_test_long_bad_value) +TEST_CASE_SELF(ble_gatt_write_test_long_bad_value) { /*** 1 prep write req/rsp. */ ble_gatt_write_test_misc_long_bad( @@ -480,7 +480,7 @@ TEST_CASE(ble_gatt_write_test_long_bad_value) ble_gatt_write_test_misc_long_fail_value); } -TEST_CASE(ble_gatt_write_test_long_bad_length) +TEST_CASE_SELF(ble_gatt_write_test_long_bad_length) { /*** 1 prep write req/rsp. */ ble_gatt_write_test_misc_long_bad( @@ -498,7 +498,7 @@ TEST_CASE(ble_gatt_write_test_long_bad_length) ble_gatt_write_test_misc_long_fail_length); } -TEST_CASE(ble_gatt_write_test_reliable_good) +TEST_CASE_SELF(ble_gatt_write_test_reliable_good) { /*** 1 attribute. */ ble_gatt_write_test_misc_reliable_good( @@ -558,7 +558,7 @@ TEST_CASE(ble_gatt_write_test_reliable_good) } })); } -TEST_CASE(ble_gatt_write_test_long_queue_full) +TEST_CASE_SELF(ble_gatt_write_test_long_queue_full) { int off; int len; @@ -608,7 +608,7 @@ TEST_CASE(ble_gatt_write_test_long_queue_full) ble_hs_test_util_verify_tx_exec_write(BLE_ATT_EXEC_WRITE_F_CANCEL); } -TEST_CASE(ble_gatt_write_test_long_oom) +TEST_CASE_SELF(ble_gatt_write_test_long_oom) { static const struct ble_hs_test_util_flat_attr attr = { .handle = 34, @@ -700,7 +700,7 @@ TEST_CASE(ble_gatt_write_test_long_oom) TEST_ASSERT(!ble_gattc_any_jobs()); } -TEST_CASE(ble_gatt_write_test_reliable_oom) +TEST_CASE_SELF(ble_gatt_write_test_reliable_oom) { static const struct ble_hs_test_util_flat_attr attr = { .handle = 34, @@ -810,11 +810,3 @@ TEST_SUITE(ble_gatt_write_test_suite) ble_gatt_write_test_long_oom(); ble_gatt_write_test_reliable_oom(); } - -int -ble_gatt_write_test_all(void) -{ - ble_gatt_write_test_suite(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_gatts_notify_test.c b/nimble/host/test/src/ble_gatts_notify_test.c index 85bffaad8..6d5a24eb6 100644 --- a/nimble/host/test/src/ble_gatts_notify_test.c +++ b/nimble/host/test/src/ble_gatts_notify_test.c @@ -562,7 +562,7 @@ ble_gatts_notify_test_restore_bonding(uint16_t conn_handle, } } -TEST_CASE(ble_gatts_notify_test_n) +TEST_CASE_SELF(ble_gatts_notify_test_n) { static const uint8_t fourbytes[] = { 1, 2, 3, 4 }; struct os_mbuf *om; @@ -657,7 +657,7 @@ TEST_CASE(ble_gatts_notify_test_n) TEST_ASSERT(flags == 0); } -TEST_CASE(ble_gatts_notify_test_i) +TEST_CASE_SELF(ble_gatts_notify_test_i) { static const uint8_t fourbytes[] = { 1, 2, 3, 4 }; struct os_mbuf *om; @@ -767,7 +767,7 @@ TEST_CASE(ble_gatts_notify_test_i) TEST_ASSERT(flags == 0); } -TEST_CASE(ble_gatts_notify_test_bonded_n) +TEST_CASE_SELF(ble_gatts_notify_test_bonded_n) { uint16_t conn_handle; uint16_t flags; @@ -831,7 +831,7 @@ TEST_CASE(ble_gatts_notify_test_bonded_n) TEST_ASSERT(ble_hs_test_util_num_cccds() == 2); } -TEST_CASE(ble_gatts_notify_test_bonded_i) +TEST_CASE_SELF(ble_gatts_notify_test_bonded_i) { uint16_t conn_handle; uint16_t flags; @@ -919,7 +919,7 @@ TEST_CASE(ble_gatts_notify_test_bonded_i) TEST_ASSERT(ble_hs_test_util_num_cccds() == 2); } -TEST_CASE(ble_gatts_notify_test_bonded_i_no_ack) +TEST_CASE_SELF(ble_gatts_notify_test_bonded_i_no_ack) { struct ble_store_value_cccd value_cccd; struct ble_store_key_cccd key_cccd; @@ -992,7 +992,7 @@ TEST_CASE(ble_gatts_notify_test_bonded_i_no_ack) TEST_ASSERT(!value_cccd.value_changed); } -TEST_CASE(ble_gatts_notify_test_disallowed) +TEST_CASE_SELF(ble_gatts_notify_test_disallowed) { uint16_t chr1_val_handle; uint16_t chr2_val_handle; @@ -1078,11 +1078,3 @@ TEST_SUITE(ble_gatts_notify_suite) * o Disconnect prior to rx of indicate ack. */ } - -int -ble_gatts_notify_test_all(void) -{ - ble_gatts_notify_suite(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_gatts_read_test.c b/nimble/host/test/src/ble_gatts_read_test.c index 332ec772e..542ac66da 100644 --- a/nimble/host/test/src/ble_gatts_read_test.c +++ b/nimble/host/test/src/ble_gatts_read_test.c @@ -183,7 +183,7 @@ ble_gatts_read_test_once(uint16_t conn_handle, uint16_t attr_id, ble_hs_test_util_verify_tx_read_rsp(expected_value, expected_len); } -TEST_CASE(ble_gatts_read_test_case_basic) +TEST_CASE_SELF(ble_gatts_read_test_case_basic) { uint16_t conn_handle; @@ -206,7 +206,7 @@ TEST_CASE(ble_gatts_read_test_case_basic) } -TEST_CASE(ble_gatts_read_test_case_long) +TEST_CASE_SELF(ble_gatts_read_test_case_long) { struct ble_att_read_blob_req read_blob_req; struct ble_att_read_req read_req; diff --git a/nimble/host/test/src/ble_gatts_reg_test.c b/nimble/host/test/src/ble_gatts_reg_test.c index 629f19a74..63d3b1398 100644 --- a/nimble/host/test/src/ble_gatts_reg_test.c +++ b/nimble/host/test/src/ble_gatts_reg_test.c @@ -297,7 +297,7 @@ ble_gatts_reg_test_misc_dummy_access(uint16_t conn_handle, return 0; } -TEST_CASE(ble_gatts_reg_test_svc_return) +TEST_CASE_SELF(ble_gatts_reg_test_svc_return) { int rc; @@ -346,7 +346,7 @@ TEST_CASE(ble_gatts_reg_test_svc_return) TEST_ASSERT(rc == 0); } -TEST_CASE(ble_gatts_reg_test_chr_return) +TEST_CASE_SELF(ble_gatts_reg_test_chr_return) { int rc; @@ -388,7 +388,7 @@ TEST_CASE(ble_gatts_reg_test_chr_return) TEST_ASSERT(rc == 0); } -TEST_CASE(ble_gatts_reg_test_dsc_return) +TEST_CASE_SELF(ble_gatts_reg_test_dsc_return) { int rc; @@ -480,7 +480,7 @@ ble_gatts_reg_test_misc_svcs(struct ble_gatt_svc_def *svcs) } } -TEST_CASE(ble_gatts_reg_test_svc_cb) +TEST_CASE_SELF(ble_gatts_reg_test_svc_cb) { /*** 1 primary. */ ble_gatts_reg_test_misc_svcs((struct ble_gatt_svc_def[]) { { @@ -532,7 +532,7 @@ TEST_CASE(ble_gatts_reg_test_svc_cb) ble_gatts_reg_test_misc_svcs(svcs); } -TEST_CASE(ble_gatts_reg_test_chr_cb) +TEST_CASE_SELF(ble_gatts_reg_test_chr_cb) { uint16_t val_handles[16]; @@ -585,7 +585,7 @@ TEST_CASE(ble_gatts_reg_test_chr_cb) } }); } -TEST_CASE(ble_gatts_reg_test_dsc_cb) +TEST_CASE_SELF(ble_gatts_reg_test_dsc_cb) { uint16_t val_handles[16]; @@ -707,11 +707,3 @@ TEST_SUITE(ble_gatts_reg_suite) ble_gatts_reg_test_chr_cb(); ble_gatts_reg_test_dsc_cb(); } - -int -ble_gatts_reg_test_all(void) -{ - ble_gatts_reg_suite(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_hs_adv_test.c b/nimble/host/test/src/ble_hs_adv_test.c index 50209eb88..481ad9d63 100644 --- a/nimble/host/test/src/ble_hs_adv_test.c +++ b/nimble/host/test/src/ble_hs_adv_test.c @@ -177,7 +177,7 @@ ble_hs_adv_test_misc_tx_and_verify_data( ble_hs_test_util_hci_out_last(); } -TEST_CASE(ble_hs_adv_test_case_user) +TEST_CASE_SELF(ble_hs_adv_test_case_user) { struct ble_hs_adv_fields adv_fields; struct ble_hs_adv_fields rsp_fields; @@ -680,7 +680,7 @@ TEST_CASE(ble_hs_adv_test_case_user) }, &rsp_fields, NULL); } -TEST_CASE(ble_hs_adv_test_case_user_rsp) +TEST_CASE_SELF(ble_hs_adv_test_case_user_rsp) { struct ble_hs_adv_fields rsp_fields; struct ble_hs_adv_fields adv_fields; @@ -1218,7 +1218,7 @@ TEST_CASE(ble_hs_adv_test_case_user_rsp) }); } -TEST_CASE(ble_hs_adv_test_case_user_full_payload) +TEST_CASE_SELF(ble_hs_adv_test_case_user_full_payload) { /* Intentionally allocate an extra byte. */ static const uint8_t mfg_data[30] = { @@ -1271,12 +1271,3 @@ TEST_SUITE(ble_hs_adv_test_suite) ble_hs_adv_test_case_user_rsp(); ble_hs_adv_test_case_user_full_payload(); } - -int -ble_hs_adv_test_all(void) -{ - ble_hs_adv_test_suite(); - - return tu_any_failed; -} - diff --git a/nimble/host/test/src/ble_hs_conn_test.c b/nimble/host/test/src/ble_hs_conn_test.c index 8e8e5e46f..415c40dce 100644 --- a/nimble/host/test/src/ble_hs_conn_test.c +++ b/nimble/host/test/src/ble_hs_conn_test.c @@ -38,7 +38,7 @@ ble_hs_conn_test_util_any() return conn != NULL; } -TEST_CASE(ble_hs_conn_test_direct_connect_success) +TEST_CASE_SELF(ble_hs_conn_test_direct_connect_success) { struct hci_le_conn_complete evt; struct ble_l2cap_chan *chan; @@ -89,7 +89,7 @@ TEST_CASE(ble_hs_conn_test_direct_connect_success) ble_hs_unlock(); } -TEST_CASE(ble_hs_conn_test_direct_connectable_success) +TEST_CASE_SELF(ble_hs_conn_test_direct_connectable_success) { struct hci_le_conn_complete evt; struct ble_gap_adv_params adv_params; @@ -147,7 +147,7 @@ TEST_CASE(ble_hs_conn_test_direct_connectable_success) ble_hs_unlock(); } -TEST_CASE(ble_hs_conn_test_undirect_connectable_success) +TEST_CASE_SELF(ble_hs_conn_test_undirect_connectable_success) { struct ble_hs_adv_fields adv_fields; struct hci_le_conn_complete evt; @@ -212,7 +212,7 @@ TEST_CASE(ble_hs_conn_test_undirect_connectable_success) ble_hs_unlock(); } -TEST_SUITE(conn_suite) +TEST_SUITE(ble_hs_conn_suite) { tu_suite_set_post_test_cb(ble_hs_test_util_post_test, NULL); @@ -220,11 +220,3 @@ TEST_SUITE(conn_suite) ble_hs_conn_test_direct_connectable_success(); ble_hs_conn_test_undirect_connectable_success(); } - -int -ble_hs_conn_test_all(void) -{ - conn_suite(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_hs_hci_test.c b/nimble/host/test/src/ble_hs_hci_test.c index fa9bff8f5..7bd68a750 100644 --- a/nimble/host/test/src/ble_hs_hci_test.c +++ b/nimble/host/test/src/ble_hs_hci_test.c @@ -26,7 +26,7 @@ #include "testutil/testutil.h" #include "ble_hs_test_util.h" -TEST_CASE(ble_hs_hci_test_event_bad) +TEST_CASE_SELF(ble_hs_hci_test_event_bad) { uint8_t *buf; int rc; @@ -41,7 +41,7 @@ TEST_CASE(ble_hs_hci_test_event_bad) TEST_ASSERT(rc == BLE_HS_ENOTSUP); } -TEST_CASE(ble_hs_hci_test_rssi) +TEST_CASE_SELF(ble_hs_hci_test_rssi) { uint8_t params[BLE_HCI_READ_RSSI_ACK_PARAM_LEN]; uint16_t opcode; @@ -83,7 +83,7 @@ TEST_CASE(ble_hs_hci_test_rssi) TEST_ASSERT(rc == BLE_HS_ECONTROLLER); } -TEST_CASE(ble_hs_hci_acl_one_conn) +TEST_CASE_SELF(ble_hs_hci_acl_one_conn) { struct ble_hs_test_util_hci_num_completed_pkts_entry ncpe[2]; struct hci_disconn_complete evt; @@ -167,7 +167,7 @@ TEST_CASE(ble_hs_hci_acl_one_conn) TEST_ASSERT_FATAL(ble_hs_hci_avail_pkts == 5); } -TEST_CASE(ble_hs_hci_acl_two_conn) +TEST_CASE_SELF(ble_hs_hci_acl_two_conn) { struct ble_hs_test_util_hci_num_completed_pkts_entry ncpe[2]; const struct ble_hs_conn *conn1; @@ -336,10 +336,3 @@ TEST_SUITE(ble_hs_hci_suite) ble_hs_hci_acl_one_conn(); ble_hs_hci_acl_two_conn(); } - -int -ble_hs_hci_test_all(void) -{ - ble_hs_hci_suite(); - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_hs_id_test.c b/nimble/host/test/src/ble_hs_id_test.c index 2abddb391..55038ee6b 100644 --- a/nimble/host/test/src/ble_hs_id_test.c +++ b/nimble/host/test/src/ble_hs_id_test.c @@ -36,7 +36,7 @@ ble_hs_id_test_util_infer_auto(int privacy, uint8_t *own_addr_type) return rc; } -TEST_CASE(ble_hs_id_test_case_auto_none) +TEST_CASE_SELF(ble_hs_id_test_case_auto_none) { uint8_t own_addr_type; int rc; @@ -50,7 +50,7 @@ TEST_CASE(ble_hs_id_test_case_auto_none) TEST_ASSERT_FATAL(rc == BLE_HS_ENOADDR); } -TEST_CASE(ble_hs_id_test_case_auto_public) +TEST_CASE_SELF(ble_hs_id_test_case_auto_public) { uint8_t own_addr_type; int rc; @@ -62,7 +62,7 @@ TEST_CASE(ble_hs_id_test_case_auto_public) TEST_ASSERT(own_addr_type == BLE_OWN_ADDR_PUBLIC); } -TEST_CASE(ble_hs_id_test_case_auto_random) +TEST_CASE_SELF(ble_hs_id_test_case_auto_random) { uint8_t own_addr_type; int rc; @@ -77,7 +77,7 @@ TEST_CASE(ble_hs_id_test_case_auto_random) TEST_ASSERT(own_addr_type == BLE_OWN_ADDR_RANDOM); } -TEST_CASE(ble_hs_id_test_case_auto_rpa_pub) +TEST_CASE_SELF(ble_hs_id_test_case_auto_rpa_pub) { uint8_t own_addr_type; int rc; @@ -89,7 +89,7 @@ TEST_CASE(ble_hs_id_test_case_auto_rpa_pub) TEST_ASSERT(own_addr_type == BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT); } -TEST_CASE(ble_hs_id_test_case_auto_rpa_rnd) +TEST_CASE_SELF(ble_hs_id_test_case_auto_rpa_rnd) { uint8_t own_addr_type; int rc; @@ -114,11 +114,3 @@ TEST_SUITE(ble_hs_id_test_suite_auto) ble_hs_id_test_case_auto_rpa_pub(); ble_hs_id_test_case_auto_rpa_rnd(); } - -int -ble_hs_id_test_all(void) -{ - ble_hs_id_test_suite_auto(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_hs_pvcy_test.c b/nimble/host/test/src/ble_hs_pvcy_test.c index bf0b6776b..672b2387d 100644 --- a/nimble/host/test/src/ble_hs_pvcy_test.c +++ b/nimble/host/test/src/ble_hs_pvcy_test.c @@ -240,7 +240,7 @@ ble_hs_pvcy_test_util_restore_irk(const struct ble_store_value_sec *value_sec, connecting); } -TEST_CASE(ble_hs_pvcy_test_case_restore_irks) +TEST_CASE_SELF(ble_hs_pvcy_test_case_restore_irks) { struct ble_store_value_sec value_sec1; struct ble_store_value_sec value_sec2; @@ -294,7 +294,7 @@ TEST_CASE(ble_hs_pvcy_test_case_restore_irks) } /** No active GAP procedures. */ -TEST_CASE(ble_hs_pvcy_test_case_add_irk_idle) +TEST_CASE_SELF(ble_hs_pvcy_test_case_add_irk_idle) { ble_hs_pvcy_test_util_init(); @@ -303,7 +303,7 @@ TEST_CASE(ble_hs_pvcy_test_case_add_irk_idle) } /*** Advertising active. */ -TEST_CASE(ble_hs_pvcy_test_case_add_irk_adv) +TEST_CASE_SELF(ble_hs_pvcy_test_case_add_irk_adv) { int rc; @@ -330,7 +330,7 @@ TEST_CASE(ble_hs_pvcy_test_case_add_irk_adv) } /*** Discovery active. */ -TEST_CASE(ble_hs_pvcy_test_case_add_irk_disc) +TEST_CASE_SELF(ble_hs_pvcy_test_case_add_irk_disc) { struct ble_gap_disc_params disc_params; int rc; @@ -357,7 +357,7 @@ TEST_CASE(ble_hs_pvcy_test_case_add_irk_disc) } /*** Connect active. */ -TEST_CASE(ble_hs_pvcy_test_case_add_irk_conn) +TEST_CASE_SELF(ble_hs_pvcy_test_case_add_irk_conn) { ble_addr_t peer_addr; int rc; @@ -395,7 +395,7 @@ TEST_CASE(ble_hs_pvcy_test_case_add_irk_conn) } /*** Advertising and discovery active. */ -TEST_CASE(ble_hs_pvcy_test_case_add_irk_adv_disc) +TEST_CASE_SELF(ble_hs_pvcy_test_case_add_irk_adv_disc) { struct ble_gap_disc_params disc_params; int rc; @@ -434,7 +434,7 @@ TEST_CASE(ble_hs_pvcy_test_case_add_irk_adv_disc) } /*** Advertising and connecting active. */ -TEST_CASE(ble_hs_pvcy_test_case_add_irk_adv_conn) +TEST_CASE_SELF(ble_hs_pvcy_test_case_add_irk_adv_conn) { ble_addr_t peer_addr; int rc; @@ -495,11 +495,3 @@ TEST_SUITE(ble_hs_pvcy_test_suite_irk) ble_hs_pvcy_test_case_add_irk_adv_disc(); ble_hs_pvcy_test_case_add_irk_adv_conn(); } - -int -ble_hs_pvcy_test_all(void) -{ - ble_hs_pvcy_test_suite_irk(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_hs_test.c b/nimble/host/test/src/ble_hs_test.c index b30ee25aa..6bc071df0 100644 --- a/nimble/host/test/src/ble_hs_test.c +++ b/nimble/host/test/src/ble_hs_test.c @@ -30,32 +30,49 @@ int main(int argc, char **argv) { - sysinit(); + /* XXX: This test must come before the others; it causes privacy to be + * enabled. Subsequent tests depend on this. This is wrong - each test + * should enable privacy as needed, but the test util functions are so low + * level that they make this very difficult to arrange (individual HCI + * commands and responses). + */ + ble_gap_test_suite_disc(); - ble_att_clt_test_all(); - ble_att_svr_test_all(); - ble_gap_test_all(); - ble_gatt_conn_test_all(); - ble_gatt_disc_c_test_all(); - ble_gatt_disc_d_test_all(); - ble_gatt_disc_s_test_all(); - ble_gatt_find_s_test_all(); - ble_gatt_read_test_all(); - ble_gatt_write_test_all(); - ble_gatts_notify_test_all(); + ble_att_clt_suite(); + ble_att_svr_suite(); + ble_gap_test_suite_adv(); + ble_gap_test_suite_conn_cancel(); + ble_gap_test_suite_conn_find(); + ble_gap_test_suite_conn_gen(); + ble_gap_test_suite_conn_terminate(); + ble_gap_test_suite_mtu(); + ble_gap_test_suite_set_cb(); + ble_gap_test_suite_stop_adv(); + ble_gap_test_suite_timeout(); + ble_gap_test_suite_update_conn(); + ble_gap_test_suite_wl(); + ble_gatt_conn_suite(); + ble_gatt_disc_c_test_suite(); + ble_gatt_disc_d_test_suite(); + ble_gatt_disc_s_test_suite(); + ble_gatt_find_s_test_suite(); + ble_gatt_read_test_suite(); + ble_gatt_write_test_suite(); + ble_gatts_notify_suite(); ble_gatts_read_test_suite(); - ble_gatts_reg_test_all(); - ble_hs_adv_test_all(); - ble_hs_conn_test_all(); - ble_hs_hci_test_all(); - ble_hs_id_test_all(); - ble_hs_pvcy_test_all(); - ble_l2cap_test_all(); - ble_os_test_all(); - ble_sm_test_all(); - ble_stop_test_all(); - ble_store_test_all(); - ble_uuid_test_all(); + ble_gatts_reg_suite(); + ble_hs_adv_test_suite(); + ble_hs_conn_suite(); + ble_hs_hci_suite(); + ble_hs_id_test_suite_auto(); + ble_hs_pvcy_test_suite_irk(); + ble_l2cap_test_suite(); + ble_os_test_suite(); + ble_sm_gen_test_suite(); + ble_sm_lgcy_test_suite(); + ble_sm_sc_test_suite(); + ble_store_suite(); + ble_uuid_test_suite(); return tu_any_failed; } diff --git a/nimble/host/test/src/ble_hs_test_util.c b/nimble/host/test/src/ble_hs_test_util.c index b2fef75aa..b0ac53451 100644 --- a/nimble/host/test/src/ble_hs_test_util.c +++ b/nimble/host/test/src/ble_hs_test_util.c @@ -223,7 +223,9 @@ ble_hs_test_util_create_rpa_conn(uint16_t handle, uint8_t own_addr_type, addr.type = peer_addr_type; memcpy(addr.val, peer_id_addr, 6); - ble_hs_test_util_connect(own_addr_type, &addr, 0, NULL, cb, cb_arg, 0); + rc = ble_hs_test_util_connect(own_addr_type, &addr, 0, NULL, cb, cb_arg, + 0); + TEST_ASSERT_FATAL(rc == 0); /* ble_gap_rx_conn_complete() will send extra HCI command, need phony ack */ ble_hs_test_util_hci_ack_set(ble_hs_hci_util_opcode_join(BLE_HCI_OGF_LE, diff --git a/nimble/host/test/src/ble_l2cap_test.c b/nimble/host/test/src/ble_l2cap_test.c index 1d5989128..c36b0ca95 100644 --- a/nimble/host/test/src/ble_l2cap_test.c +++ b/nimble/host/test/src/ble_l2cap_test.c @@ -267,7 +267,7 @@ ble_l2cap_test_util_verify_last_frag(uint16_t conn_handle, * $rx * *****************************************************************************/ -TEST_CASE(ble_l2cap_test_case_bad_header) +TEST_CASE_SELF(ble_l2cap_test_case_bad_header) { int rc; @@ -280,7 +280,7 @@ TEST_CASE(ble_l2cap_test_case_bad_header) TEST_ASSERT(rc == BLE_HS_ENOENT); } -TEST_CASE(ble_l2cap_test_case_bad_handle) +TEST_CASE_SELF(ble_l2cap_test_case_bad_handle) { int rc; @@ -300,7 +300,7 @@ TEST_CASE(ble_l2cap_test_case_bad_handle) * $fragmentation * *****************************************************************************/ -TEST_CASE(ble_l2cap_test_case_frag_single) +TEST_CASE_SELF(ble_l2cap_test_case_frag_single) { struct hci_data_hdr hci_hdr; struct os_mbuf *om; @@ -336,7 +336,7 @@ TEST_CASE(ble_l2cap_test_case_frag_single) ble_l2cap_test_util_verify_last_frag(2, 5); } -TEST_CASE(ble_l2cap_test_case_frag_multiple) +TEST_CASE_SELF(ble_l2cap_test_case_frag_multiple) { ble_l2cap_test_util_init(); @@ -358,7 +358,7 @@ TEST_CASE(ble_l2cap_test_case_frag_multiple) ble_l2cap_test_util_verify_last_frag(2, 1); } -TEST_CASE(ble_l2cap_test_case_frag_channels) +TEST_CASE_SELF(ble_l2cap_test_case_frag_channels) { struct ble_hs_conn *conn; int rc; @@ -400,7 +400,7 @@ TEST_CASE(ble_l2cap_test_case_frag_channels) ble_hs_test_util_conn_disconnect(2); } -TEST_CASE(ble_l2cap_test_case_frag_timeout) +TEST_CASE_SELF(ble_l2cap_test_case_frag_timeout) { int32_t ticks_from_now; int rc; @@ -449,7 +449,7 @@ TEST_CASE(ble_l2cap_test_case_frag_timeout) * $unsolicited response * *****************************************************************************/ -TEST_CASE(ble_l2cap_test_case_sig_unsol_rsp) +TEST_CASE_SELF(ble_l2cap_test_case_sig_unsol_rsp) { int rc; @@ -566,27 +566,27 @@ ble_l2cap_test_util_we_update(int peer_accepts) TEST_ASSERT(ble_l2cap_test_update_arg == NULL); } -TEST_CASE(ble_l2cap_test_case_sig_update_accept) +TEST_CASE_SELF(ble_l2cap_test_case_sig_update_accept) { ble_l2cap_test_util_peer_updates(1); } -TEST_CASE(ble_l2cap_test_case_sig_update_reject) +TEST_CASE_SELF(ble_l2cap_test_case_sig_update_reject) { ble_l2cap_test_util_peer_updates(0); } -TEST_CASE(ble_l2cap_test_case_sig_update_init_accept) +TEST_CASE_SELF(ble_l2cap_test_case_sig_update_init_accept) { ble_l2cap_test_util_we_update(1); } -TEST_CASE(ble_l2cap_test_case_sig_update_init_reject) +TEST_CASE_SELF(ble_l2cap_test_case_sig_update_init_reject) { ble_l2cap_test_util_we_update(0); } -TEST_CASE(ble_l2cap_test_case_sig_update_init_fail_master) +TEST_CASE_SELF(ble_l2cap_test_case_sig_update_init_fail_master) { struct ble_l2cap_sig_update_params params; int rc; @@ -607,7 +607,7 @@ TEST_CASE(ble_l2cap_test_case_sig_update_init_fail_master) TEST_ASSERT(ble_l2cap_test_update_status == -1); } -TEST_CASE(ble_l2cap_test_case_sig_update_init_fail_bad_id) +TEST_CASE_SELF(ble_l2cap_test_case_sig_update_init_fail_bad_id) { struct ble_l2cap_sig_update_params params; uint8_t id; @@ -1002,7 +1002,7 @@ ble_l2cap_test_set_chan_test_conf(uint16_t psm, uint16_t mtu, t->mtu = mtu; } -TEST_CASE(ble_l2cap_test_case_sig_coc_conn_invalid_psm) +TEST_CASE_SELF(ble_l2cap_test_case_sig_coc_conn_invalid_psm) { struct test_data t; @@ -1020,7 +1020,7 @@ TEST_CASE(ble_l2cap_test_case_sig_coc_conn_invalid_psm) TEST_ASSERT(t.expected_num_of_ev == t.event_iter); } -TEST_CASE(ble_l2cap_test_case_sig_coc_conn_out_of_resource) +TEST_CASE_SELF(ble_l2cap_test_case_sig_coc_conn_out_of_resource) { struct test_data t; @@ -1039,7 +1039,7 @@ TEST_CASE(ble_l2cap_test_case_sig_coc_conn_out_of_resource) TEST_ASSERT(t.expected_num_of_ev == t.event_iter); } -TEST_CASE(ble_l2cap_test_case_sig_coc_conn_invalid_cid) +TEST_CASE_SELF(ble_l2cap_test_case_sig_coc_conn_invalid_cid) { struct test_data t; @@ -1058,7 +1058,7 @@ TEST_CASE(ble_l2cap_test_case_sig_coc_conn_invalid_cid) TEST_ASSERT(t.expected_num_of_ev == t.event_iter); } -TEST_CASE(ble_l2cap_test_case_sig_coc_conn_insuff_authen) +TEST_CASE_SELF(ble_l2cap_test_case_sig_coc_conn_insuff_authen) { struct test_data t; @@ -1077,7 +1077,7 @@ TEST_CASE(ble_l2cap_test_case_sig_coc_conn_insuff_authen) TEST_ASSERT(t.expected_num_of_ev == t.event_iter); } -TEST_CASE(ble_l2cap_test_case_sig_coc_conn_insuff_author) +TEST_CASE_SELF(ble_l2cap_test_case_sig_coc_conn_insuff_author) { struct test_data t; @@ -1096,7 +1096,7 @@ TEST_CASE(ble_l2cap_test_case_sig_coc_conn_insuff_author) TEST_ASSERT(t.expected_num_of_ev == t.event_iter); } -TEST_CASE(ble_l2cap_test_case_sig_coc_incoming_conn_invalid_psm) +TEST_CASE_SELF(ble_l2cap_test_case_sig_coc_incoming_conn_invalid_psm) { struct test_data t; @@ -1114,7 +1114,7 @@ TEST_CASE(ble_l2cap_test_case_sig_coc_incoming_conn_invalid_psm) TEST_ASSERT(t.expected_num_of_ev == t.event_iter); } -TEST_CASE(ble_l2cap_test_case_sig_coc_incoming_conn_rejected_by_app) +TEST_CASE_SELF(ble_l2cap_test_case_sig_coc_incoming_conn_rejected_by_app) { struct test_data t; int rc; @@ -1147,7 +1147,7 @@ TEST_CASE(ble_l2cap_test_case_sig_coc_incoming_conn_rejected_by_app) current_cid++; } -TEST_CASE(ble_l2cap_test_case_sig_coc_incoming_conn_success) +TEST_CASE_SELF(ble_l2cap_test_case_sig_coc_incoming_conn_success) { struct test_data t; int rc; @@ -1171,7 +1171,7 @@ TEST_CASE(ble_l2cap_test_case_sig_coc_incoming_conn_success) TEST_ASSERT(t.expected_num_of_ev == t.event_iter); } -TEST_CASE(ble_l2cap_test_case_sig_coc_disconnect_succeed) +TEST_CASE_SELF(ble_l2cap_test_case_sig_coc_disconnect_succeed) { struct test_data t; @@ -1192,7 +1192,7 @@ TEST_CASE(ble_l2cap_test_case_sig_coc_disconnect_succeed) TEST_ASSERT(t.expected_num_of_ev == t.event_iter); } -TEST_CASE(ble_l2cap_test_case_sig_coc_incoming_disconnect_succeed) +TEST_CASE_SELF(ble_l2cap_test_case_sig_coc_incoming_disconnect_succeed) { struct test_data t; @@ -1213,7 +1213,7 @@ TEST_CASE(ble_l2cap_test_case_sig_coc_incoming_disconnect_succeed) TEST_ASSERT(t.expected_num_of_ev == t.event_iter); } -TEST_CASE(ble_l2cap_test_case_sig_coc_incoming_disconnect_failed) +TEST_CASE_SELF(ble_l2cap_test_case_sig_coc_incoming_disconnect_failed) { struct test_data t; @@ -1234,7 +1234,7 @@ TEST_CASE(ble_l2cap_test_case_sig_coc_incoming_disconnect_failed) TEST_ASSERT(t.expected_num_of_ev == t.event_iter); } -TEST_CASE(ble_l2cap_test_case_coc_send_data_succeed) +TEST_CASE_SELF(ble_l2cap_test_case_coc_send_data_succeed) { struct test_data t; uint8_t buf[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; @@ -1258,7 +1258,7 @@ TEST_CASE(ble_l2cap_test_case_coc_send_data_succeed) TEST_ASSERT(t.expected_num_of_ev == t.event_iter); } -TEST_CASE(ble_l2cap_test_case_coc_send_data_failed_too_big_sdu) +TEST_CASE_SELF(ble_l2cap_test_case_coc_send_data_failed_too_big_sdu) { struct test_data t = {}; uint16_t small_mtu = 27; @@ -1284,7 +1284,7 @@ TEST_CASE(ble_l2cap_test_case_coc_send_data_failed_too_big_sdu) TEST_ASSERT(t.expected_num_of_ev == t.event_iter); } -TEST_CASE(ble_l2cap_test_case_coc_recv_data_succeed) +TEST_CASE_SELF(ble_l2cap_test_case_coc_recv_data_succeed) { struct test_data t = {}; uint8_t buf[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; @@ -1340,11 +1340,3 @@ TEST_SUITE(ble_l2cap_test_suite) ble_l2cap_test_case_coc_send_data_failed_too_big_sdu(); ble_l2cap_test_case_coc_recv_data_succeed(); } - -int -ble_l2cap_test_all(void) -{ - ble_l2cap_test_suite(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_os_test.c b/nimble/host/test/src/ble_os_test.c index a641873fa..cbeb64ae2 100644 --- a/nimble/host/test/src/ble_os_test.c +++ b/nimble/host/test/src/ble_os_test.c @@ -164,7 +164,7 @@ ble_gap_direct_connect_test_task_handler(void *arg) tu_restart(); } -TEST_CASE(ble_gap_direct_connect_test_case) +TEST_CASE_SELF(ble_gap_direct_connect_test_case) { ble_os_test_misc_init(); @@ -250,7 +250,7 @@ ble_os_disc_test_task_handler(void *arg) tu_restart(); } -TEST_CASE(ble_os_disc_test_case) +TEST_CASE_SELF(ble_os_disc_test_case) { ble_os_test_misc_init(); @@ -371,7 +371,7 @@ ble_os_test_app_task_handler(void *arg) } } -TEST_CASE(ble_gap_terminate_test_case) +TEST_CASE_SELF(ble_gap_terminate_test_case) { ble_os_test_misc_init(); @@ -392,10 +392,3 @@ TEST_SUITE(ble_os_test_suite) ble_gap_direct_connect_test_case(); ble_gap_terminate_test_case(); } - -int -ble_os_test_all(void) -{ - ble_os_test_suite(); - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_sm_lgcy_test.c b/nimble/host/test/src/ble_sm_lgcy_test.c index 5f82d3730..e7fd7291f 100644 --- a/nimble/host/test/src/ble_sm_lgcy_test.c +++ b/nimble/host/test/src/ble_sm_lgcy_test.c @@ -42,7 +42,7 @@ * Initiator key distribution: 7 * Responder key distribution: 7 */ -TEST_CASE(ble_sm_lgcy_peer_jw_iio4_rio3_b1_iat0_rat0_ik7_rk7) +TEST_CASE_SELF(ble_sm_lgcy_peer_jw_iio4_rio3_b1_iat0_rat0_ik7_rk7) { struct ble_sm_test_params params; @@ -176,7 +176,7 @@ TEST_CASE(ble_sm_lgcy_peer_jw_iio4_rio3_b1_iat0_rat0_ik7_rk7) * Initiator key distribution: 7 * Responder key distribution: 7 */ -TEST_CASE(ble_sm_lgcy_peer_pk_iio4_rio0_b1_iat0_rat0_ik7_rk7) +TEST_CASE_SELF(ble_sm_lgcy_peer_pk_iio4_rio0_b1_iat0_rat0_ik7_rk7) { struct ble_sm_test_params params; @@ -311,7 +311,7 @@ TEST_CASE(ble_sm_lgcy_peer_pk_iio4_rio0_b1_iat0_rat0_ik7_rk7) * Initiator key distribution: 7 * Responder key distribution: 5 */ -TEST_CASE(ble_sm_lgcy_us_jw_iio3_rio3_b1_iat0_rat1_ik7_rk5) +TEST_CASE_SELF(ble_sm_lgcy_us_jw_iio3_rio3_b1_iat0_rat1_ik7_rk5) { struct ble_sm_test_params params; @@ -434,7 +434,7 @@ TEST_CASE(ble_sm_lgcy_us_jw_iio3_rio3_b1_iat0_rat1_ik7_rk5) * Initiator key distribution: 7 * Responder key distribution: 5 */ -TEST_CASE(ble_sm_lgcy_us_pk_iio4_rio2_b1_iat0_rat1_ik7_rk5) +TEST_CASE_SELF(ble_sm_lgcy_us_pk_iio4_rio2_b1_iat0_rat1_ik7_rk5) { struct ble_sm_test_params params; @@ -558,7 +558,7 @@ TEST_CASE(ble_sm_lgcy_us_pk_iio4_rio2_b1_iat0_rat1_ik7_rk5) * Initiator key distribution: 7 * Responder key distribution: 7 */ -TEST_CASE(ble_sm_lgcy_us_ob_iio3_rio3_b1_iat0_rat0_ik7_rk7) +TEST_CASE_SELF(ble_sm_lgcy_us_ob_iio3_rio3_b1_iat0_rat0_ik7_rk7) { struct ble_sm_test_params params; @@ -696,7 +696,7 @@ TEST_CASE(ble_sm_lgcy_us_ob_iio3_rio3_b1_iat0_rat0_ik7_rk7) * Initiator key distribution: 7 * Responder key distribution: 7 */ -TEST_CASE(ble_sm_lgcy_peer_pk_iio4_rio4_b1_iat0_rat0_ik7_rk7) +TEST_CASE_SELF(ble_sm_lgcy_peer_pk_iio4_rio4_b1_iat0_rat0_ik7_rk7) { struct ble_sm_test_params params; diff --git a/nimble/host/test/src/ble_sm_sc_test.c b/nimble/host/test/src/ble_sm_sc_test.c index 9568f85d4..a3ed5b139 100644 --- a/nimble/host/test/src/ble_sm_sc_test.c +++ b/nimble/host/test/src/ble_sm_sc_test.c @@ -42,7 +42,7 @@ * Initiator key distribution: 5 * Responder key distribution: 7 */ -TEST_CASE(ble_sm_sc_peer_jw_iio3_rio3_b1_iat0_rat0_ik5_rk7) +TEST_CASE_SELF(ble_sm_sc_peer_jw_iio3_rio3_b1_iat0_rat0_ik5_rk7) { struct ble_sm_test_params params; @@ -184,7 +184,7 @@ TEST_CASE(ble_sm_sc_peer_jw_iio3_rio3_b1_iat0_rat0_ik5_rk7) * Initiator key distribution: 5 * Responder key distribution: 7 */ -TEST_CASE(ble_sm_sc_peer_pk_iio0_rio2_b1_iat0_rat0_ik5_rk7) +TEST_CASE_SELF(ble_sm_sc_peer_pk_iio0_rio2_b1_iat0_rat0_ik5_rk7) { struct ble_sm_test_params params; @@ -789,7 +789,7 @@ TEST_CASE(ble_sm_sc_peer_pk_iio0_rio2_b1_iat0_rat0_ik5_rk7) * Initiator key distribution: 5 * Responder key distribution: 7 */ -TEST_CASE(ble_sm_sc_peer_pk_iio2_rio0_b1_iat0_rat0_ik5_rk7) +TEST_CASE_SELF(ble_sm_sc_peer_pk_iio2_rio0_b1_iat0_rat0_ik5_rk7) { struct ble_sm_test_params params; @@ -1394,7 +1394,7 @@ TEST_CASE(ble_sm_sc_peer_pk_iio2_rio0_b1_iat0_rat0_ik5_rk7) * Initiator key distribution: 5 * Responder key distribution: 7 */ -TEST_CASE(ble_sm_sc_peer_nc_iio1_rio1_b1_iat0_rat0_ik5_rk7) +TEST_CASE_SELF(ble_sm_sc_peer_nc_iio1_rio1_b1_iat0_rat0_ik5_rk7) { struct ble_sm_test_params params; @@ -1538,7 +1538,7 @@ TEST_CASE(ble_sm_sc_peer_nc_iio1_rio1_b1_iat0_rat0_ik5_rk7) * Initiator key distribution: 7 * Responder key distribution: 5 */ -TEST_CASE(ble_sm_sc_us_jw_iio3_rio4_b1_iat0_rat0_ik7_rk5) +TEST_CASE_SELF(ble_sm_sc_us_jw_iio3_rio4_b1_iat0_rat0_ik7_rk5) { struct ble_sm_test_params params; @@ -1680,7 +1680,7 @@ TEST_CASE(ble_sm_sc_us_jw_iio3_rio4_b1_iat0_rat0_ik7_rk5) * Initiator key distribution: 7 * Responder key distribution: 5 */ -TEST_CASE(ble_sm_sc_us_pk_iio2_rio4_b1_iat0_rat0_ik7_rk5) +TEST_CASE_SELF(ble_sm_sc_us_pk_iio2_rio4_b1_iat0_rat0_ik7_rk5) { struct ble_sm_test_params params; @@ -2285,7 +2285,7 @@ TEST_CASE(ble_sm_sc_us_pk_iio2_rio4_b1_iat0_rat0_ik7_rk5) * Initiator key distribution: 7 * Responder key distribution: 5 */ -TEST_CASE(ble_sm_sc_us_pk_iio0_rio4_b1_iat0_rat0_ik7_rk5) +TEST_CASE_SELF(ble_sm_sc_us_pk_iio0_rio4_b1_iat0_rat0_ik7_rk5) { struct ble_sm_test_params params; @@ -2890,7 +2890,7 @@ TEST_CASE(ble_sm_sc_us_pk_iio0_rio4_b1_iat0_rat0_ik7_rk5) * Initiator key distribution: 7 * Responder key distribution: 5 */ -TEST_CASE(ble_sm_sc_us_nc_iio1_rio4_b1_iat0_rat0_ik7_rk5) +TEST_CASE_SELF(ble_sm_sc_us_nc_iio1_rio4_b1_iat0_rat0_ik7_rk5) { struct ble_sm_test_params params; @@ -3034,7 +3034,7 @@ TEST_CASE(ble_sm_sc_us_nc_iio1_rio4_b1_iat0_rat0_ik7_rk5) * Initiator key distribution: 7 * Responder key distribution: 7 */ -TEST_CASE(ble_sm_sc_peer_jw_iio3_rio3_b1_iat2_rat2_ik7_rk7) +TEST_CASE_SELF(ble_sm_sc_peer_jw_iio3_rio3_b1_iat2_rat2_ik7_rk7) { struct ble_sm_test_params params; @@ -3196,7 +3196,7 @@ TEST_CASE(ble_sm_sc_peer_jw_iio3_rio3_b1_iat2_rat2_ik7_rk7) * Initiator key distribution: 3 * Responder key distribution: 3 */ -TEST_CASE(ble_sm_sc_peer_nc_iio1_rio1_b1_iat2_rat2_ik3_rk3) +TEST_CASE_SELF(ble_sm_sc_peer_nc_iio1_rio1_b1_iat2_rat2_ik3_rk3) { struct ble_sm_test_params params; @@ -3348,7 +3348,7 @@ TEST_CASE(ble_sm_sc_peer_nc_iio1_rio1_b1_iat2_rat2_ik3_rk3) * Initiator key distribution: 7 * Responder key distribution: 3 */ -TEST_CASE(ble_sm_sc_peer_pk_iio2_rio0_b1_iat2_rat2_ik7_rk3) +TEST_CASE_SELF(ble_sm_sc_peer_pk_iio2_rio0_b1_iat2_rat2_ik7_rk3) { struct ble_sm_test_params params; @@ -3967,7 +3967,7 @@ TEST_CASE(ble_sm_sc_peer_pk_iio2_rio0_b1_iat2_rat2_ik7_rk3) * Initiator key distribution: 3 * Responder key distribution: 3 */ -TEST_CASE(ble_sm_sc_us_jw_iio3_rio3_b1_iat2_rat2_ik3_rk3) +TEST_CASE_SELF(ble_sm_sc_us_jw_iio3_rio3_b1_iat2_rat2_ik3_rk3) { struct ble_sm_test_params params; @@ -4117,7 +4117,7 @@ TEST_CASE(ble_sm_sc_us_jw_iio3_rio3_b1_iat2_rat2_ik3_rk3) * Initiator key distribution: 3 * Responder key distribution: 3 */ -TEST_CASE(ble_sm_sc_us_nc_iio1_rio1_b1_iat2_rat2_ik3_rk3) +TEST_CASE_SELF(ble_sm_sc_us_nc_iio1_rio1_b1_iat2_rat2_ik3_rk3) { struct ble_sm_test_params params; @@ -4269,7 +4269,7 @@ TEST_CASE(ble_sm_sc_us_nc_iio1_rio1_b1_iat2_rat2_ik3_rk3) * Initiator key distribution: 7 * Responder key distribution: 3 */ -TEST_CASE(ble_sm_sc_us_pk_iio2_rio0_b1_iat2_rat2_ik7_rk3) +TEST_CASE_SELF(ble_sm_sc_us_pk_iio2_rio0_b1_iat2_rat2_ik7_rk3) { struct ble_sm_test_params params; diff --git a/nimble/host/test/src/ble_sm_test.c b/nimble/host/test/src/ble_sm_test.c index a9de85799..381d171c2 100644 --- a/nimble/host/test/src/ble_sm_test.c +++ b/nimble/host/test/src/ble_sm_test.c @@ -34,7 +34,7 @@ * $misc * *****************************************************************************/ -TEST_CASE(ble_sm_test_case_f4) +TEST_CASE_SELF(ble_sm_test_case_f4) { uint8_t u[32] = { 0xe6, 0x9d, 0x35, 0x0e, 0x48, 0x01, 0x03, 0xcc, 0xdb, 0xfd, 0xf4, 0xac, 0x11, 0x91, 0xf4, 0xef, @@ -57,7 +57,7 @@ TEST_CASE(ble_sm_test_case_f4) TEST_ASSERT(memcmp(res, exp, 16) == 0); } -TEST_CASE(ble_sm_test_case_f5) +TEST_CASE_SELF(ble_sm_test_case_f5) { uint8_t w[32] = { 0x98, 0xa6, 0xbf, 0x73, 0xf3, 0x34, 0x8d, 0x86, 0xf1, 0x66, 0xf8, 0xb4, 0x13, 0x6b, 0x79, 0x99, @@ -86,7 +86,7 @@ TEST_CASE(ble_sm_test_case_f5) TEST_ASSERT(memcmp(ltk, exp_ltk, 16) == 0); } -TEST_CASE(ble_sm_test_case_f6) +TEST_CASE_SELF(ble_sm_test_case_f6) { uint8_t w[16] = { 0x20, 0x6e, 0x63, 0xce, 0x20, 0x6a, 0x3f, 0xfd, 0x02, 0x4a, 0x08, 0xa1, 0x76, 0xf1, 0x65, 0x29 }; @@ -111,7 +111,7 @@ TEST_CASE(ble_sm_test_case_f6) TEST_ASSERT(memcmp(res, exp, 16) == 0); } -TEST_CASE(ble_sm_test_case_g2) +TEST_CASE_SELF(ble_sm_test_case_g2) { uint8_t u[32] = { 0xe6, 0x9d, 0x35, 0x0e, 0x48, 0x01, 0x03, 0xcc, 0xdb, 0xfd, 0xf4, 0xac, 0x11, 0x91, 0xf4, 0xef, @@ -134,7 +134,7 @@ TEST_CASE(ble_sm_test_case_g2) TEST_ASSERT(val == exp_val); } -TEST_CASE(ble_sm_test_case_conn_broken) +TEST_CASE_SELF(ble_sm_test_case_conn_broken) { struct hci_disconn_complete disconn_evt; int rc; @@ -168,7 +168,7 @@ TEST_CASE(ble_sm_test_case_conn_broken) * $peer * *****************************************************************************/ -TEST_CASE(ble_sm_test_case_peer_fail_inval) +TEST_CASE_SELF(ble_sm_test_case_peer_fail_inval) { /* Invalid role detected before other arguments. */ ble_sm_test_util_peer_fail_inval( @@ -225,7 +225,7 @@ TEST_CASE(ble_sm_test_case_peer_fail_inval) ); } -TEST_CASE(ble_sm_test_case_peer_lgcy_fail_confirm) +TEST_CASE_SELF(ble_sm_test_case_peer_lgcy_fail_confirm) { ble_sm_test_util_peer_lgcy_fail_confirm( ((uint8_t[]){0xe1, 0xfc, 0xda, 0xf4, 0xb7, 0x6c}), @@ -276,13 +276,13 @@ TEST_CASE(ble_sm_test_case_peer_lgcy_fail_confirm) ); } -TEST_CASE(ble_sm_test_case_peer_bonding_bad) +TEST_CASE_SELF(ble_sm_test_case_peer_bonding_bad) { ble_sm_test_util_peer_bonding_bad(0x5684, 32); ble_sm_test_util_peer_bonding_bad(54325, 65437); } -TEST_CASE(ble_sm_test_case_peer_sec_req_inval) +TEST_CASE_SELF(ble_sm_test_case_peer_sec_req_inval) { struct ble_sm_pair_fail fail; struct ble_sm_sec_req sec_req; @@ -320,7 +320,7 @@ TEST_CASE(ble_sm_test_case_peer_sec_req_inval) * $us * *****************************************************************************/ -TEST_CASE(ble_sm_test_case_us_fail_inval) +TEST_CASE_SELF(ble_sm_test_case_us_fail_inval) { struct ble_sm_test_params params; @@ -394,17 +394,3 @@ TEST_SUITE(ble_sm_gen_test_suite) ble_sm_test_case_peer_sec_req_inval(); } #endif - -int -ble_sm_test_all(void) -{ -#if !NIMBLE_BLE_SM - return 0; -#else - ble_sm_gen_test_suite(); - ble_sm_lgcy_test_suite(); - ble_sm_sc_test_suite(); - - return tu_any_failed; -#endif -} diff --git a/nimble/host/test/src/ble_store_test.c b/nimble/host/test/src/ble_store_test.c index 5de7581d2..f205e3698 100644 --- a/nimble/host/test/src/ble_store_test.c +++ b/nimble/host/test/src/ble_store_test.c @@ -125,7 +125,7 @@ ble_store_test_util_count(int obj_type) return count; } -TEST_CASE(ble_store_test_peers) +TEST_CASE_SELF(ble_store_test_peers) { struct ble_store_value_sec secs[3] = { { @@ -166,7 +166,7 @@ TEST_CASE(ble_store_test_peers) } } -TEST_CASE(ble_store_test_delete_peer) +TEST_CASE_SELF(ble_store_test_delete_peer) { struct ble_store_value_sec secs[2] = { { @@ -260,7 +260,7 @@ TEST_CASE(ble_store_test_delete_peer) ble_store_test_util_verify_peer_deleted(&secs[1].peer_addr); } -TEST_CASE(ble_store_test_count) +TEST_CASE_SELF(ble_store_test_count) { struct ble_store_value_sec secs[4] = { { @@ -339,13 +339,13 @@ TEST_CASE(ble_store_test_count) TEST_ASSERT(count == 1); } -TEST_CASE(ble_store_test_overflow) +TEST_CASE_SELF(ble_store_test_overflow) { ble_store_test_util_overflow_sec(0); ble_store_test_util_overflow_sec(1); } -TEST_CASE(ble_store_test_clear) +TEST_CASE_SELF(ble_store_test_clear) { const struct ble_store_value_sec secs[2] = { { @@ -425,11 +425,3 @@ TEST_SUITE(ble_store_suite) ble_store_test_overflow(); ble_store_test_clear(); } - -int -ble_store_test_all(void) -{ - ble_store_suite(); - - return tu_any_failed; -} diff --git a/nimble/host/test/src/ble_uuid_test.c b/nimble/host/test/src/ble_uuid_test.c index 5412d6328..9da531d02 100644 --- a/nimble/host/test/src/ble_uuid_test.c +++ b/nimble/host/test/src/ble_uuid_test.c @@ -24,7 +24,7 @@ #include "host/ble_uuid.h" #include "ble_hs_test_util.h" -TEST_CASE(ble_uuid_test) +TEST_CASE_SELF(ble_uuid_test) { uint8_t buf_16[2] = { 0x00, 0x18 }; uint8_t buf_128[16] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, @@ -74,11 +74,3 @@ TEST_SUITE(ble_uuid_test_suite) ble_uuid_test(); } - -int -ble_uuid_test_all(void) -{ - ble_uuid_test_suite(); - - return tu_any_failed; -}