Bluetooth: controller: llcp: inclusive naming in unittests
There were some references to slave and master left in the unittests for the refactored LLCP. These are changed in respectively peripheral and central Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
This commit is contained in:
parent
34d921b00b
commit
2f98f8f7cf
20 changed files with 272 additions and 272 deletions
|
@ -508,7 +508,7 @@ uint8_t ll_chm_get(uint16_t handle, uint8_t *chm)
|
|||
* for the specified Connection_Handle. The returned value indicates the state of
|
||||
* the Channel_Map specified by the last transmitted or received Channel_Map
|
||||
* (in a CONNECT_IND or LL_CHANNEL_MAP_IND message) for the specified
|
||||
* Connection_Handle, regardless of whether the Master has received an
|
||||
* Connection_Handle, regardless of whether the Central has received an
|
||||
* acknowledgment
|
||||
*/
|
||||
const uint8_t *pending_chm;
|
||||
|
|
|
@ -61,11 +61,11 @@ struct llcp_enc {
|
|||
* * Repurpose memory used by lll.ccm_tx/rx?
|
||||
*/
|
||||
|
||||
/* Master: Rand and EDIV are input copies from
|
||||
/* Central: Rand and EDIV are input copies from
|
||||
* HCI that only live until the LL_ENC_REQ has
|
||||
* been enqueued.
|
||||
*
|
||||
* Slave: Rand and EDIV are input copies from
|
||||
* Peripheral: Rand and EDIV are input copies from
|
||||
* the LL_ENC_REQ that only live until host
|
||||
* notification has been enqueued.
|
||||
*/
|
||||
|
|
|
@ -485,7 +485,7 @@ static void rr_st_idle(struct ll_conn *conn, uint8_t evt, void *param)
|
|||
rr_act_run(conn);
|
||||
rr_set_state(conn, RR_STATE_ACTIVE);
|
||||
} else if (periph && incompat == INCOMPAT_RESOLVABLE) {
|
||||
/* Slave collision
|
||||
/* Peripheral collision
|
||||
* => Run procedure
|
||||
*
|
||||
* Local periph procedure completes with error.
|
||||
|
@ -495,7 +495,7 @@ static void rr_st_idle(struct ll_conn *conn, uint8_t evt, void *param)
|
|||
rr_act_run(conn);
|
||||
rr_set_state(conn, RR_STATE_ACTIVE);
|
||||
} else if (with_instant && central && incompat == INCOMPAT_RESOLVABLE) {
|
||||
/* Master collision
|
||||
/* Central collision
|
||||
* => Send reject
|
||||
*
|
||||
* Local central incompatible procedure continues unaffected.
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_PER_INIT_FEAT_XCHG)
|
||||
#define FEAT_SLAVE_FREQ 0x08
|
||||
#define FEAT_PERIPHERAL_FREQ 0x08
|
||||
#else
|
||||
#define FEAT_SLAVE_FREQ 0x00
|
||||
#define FEAT_PERIPHERAL_FREQ 0x00
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_LE_PING)
|
||||
|
@ -178,15 +178,15 @@
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_MISSING)
|
||||
#define FEAT_ISO_MASTER 0x10000000
|
||||
#define FEAT_ISO_CENTRAL 0x10000000
|
||||
#else
|
||||
#define FEAT_ISO_MASTER 0x00
|
||||
#define FEAT_ISO_CENTRAL 0x00
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MISSING)
|
||||
#define FEAT_ISO_SLAVE 0x20000000
|
||||
#define FEAT_ISO_PERIPHERAL 0x20000000
|
||||
#else
|
||||
#define FEAT_ISO_SLAVE 0x00
|
||||
#define FEAT_ISO_PERIPHERAL 0x00
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MISSING)
|
||||
|
@ -226,14 +226,14 @@
|
|||
#endif
|
||||
|
||||
#define DEFAULT_FEATURE \
|
||||
(FEAT_ENCODED | FEAT_PARAM_REQ | FEAT_EXT_REJ | FEAT_SLAVE_FREQ | FEAT_PING | FEAT_DLE | \
|
||||
FEAT_PRIVACY | FEAT_EXT_SCAN | FEAT_PHY_2M | FEAT_SMI_TX | FEAT_SMI_RX | FEAT_PHY_CODED | \
|
||||
FEAT_EXT_ADV | FEAT_PER_ADV | FEAT_CHAN_SEL_ALGO2 | FEAT_PWR_CLASS1 | FEAT_MIN_CHANN | \
|
||||
FEAT_CONNECTION_CTE_REQ | FEAT_CONNECTION_CTE_RSP | FEAT_ANT_SWITCH_CTE_TX | \
|
||||
FEAT_ANT_SWITCH_CTE_RX | FEAT_RX_CTE | FEAT_PER_ADV_SYNC_TX | FEAT_PER_ADV_SYNC_RX | \
|
||||
FEAT_SLEEP_UPD | FEAT_RPK_VALID | FEAT_ISO_MASTER | FEAT_ISO_SLAVE | FEAT_ISO_BROADCAST | \
|
||||
FEAT_ISO_RECEIVER | FEAT_ISO_CHANNELS | FEAT_LE_PWR_REQ | FEAT_LE_PWR_IND | \
|
||||
FEAT_LE_PATH_LOSS)
|
||||
(FEAT_ENCODED | FEAT_PARAM_REQ | FEAT_EXT_REJ | FEAT_PERIPHERAL_FREQ | FEAT_PING | \
|
||||
FEAT_DLE | FEAT_PRIVACY | FEAT_EXT_SCAN | FEAT_PHY_2M | FEAT_SMI_TX | FEAT_SMI_RX | \
|
||||
FEAT_PHY_CODED | FEAT_EXT_ADV | FEAT_PER_ADV | FEAT_CHAN_SEL_ALGO2 | FEAT_PWR_CLASS1 | \
|
||||
FEAT_MIN_CHANN | FEAT_CONNECTION_CTE_REQ | FEAT_CONNECTION_CTE_RSP | \
|
||||
FEAT_ANT_SWITCH_CTE_TX | FEAT_ANT_SWITCH_CTE_RX | FEAT_RX_CTE | FEAT_PER_ADV_SYNC_TX | \
|
||||
FEAT_PER_ADV_SYNC_RX | FEAT_SLEEP_UPD | FEAT_RPK_VALID | FEAT_ISO_CENTRAL | \
|
||||
FEAT_ISO_PERIPHERAL | FEAT_ISO_BROADCAST | FEAT_ISO_RECEIVER | FEAT_ISO_CHANNELS | \
|
||||
FEAT_LE_PWR_REQ | FEAT_LE_PWR_IND | FEAT_LE_PATH_LOSS)
|
||||
|
||||
/*
|
||||
* The following two are defined as per
|
||||
|
|
|
@ -9,7 +9,7 @@ void helper_pdu_encode_ping_req(struct pdu_data *pdu, void *param);
|
|||
void helper_pdu_encode_ping_rsp(struct pdu_data *pdu, void *param);
|
||||
|
||||
void helper_pdu_encode_feature_req(struct pdu_data *pdu, void *param);
|
||||
void helper_pdu_encode_slave_feature_req(struct pdu_data *pdu, void *param);
|
||||
void helper_pdu_encode_peripheral_feature_req(struct pdu_data *pdu, void *param);
|
||||
void helper_pdu_encode_feature_rsp(struct pdu_data *pdu, void *param);
|
||||
|
||||
void helper_pdu_encode_min_used_chans_ind(struct pdu_data *pdu, void *param);
|
||||
|
@ -57,7 +57,7 @@ void helper_pdu_verify_ping_rsp(const char *file, uint32_t line, struct pdu_data
|
|||
|
||||
void helper_pdu_verify_feature_req(const char *file, uint32_t line, struct pdu_data *pdu,
|
||||
void *param);
|
||||
void helper_pdu_verify_slave_feature_req(const char *file, uint32_t line, struct pdu_data *pdu,
|
||||
void helper_pdu_verify_peripheral_feature_req(const char *file, uint32_t line, struct pdu_data *pdu,
|
||||
void *param);
|
||||
void helper_pdu_verify_feature_rsp(const char *file, uint32_t line, struct pdu_data *pdu,
|
||||
void *param);
|
||||
|
|
|
@ -70,7 +70,7 @@ void helper_pdu_encode_feature_req(struct pdu_data *pdu, void *param)
|
|||
pdu->llctrl.feature_req.features[counter] = expected_value;
|
||||
}
|
||||
}
|
||||
void helper_pdu_encode_slave_feature_req(struct pdu_data *pdu, void *param)
|
||||
void helper_pdu_encode_peripheral_feature_req(struct pdu_data *pdu, void *param)
|
||||
{
|
||||
struct pdu_data_llctrl_feature_req *feature_req = param;
|
||||
|
||||
|
@ -447,7 +447,7 @@ void helper_pdu_verify_feature_req(const char *file, uint32_t line, struct pdu_d
|
|||
}
|
||||
}
|
||||
|
||||
void helper_pdu_verify_slave_feature_req(const char *file, uint32_t line, struct pdu_data *pdu,
|
||||
void helper_pdu_verify_peripheral_feature_req(const char *file, uint32_t line, struct pdu_data *pdu,
|
||||
void *param)
|
||||
{
|
||||
struct pdu_data_llctrl_feature_req *feature_req = param;
|
||||
|
|
|
@ -55,7 +55,7 @@ helper_pdu_encode_func_t *const helper_pdu_encode[] = {
|
|||
[LL_LE_PING_REQ] = helper_pdu_encode_ping_req,
|
||||
[LL_LE_PING_RSP] = helper_pdu_encode_ping_rsp,
|
||||
[LL_FEATURE_REQ] = helper_pdu_encode_feature_req,
|
||||
[LL_PERIPH_FEAT_XCHG] = helper_pdu_encode_slave_feature_req,
|
||||
[LL_PERIPH_FEAT_XCHG] = helper_pdu_encode_peripheral_feature_req,
|
||||
[LL_FEATURE_RSP] = helper_pdu_encode_feature_rsp,
|
||||
[LL_MIN_USED_CHANS_IND] = helper_pdu_encode_min_used_chans_ind,
|
||||
[LL_REJECT_IND] = helper_pdu_encode_reject_ind,
|
||||
|
@ -86,7 +86,7 @@ helper_pdu_verify_func_t *const helper_pdu_verify[] = {
|
|||
[LL_LE_PING_REQ] = helper_pdu_verify_ping_req,
|
||||
[LL_LE_PING_RSP] = helper_pdu_verify_ping_rsp,
|
||||
[LL_FEATURE_REQ] = helper_pdu_verify_feature_req,
|
||||
[LL_PERIPH_FEAT_XCHG] = helper_pdu_verify_slave_feature_req,
|
||||
[LL_PERIPH_FEAT_XCHG] = helper_pdu_verify_peripheral_feature_req,
|
||||
[LL_FEATURE_RSP] = helper_pdu_verify_feature_rsp,
|
||||
[LL_MIN_USED_CHANS_IND] = helper_pdu_verify_min_used_chans_ind,
|
||||
[LL_REJECT_IND] = helper_pdu_verify_reject_ind,
|
||||
|
|
|
@ -50,7 +50,7 @@ static bool is_instant_reached(struct ll_conn *conn, uint16_t instant)
|
|||
return ((event_counter(conn) - instant) & 0xFFFF) <= 0x7FFF;
|
||||
}
|
||||
|
||||
void test_channel_map_update_mas_loc(void)
|
||||
void test_channel_map_update_cen_loc(void)
|
||||
{
|
||||
uint8_t chm[5] = { 0x00, 0x04, 0x05, 0x06, 0x00 };
|
||||
/* TODO should test setup set this to valid value? */
|
||||
|
@ -129,7 +129,7 @@ void test_channel_map_update_mas_loc(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_channel_map_update_sla_rem(void)
|
||||
void test_channel_map_update_per_rem(void)
|
||||
{
|
||||
uint8_t chm[5] = { 0x00, 0x04, 0x05, 0x06, 0x00 };
|
||||
/* TODO should test setup set this to valid value? */
|
||||
|
@ -197,7 +197,7 @@ void test_channel_map_update_sla_rem(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_channel_map_update_sla_loc(void)
|
||||
void test_channel_map_update_per_loc(void)
|
||||
{
|
||||
uint8_t err;
|
||||
uint8_t chm[5] = { 0x00, 0x06, 0x06, 0x06, 0x00 };
|
||||
|
@ -218,11 +218,11 @@ void test_channel_map_update_sla_loc(void)
|
|||
void test_main(void)
|
||||
{
|
||||
ztest_test_suite(chmu,
|
||||
ztest_unit_test_setup_teardown(test_channel_map_update_mas_loc, setup,
|
||||
ztest_unit_test_setup_teardown(test_channel_map_update_cen_loc, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_channel_map_update_sla_rem, setup,
|
||||
ztest_unit_test_setup_teardown(test_channel_map_update_per_rem, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_channel_map_update_sla_loc, setup,
|
||||
ztest_unit_test_setup_teardown(test_channel_map_update_per_loc, setup,
|
||||
unit_test_noop));
|
||||
|
||||
ztest_run_test_suite(chmu);
|
||||
|
|
|
@ -165,8 +165,8 @@ static bool is_instant_reached(struct ll_conn *conn, uint16_t instant)
|
|||
|
||||
#if defined(CONFIG_BT_CTLR_CONN_PARAM_REQ)
|
||||
/*
|
||||
* Master-initiated Connection Parameters Request procedure.
|
||||
* Master requests change in LE connection parameters, slave’s Host accepts.
|
||||
* Central-initiated Connection Parameters Request procedure.
|
||||
* Central requests change in LE connection parameters, peripheral’s Host accepts.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
* | UT | | LL_M | | LT |
|
||||
|
@ -190,7 +190,7 @@ static bool is_instant_reached(struct ll_conn *conn, uint16_t instant)
|
|||
* |<--------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_mas_loc_accept(void)
|
||||
void test_conn_update_cen_loc_accept(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -279,8 +279,8 @@ void test_conn_update_mas_loc_accept(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Master-initiated Connection Parameters Request procedure.
|
||||
* Master requests change in LE connection parameters, slave’s Host rejects.
|
||||
* Central-initiated Connection Parameters Request procedure.
|
||||
* Central requests change in LE connection parameters, peripheral’s Host rejects.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
* | UT | | LL_M | | LT |
|
||||
|
@ -299,7 +299,7 @@ void test_conn_update_mas_loc_accept(void)
|
|||
* |<--------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_mas_loc_reject(void)
|
||||
void test_conn_update_cen_loc_reject(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -349,8 +349,8 @@ void test_conn_update_mas_loc_reject(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Master-initiated Connection Parameters Request procedure.
|
||||
* Master requests change in LE connection parameters, slave’s Host is legacy.
|
||||
* Central-initiated Connection Parameters Request procedure.
|
||||
* Central requests change in LE connection parameters, peripheral’s Host is legacy.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
* | UT | | LL_M | | LT |
|
||||
|
@ -374,7 +374,7 @@ void test_conn_update_mas_loc_reject(void)
|
|||
* |<--------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_mas_loc_remote_legacy(void)
|
||||
void test_conn_update_cen_loc_remote_legacy(void)
|
||||
{
|
||||
bool feature_bit_param_req;
|
||||
uint8_t err;
|
||||
|
@ -472,8 +472,8 @@ void test_conn_update_mas_loc_remote_legacy(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Master-initiated Connection Parameters Request procedure.
|
||||
* Master requests change in LE connection parameters, slave’s Controller do not
|
||||
* Central-initiated Connection Parameters Request procedure.
|
||||
* Central requests change in LE connection parameters, peripheral’s Controller do not
|
||||
* support Connection Parameters Request procedure, features not exchanged.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
|
@ -498,7 +498,7 @@ void test_conn_update_mas_loc_remote_legacy(void)
|
|||
* |<--------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_mas_loc_unsupp_wo_feat_exch(void)
|
||||
void test_conn_update_cen_loc_unsupp_wo_feat_exch(void)
|
||||
{
|
||||
bool feature_bit_param_req;
|
||||
uint8_t err;
|
||||
|
@ -595,8 +595,8 @@ void test_conn_update_mas_loc_unsupp_wo_feat_exch(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Master-initiated Connection Parameters Request procedure.
|
||||
* Master requests change in LE connection parameters, slave’s Controller do not
|
||||
* Central-initiated Connection Parameters Request procedure.
|
||||
* Central requests change in LE connection parameters, peripheral’s Controller do not
|
||||
* support Connection Parameters Request procedure, features exchanged.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
|
@ -615,7 +615,7 @@ void test_conn_update_mas_loc_unsupp_wo_feat_exch(void)
|
|||
* |<--------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_mas_loc_unsupp_w_feat_exch(void)
|
||||
void test_conn_update_cen_loc_unsupp_w_feat_exch(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -695,13 +695,13 @@ void test_conn_update_mas_loc_unsupp_w_feat_exch(void)
|
|||
|
||||
/*
|
||||
* (A)
|
||||
* Master-initiated Connection Parameters Request procedure.
|
||||
* Master requests change in LE connection parameters, slave’s Host accepts.
|
||||
* Central-initiated Connection Parameters Request procedure.
|
||||
* Central requests change in LE connection parameters, peripheral’s Host accepts.
|
||||
*
|
||||
* and
|
||||
*
|
||||
* (B)
|
||||
* Slave-initiated Connection Parameters Request procedure.
|
||||
* Peripheral-initiated Connection Parameters Request procedure.
|
||||
* Procedure collides and is rejected.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
|
@ -736,7 +736,7 @@ void test_conn_update_mas_loc_unsupp_w_feat_exch(void)
|
|||
* |<--------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_mas_loc_collision(void)
|
||||
void test_conn_update_cen_loc_collision(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -859,8 +859,8 @@ void test_conn_update_mas_loc_collision(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Slave-initiated Connection Parameters Request procedure.
|
||||
* Slave requests change in LE connection parameters, master’s Host accepts.
|
||||
* Peripheral-initiated Connection Parameters Request procedure.
|
||||
* Peripheral requests change in LE connection parameters, central’s Host accepts.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
* | UT | | LL_M | | LT |
|
||||
|
@ -887,7 +887,7 @@ void test_conn_update_mas_loc_collision(void)
|
|||
* |<--------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_mas_rem_accept(void)
|
||||
void test_conn_update_cen_rem_accept(void)
|
||||
{
|
||||
struct node_tx *tx;
|
||||
struct node_rx_pdu *ntf;
|
||||
|
@ -979,8 +979,8 @@ void test_conn_update_mas_rem_accept(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Slave-initiated Connection Parameters Request procedure.
|
||||
* Slave requests change in LE connection parameters, master’s Host rejects.
|
||||
* Peripheral-initiated Connection Parameters Request procedure.
|
||||
* Peripheral requests change in LE connection parameters, central’s Host rejects.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
* | UT | | LL_M | | LT |
|
||||
|
@ -1001,7 +1001,7 @@ void test_conn_update_mas_rem_accept(void)
|
|||
* | |-------------------------->|
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_mas_rem_reject(void)
|
||||
void test_conn_update_cen_rem_reject(void)
|
||||
{
|
||||
struct node_tx *tx;
|
||||
struct node_rx_pdu *ntf;
|
||||
|
@ -1055,8 +1055,8 @@ void test_conn_update_mas_rem_reject(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
/* Slave-initiated Connection Parameters Request procedure.
|
||||
* Slave requests change in LE connection parameters, master’s Controller do not
|
||||
/* Peripheral-initiated Connection Parameters Request procedure.
|
||||
* Peripheral requests change in LE connection parameters, central’s Controller do not
|
||||
* support Connection Parameters Request procedure.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
|
@ -1070,7 +1070,7 @@ void test_conn_update_mas_rem_reject(void)
|
|||
* | |-------------------------->|
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_mas_rem_unsupp_feat(void)
|
||||
void test_conn_update_cen_rem_unsupp_feat(void)
|
||||
{
|
||||
/* TODO(thoh): Implement when Remote Request machine has feature
|
||||
* checking
|
||||
|
@ -1079,19 +1079,19 @@ void test_conn_update_mas_rem_unsupp_feat(void)
|
|||
|
||||
/*
|
||||
* (A)
|
||||
* Slave-initiated Connection Parameters Request procedure.
|
||||
* Slave requests change in LE connection parameters, master’s Host accepts.
|
||||
* Peripheral-initiated Connection Parameters Request procedure.
|
||||
* Peripheral requests change in LE connection parameters, central’s Host accepts.
|
||||
*
|
||||
* and
|
||||
*
|
||||
* (B)
|
||||
* Master-initiated Connection Parameters Request procedure.
|
||||
* Master requests change in LE connection parameters, slave’s Host accepts.
|
||||
* Central-initiated Connection Parameters Request procedure.
|
||||
* Central requests change in LE connection parameters, peripheral’s Host accepts.
|
||||
*
|
||||
* NOTE:
|
||||
* Master-initiated Connection Parameters Request procedure is paused.
|
||||
* Slave-initiated Connection Parameters Request procedure is finished.
|
||||
* Master-initiated Connection Parameters Request procedure is resumed.
|
||||
* Central-initiated Connection Parameters Request procedure is paused.
|
||||
* Peripheral-initiated Connection Parameters Request procedure is finished.
|
||||
* Central-initiated Connection Parameters Request procedure is resumed.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
* | UT | | LL_M | | LT |
|
||||
|
@ -1144,7 +1144,7 @@ void test_conn_update_mas_rem_unsupp_feat(void)
|
|||
* |<--------------------------| | (B)
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_mas_rem_collision(void)
|
||||
void test_conn_update_cen_rem_collision(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -1319,8 +1319,8 @@ void test_conn_update_mas_rem_collision(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Slave-initiated Connection Parameters Request procedure.
|
||||
* Slave requests change in LE connection parameters, master’s Host accepts.
|
||||
* Peripheral-initiated Connection Parameters Request procedure.
|
||||
* Peripheral requests change in LE connection parameters, central’s Host accepts.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
* | UT | | LL_S | | LT |
|
||||
|
@ -1341,7 +1341,7 @@ void test_conn_update_mas_rem_collision(void)
|
|||
* |<--------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_sla_loc_accept(void)
|
||||
void test_conn_update_per_loc_accept(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -1421,8 +1421,8 @@ void test_conn_update_sla_loc_accept(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Slave-initiated Connection Parameters Request procedure.
|
||||
* Slave requests change in LE connection parameters, master’s Host rejects.
|
||||
* Peripheral-initiated Connection Parameters Request procedure.
|
||||
* Peripheral requests change in LE connection parameters, central’s Host rejects.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
* | UT | | LL_S | | LT |
|
||||
|
@ -1441,7 +1441,7 @@ void test_conn_update_sla_loc_accept(void)
|
|||
* |<--------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_sla_loc_reject(void)
|
||||
void test_conn_update_per_loc_reject(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -1500,8 +1500,8 @@ void test_conn_update_sla_loc_reject(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Slave-initiated Connection Parameters Request procedure.
|
||||
* Slave requests change in LE connection parameters, master’s Controller do not
|
||||
* Peripheral-initiated Connection Parameters Request procedure.
|
||||
* Peripheral requests change in LE connection parameters, central’s Controller do not
|
||||
* support Connection Parameters Request procedure, features not exchanged.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
|
@ -1521,7 +1521,7 @@ void test_conn_update_sla_loc_reject(void)
|
|||
* |<--------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_sla_loc_unsupp_feat_wo_feat_exch(void)
|
||||
void test_conn_update_per_loc_unsupp_feat_wo_feat_exch(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -1579,8 +1579,8 @@ void test_conn_update_sla_loc_unsupp_feat_wo_feat_exch(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Slave-initiated Connection Parameters Request procedure.
|
||||
* Slave requests change in LE connection parameters, master’s Controller do not
|
||||
* Peripheral-initiated Connection Parameters Request procedure.
|
||||
* Peripheral requests change in LE connection parameters, central’s Controller do not
|
||||
* support Connection Parameters Request procedure, features exchanged.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
|
@ -1593,7 +1593,7 @@ void test_conn_update_sla_loc_unsupp_feat_wo_feat_exch(void)
|
|||
* | |-------------------------->|
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_sla_loc_unsupp_feat_w_feat_exch(void)
|
||||
void test_conn_update_per_loc_unsupp_feat_w_feat_exch(void)
|
||||
{
|
||||
uint8_t err;
|
||||
|
||||
|
@ -1628,14 +1628,14 @@ void test_conn_update_sla_loc_unsupp_feat_w_feat_exch(void)
|
|||
|
||||
/*
|
||||
* (A)
|
||||
* Slave-initiated Connection Parameters Request procedure.
|
||||
* Peripheral-initiated Connection Parameters Request procedure.
|
||||
* Procedure collides and is rejected.
|
||||
*
|
||||
* and
|
||||
*
|
||||
* (B)
|
||||
* Master-initiated Connection Parameters Request procedure.
|
||||
* Master requests change in LE connection parameters, slave’s Host accepts.
|
||||
* Central-initiated Connection Parameters Request procedure.
|
||||
* Central requests change in LE connection parameters, peripheral’s Host accepts.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
* | UT | | LL_S | | LT |
|
||||
|
@ -1678,7 +1678,7 @@ void test_conn_update_sla_loc_unsupp_feat_w_feat_exch(void)
|
|||
* | Complete | |
|
||||
* |<--------------------------| | (B)
|
||||
*/
|
||||
void test_conn_update_sla_loc_collision(void)
|
||||
void test_conn_update_per_loc_collision(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -1805,8 +1805,8 @@ void test_conn_update_sla_loc_collision(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Master-initiated Connection Parameters Request procedure.
|
||||
* Master requests change in LE connection parameters, slave’s Host accepts.
|
||||
* Central-initiated Connection Parameters Request procedure.
|
||||
* Central requests change in LE connection parameters, peripheral’s Host accepts.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
* | UT | | LL_S | | LT |
|
||||
|
@ -1836,7 +1836,7 @@ void test_conn_update_sla_loc_collision(void)
|
|||
* |<--------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_sla_rem_accept(void)
|
||||
void test_conn_update_per_rem_accept(void)
|
||||
{
|
||||
struct node_tx *tx;
|
||||
struct node_rx_pdu *ntf;
|
||||
|
@ -1935,8 +1935,8 @@ void test_conn_update_sla_rem_accept(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Master-initiated Connection Parameters Request procedure.
|
||||
* Master requests change in LE connection parameters, slave’s Host rejects.
|
||||
* Central-initiated Connection Parameters Request procedure.
|
||||
* Central requests change in LE connection parameters, peripheral’s Host rejects.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
* | UT | | LL_S | | LT |
|
||||
|
@ -1957,7 +1957,7 @@ void test_conn_update_sla_rem_accept(void)
|
|||
* | |-------------------------->|
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_sla_rem_reject(void)
|
||||
void test_conn_update_per_rem_reject(void)
|
||||
{
|
||||
struct node_tx *tx;
|
||||
struct node_rx_pdu *ntf;
|
||||
|
@ -2015,8 +2015,8 @@ void test_conn_update_sla_rem_reject(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Master-initiated Connection Parameters Request procedure.
|
||||
* Master requests change in LE connection parameters, slave’s Controller do not
|
||||
* Central-initiated Connection Parameters Request procedure.
|
||||
* Central requests change in LE connection parameters, peripheral’s Controller do not
|
||||
* support Connection Parameters Request procedure.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
|
@ -2030,7 +2030,7 @@ void test_conn_update_sla_rem_reject(void)
|
|||
* | |-------------------------->|
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_sla_rem_unsupp_feat(void)
|
||||
void test_conn_update_per_rem_unsupp_feat(void)
|
||||
{
|
||||
/* TODO(thoh): Implement when Remote Request machine has feature
|
||||
* checking
|
||||
|
@ -2039,19 +2039,19 @@ void test_conn_update_sla_rem_unsupp_feat(void)
|
|||
|
||||
/*
|
||||
* (A)
|
||||
* Master-initiated Connection Parameters Request procedure.
|
||||
* Master requests change in LE connection parameters, slave’s Host accepts.
|
||||
* Central-initiated Connection Parameters Request procedure.
|
||||
* Central requests change in LE connection parameters, peripheral’s Host accepts.
|
||||
*
|
||||
* and
|
||||
*
|
||||
* (B)
|
||||
* Slave-initiated Connection Parameters Request procedure.
|
||||
* Slave requests change in LE connection parameters, master’s Host accepts.
|
||||
* Peripheral-initiated Connection Parameters Request procedure.
|
||||
* Peripheral requests change in LE connection parameters, central’s Host accepts.
|
||||
*
|
||||
* NOTE:
|
||||
* Slave-initiated Connection Parameters Request procedure is paused.
|
||||
* Master-initiated Connection Parameters Request procedure is finished.
|
||||
* Slave-initiated Connection Parameters Request procedure is resumed.
|
||||
* Peripheral-initiated Connection Parameters Request procedure is paused.
|
||||
* Central-initiated Connection Parameters Request procedure is finished.
|
||||
* Peripheral-initiated Connection Parameters Request procedure is resumed.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
* | UT | | LL_S | | LT |
|
||||
|
@ -2104,7 +2104,7 @@ void test_conn_update_sla_rem_unsupp_feat(void)
|
|||
* |<--------------------------| | (B)
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_sla_rem_collision(void)
|
||||
void test_conn_update_per_rem_collision(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -2268,8 +2268,8 @@ void test_conn_update_sla_rem_collision(void)
|
|||
|
||||
/*
|
||||
* Parameter Request Procedure not supported.
|
||||
* Master-initiated Connection Update procedure.
|
||||
* Master requests update of LE connection.
|
||||
* Central-initiated Connection Update procedure.
|
||||
* Central requests update of LE connection.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
* | UT | | LL_M | | LT |
|
||||
|
@ -2291,7 +2291,7 @@ void test_conn_update_sla_rem_collision(void)
|
|||
* | not receive a ntf.) | |
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_mas_loc_accept_no_param_req(void)
|
||||
void test_conn_update_cen_loc_accept_no_param_req(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -2379,8 +2379,8 @@ void test_conn_update_mas_loc_accept_no_param_req(void)
|
|||
|
||||
/*
|
||||
* Parameter Request Procedure not supported.
|
||||
* Slave-initiated Connection Update procedure.
|
||||
* Master receives Connection Update parameters.
|
||||
* Peripheral-initiated Connection Update procedure.
|
||||
* Central receives Connection Update parameters.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
* | UT | | LL_M | | LT |
|
||||
|
@ -2394,7 +2394,7 @@ void test_conn_update_mas_loc_accept_no_param_req(void)
|
|||
* | | |
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_mas_rem_accept_no_param_req(void)
|
||||
void test_conn_update_cen_rem_accept_no_param_req(void)
|
||||
{
|
||||
struct node_tx *tx;
|
||||
|
||||
|
@ -2436,8 +2436,8 @@ void test_conn_update_mas_rem_accept_no_param_req(void)
|
|||
|
||||
/*
|
||||
* Parameter Request Procedure not supported.
|
||||
* Master-initiated Connection Update procedure.
|
||||
* Slave receives Connection Update parameters.
|
||||
* Central-initiated Connection Update procedure.
|
||||
* Peripheral receives Connection Update parameters.
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
* | UT | | LL_S | | LT |
|
||||
|
@ -2457,7 +2457,7 @@ void test_conn_update_mas_rem_accept_no_param_req(void)
|
|||
* | not receive a ntf.) | |
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_sla_rem_accept_no_param_req(void)
|
||||
void test_conn_update_per_rem_accept_no_param_req(void)
|
||||
{
|
||||
struct node_rx_pdu *ntf;
|
||||
uint16_t instant;
|
||||
|
@ -2527,7 +2527,7 @@ void test_conn_update_sla_rem_accept_no_param_req(void)
|
|||
|
||||
/*
|
||||
* Parameter Request Procedure not supported.
|
||||
* Slave-initiated Connection Update procedure (not allowed).
|
||||
* Peripheral-initiated Connection Update procedure (not allowed).
|
||||
*
|
||||
* +-----+ +-------+ +-----+
|
||||
* | UT | | LL_S | | LT |
|
||||
|
@ -2540,7 +2540,7 @@ void test_conn_update_sla_rem_accept_no_param_req(void)
|
|||
* |<--------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_conn_update_sla_loc_disallowed_no_param_req(void)
|
||||
void test_conn_update_per_loc_disallowed_no_param_req(void)
|
||||
{
|
||||
uint8_t err;
|
||||
|
||||
|
@ -2574,81 +2574,81 @@ void test_main(void)
|
|||
{
|
||||
#if defined(CONFIG_BT_CTLR_CONN_PARAM_REQ)
|
||||
ztest_test_suite(
|
||||
mas_loc,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_mas_loc_accept, setup,
|
||||
cen_loc,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_cen_loc_accept, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_conn_update_mas_loc_reject, setup,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_cen_loc_reject, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_conn_update_mas_loc_remote_legacy, setup,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_cen_loc_remote_legacy, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_conn_update_mas_loc_unsupp_wo_feat_exch, setup,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_cen_loc_unsupp_wo_feat_exch, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_conn_update_mas_loc_unsupp_w_feat_exch, setup,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_cen_loc_unsupp_w_feat_exch, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_conn_update_mas_loc_collision, setup,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_cen_loc_collision, setup,
|
||||
unit_test_noop));
|
||||
|
||||
ztest_test_suite(mas_rem,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_mas_rem_accept, setup,
|
||||
ztest_test_suite(cen_rem,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_cen_rem_accept, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_conn_update_mas_rem_reject, setup,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_cen_rem_reject, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_conn_update_mas_rem_unsupp_feat, setup,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_cen_rem_unsupp_feat, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_conn_update_mas_rem_collision, setup,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_cen_rem_collision, setup,
|
||||
unit_test_noop));
|
||||
|
||||
ztest_test_suite(
|
||||
sla_loc,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_sla_loc_accept, setup,
|
||||
per_loc,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_per_loc_accept, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_conn_update_sla_loc_reject, setup,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_per_loc_reject, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_conn_update_sla_loc_unsupp_feat_wo_feat_exch,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_per_loc_unsupp_feat_wo_feat_exch,
|
||||
setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_conn_update_sla_loc_unsupp_feat_w_feat_exch,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_per_loc_unsupp_feat_w_feat_exch,
|
||||
setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_conn_update_sla_loc_collision, setup,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_per_loc_collision, setup,
|
||||
unit_test_noop));
|
||||
|
||||
ztest_test_suite(sla_rem,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_sla_rem_accept, setup,
|
||||
ztest_test_suite(per_rem,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_per_rem_accept, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_conn_update_sla_rem_reject, setup,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_per_rem_reject, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_conn_update_sla_rem_unsupp_feat, setup,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_per_rem_unsupp_feat, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_conn_update_sla_rem_collision, setup,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_per_rem_collision, setup,
|
||||
unit_test_noop));
|
||||
|
||||
ztest_run_test_suite(mas_loc);
|
||||
ztest_run_test_suite(mas_rem);
|
||||
ztest_run_test_suite(sla_loc);
|
||||
ztest_run_test_suite(sla_rem);
|
||||
ztest_run_test_suite(cen_loc);
|
||||
ztest_run_test_suite(cen_rem);
|
||||
ztest_run_test_suite(per_loc);
|
||||
ztest_run_test_suite(per_rem);
|
||||
|
||||
#else /* !CONFIG_BT_CTLR_CONN_PARAM_REQ */
|
||||
|
||||
ztest_test_suite(mas_loc_no_param_req, ztest_unit_test_setup_teardown(
|
||||
test_conn_update_mas_loc_accept_no_param_req,
|
||||
ztest_test_suite(cen_loc_no_param_req, ztest_unit_test_setup_teardown(
|
||||
test_conn_update_cen_loc_accept_no_param_req,
|
||||
setup, unit_test_noop));
|
||||
|
||||
ztest_test_suite(mas_rem_no_param_req, ztest_unit_test_setup_teardown(
|
||||
test_conn_update_mas_rem_accept_no_param_req,
|
||||
ztest_test_suite(cen_rem_no_param_req, ztest_unit_test_setup_teardown(
|
||||
test_conn_update_cen_rem_accept_no_param_req,
|
||||
setup, unit_test_noop));
|
||||
|
||||
ztest_test_suite(
|
||||
sla_loc_no_param_req,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_sla_loc_disallowed_no_param_req,
|
||||
per_loc_no_param_req,
|
||||
ztest_unit_test_setup_teardown(test_conn_update_per_loc_disallowed_no_param_req,
|
||||
setup, unit_test_noop));
|
||||
|
||||
ztest_test_suite(sla_rem_no_param_req, ztest_unit_test_setup_teardown(
|
||||
test_conn_update_sla_rem_accept_no_param_req,
|
||||
ztest_test_suite(per_rem_no_param_req, ztest_unit_test_setup_teardown(
|
||||
test_conn_update_per_rem_accept_no_param_req,
|
||||
setup, unit_test_noop));
|
||||
|
||||
ztest_run_test_suite(mas_loc_no_param_req);
|
||||
ztest_run_test_suite(mas_rem_no_param_req);
|
||||
ztest_run_test_suite(sla_loc_no_param_req);
|
||||
ztest_run_test_suite(sla_rem_no_param_req);
|
||||
ztest_run_test_suite(cen_loc_no_param_req);
|
||||
ztest_run_test_suite(cen_rem_no_param_req);
|
||||
ztest_run_test_suite(per_loc_no_param_req);
|
||||
ztest_run_test_suite(per_rem_no_param_req);
|
||||
|
||||
#endif /* CONFIG_BT_CTLR_CONN_PARAM_REQ */
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ static void setup(void)
|
|||
* | | |
|
||||
*/
|
||||
|
||||
void test_data_length_update_mas_loc(void)
|
||||
void test_data_length_update_cen_loc(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -146,7 +146,7 @@ void test_data_length_update_mas_loc(void)
|
|||
* | |<-----------------------------|
|
||||
* | | |
|
||||
*/
|
||||
void test_data_length_update_mas_loc_no_eff_change(void)
|
||||
void test_data_length_update_cen_loc_no_eff_change(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -218,7 +218,7 @@ void test_data_length_update_mas_loc_no_eff_change(void)
|
|||
* | | |
|
||||
*/
|
||||
|
||||
void test_data_length_update_mas_loc_no_eff_change2(void)
|
||||
void test_data_length_update_cen_loc_no_eff_change2(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -286,7 +286,7 @@ void test_data_length_update_mas_loc_no_eff_change2(void)
|
|||
conn.lll.event_counter);
|
||||
}
|
||||
|
||||
void test_data_length_update_sla_loc(void)
|
||||
void test_data_length_update_per_loc(void)
|
||||
{
|
||||
uint64_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -347,7 +347,7 @@ void test_data_length_update_sla_loc(void)
|
|||
* | | |
|
||||
*/
|
||||
|
||||
void test_data_length_update_mas_rem(void)
|
||||
void test_data_length_update_cen_rem(void)
|
||||
{
|
||||
struct node_tx *tx;
|
||||
|
||||
|
@ -406,7 +406,7 @@ void test_data_length_update_mas_rem(void)
|
|||
* | | |
|
||||
*/
|
||||
|
||||
void test_data_length_update_sla_rem(void)
|
||||
void test_data_length_update_per_rem(void)
|
||||
{
|
||||
struct node_tx *tx;
|
||||
|
||||
|
@ -481,7 +481,7 @@ void test_data_length_update_sla_rem(void)
|
|||
* | | |
|
||||
*/
|
||||
|
||||
void test_data_length_update_sla_rem_and_loc(void)
|
||||
void test_data_length_update_per_rem_and_loc(void)
|
||||
{
|
||||
uint64_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -645,22 +645,22 @@ void test_data_length_update_dle_max_time_get(void)
|
|||
void test_main(void)
|
||||
{
|
||||
ztest_test_suite(
|
||||
data_length_update_master,
|
||||
ztest_unit_test_setup_teardown(test_data_length_update_mas_loc, setup,
|
||||
data_length_update_central,
|
||||
ztest_unit_test_setup_teardown(test_data_length_update_cen_loc, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_data_length_update_mas_loc_no_eff_change, setup,
|
||||
ztest_unit_test_setup_teardown(test_data_length_update_cen_loc_no_eff_change, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_data_length_update_mas_loc_no_eff_change2,
|
||||
ztest_unit_test_setup_teardown(test_data_length_update_cen_loc_no_eff_change2,
|
||||
setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_data_length_update_mas_rem, setup,
|
||||
ztest_unit_test_setup_teardown(test_data_length_update_cen_rem, setup,
|
||||
unit_test_noop));
|
||||
|
||||
ztest_test_suite(data_length_update_slave,
|
||||
ztest_unit_test_setup_teardown(test_data_length_update_sla_loc, setup,
|
||||
ztest_test_suite(data_length_update_peripheral,
|
||||
ztest_unit_test_setup_teardown(test_data_length_update_per_loc, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_data_length_update_sla_rem, setup,
|
||||
ztest_unit_test_setup_teardown(test_data_length_update_per_rem, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_data_length_update_sla_rem_and_loc,
|
||||
ztest_unit_test_setup_teardown(test_data_length_update_per_rem_and_loc,
|
||||
setup, unit_test_noop)
|
||||
);
|
||||
|
||||
|
@ -668,7 +668,7 @@ void test_main(void)
|
|||
ztest_unit_test_setup_teardown(test_data_length_update_dle_max_time_get,
|
||||
setup, unit_test_noop));
|
||||
|
||||
ztest_run_test_suite(data_length_update_master);
|
||||
ztest_run_test_suite(data_length_update_slave);
|
||||
ztest_run_test_suite(data_length_update_central);
|
||||
ztest_run_test_suite(data_length_update_peripheral);
|
||||
ztest_run_test_suite(data_length_update_util);
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@ int lll_csrand_get(void *buf, size_t len)
|
|||
* |<---------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_encryption_start_mas_loc(void)
|
||||
void test_encryption_start_cen_loc(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -329,7 +329,7 @@ void test_encryption_start_mas_loc(void)
|
|||
* |<---------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_encryption_start_mas_loc_limited_memory(void)
|
||||
void test_encryption_start_cen_loc_limited_memory(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -549,7 +549,7 @@ void test_encryption_start_mas_loc_limited_memory(void)
|
|||
* |<---------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_encryption_start_mas_loc_no_ltk(void)
|
||||
void test_encryption_start_cen_loc_no_ltk(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -665,7 +665,7 @@ void test_encryption_start_mas_loc_no_ltk(void)
|
|||
* |<---------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_encryption_start_mas_loc_no_ltk_2(void)
|
||||
void test_encryption_start_cen_loc_no_ltk_2(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -789,7 +789,7 @@ void test_encryption_start_mas_loc_no_ltk_2(void)
|
|||
* | |---------------| | |
|
||||
* | | |
|
||||
*/
|
||||
void test_encryption_start_sla_rem(void)
|
||||
void test_encryption_start_per_rem(void)
|
||||
{
|
||||
struct node_tx *tx;
|
||||
struct node_rx_pdu *ntf;
|
||||
|
@ -1010,7 +1010,7 @@ void test_encryption_start_sla_rem(void)
|
|||
* | |---------------| | |
|
||||
* | | |
|
||||
*/
|
||||
void test_encryption_start_sla_rem_limited_memory(void)
|
||||
void test_encryption_start_per_rem_limited_memory(void)
|
||||
{
|
||||
struct node_tx *tx;
|
||||
struct node_rx_pdu *ntf;
|
||||
|
@ -1294,7 +1294,7 @@ void test_encryption_start_sla_rem_limited_memory(void)
|
|||
* | | LL_REJECT_EXT_IND |
|
||||
* | |-------------------->|
|
||||
*/
|
||||
void test_encryption_start_sla_rem_no_ltk(void)
|
||||
void test_encryption_start_per_rem_no_ltk(void)
|
||||
{
|
||||
struct node_tx *tx;
|
||||
struct node_rx_pdu *ntf;
|
||||
|
@ -1419,7 +1419,7 @@ void test_encryption_start_sla_rem_no_ltk(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_encryption_pause_mas_loc(void)
|
||||
void test_encryption_pause_cen_loc(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -1570,7 +1570,7 @@ void test_encryption_pause_mas_loc(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_encryption_pause_sla_rem(void)
|
||||
void test_encryption_pause_per_rem(void)
|
||||
{
|
||||
struct node_tx *tx;
|
||||
struct node_rx_pdu *ntf;
|
||||
|
@ -1750,25 +1750,25 @@ void test_main(void)
|
|||
{
|
||||
ztest_test_suite(
|
||||
encryption_start,
|
||||
ztest_unit_test_setup_teardown(test_encryption_start_mas_loc, setup,
|
||||
ztest_unit_test_setup_teardown(test_encryption_start_cen_loc, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_encryption_start_mas_loc_limited_memory, setup,
|
||||
ztest_unit_test_setup_teardown(test_encryption_start_cen_loc_limited_memory, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_encryption_start_mas_loc_no_ltk, setup,
|
||||
ztest_unit_test_setup_teardown(test_encryption_start_cen_loc_no_ltk, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_encryption_start_mas_loc_no_ltk_2, setup,
|
||||
ztest_unit_test_setup_teardown(test_encryption_start_cen_loc_no_ltk_2, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_encryption_start_sla_rem, setup,
|
||||
ztest_unit_test_setup_teardown(test_encryption_start_per_rem, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_encryption_start_sla_rem_limited_memory, setup,
|
||||
ztest_unit_test_setup_teardown(test_encryption_start_per_rem_limited_memory, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_encryption_start_sla_rem_no_ltk, setup,
|
||||
ztest_unit_test_setup_teardown(test_encryption_start_per_rem_no_ltk, setup,
|
||||
unit_test_noop));
|
||||
|
||||
ztest_test_suite(encryption_pause,
|
||||
ztest_unit_test_setup_teardown(test_encryption_pause_mas_loc, setup,
|
||||
ztest_unit_test_setup_teardown(test_encryption_pause_cen_loc, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_encryption_pause_sla_rem, setup,
|
||||
ztest_unit_test_setup_teardown(test_encryption_pause_per_rem, setup,
|
||||
unit_test_noop));
|
||||
|
||||
ztest_run_test_suite(encryption_start);
|
||||
|
|
|
@ -72,7 +72,7 @@ static void setup(void)
|
|||
* |<---------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_feature_exchange_mas_loc(void)
|
||||
void test_feature_exchange_cen_loc(void)
|
||||
{
|
||||
uint64_t err;
|
||||
uint64_t set_featureset[] = { DEFAULT_FEATURE, DEFAULT_FEATURE };
|
||||
|
@ -132,7 +132,7 @@ void test_feature_exchange_mas_loc(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_feature_exchange_mas_loc_2(void)
|
||||
void test_feature_exchange_cen_loc_2(void)
|
||||
{
|
||||
uint8_t err;
|
||||
|
||||
|
@ -161,8 +161,8 @@ void test_feature_exchange_mas_loc_2(void)
|
|||
* | |------------------------>|
|
||||
* | | |
|
||||
*/
|
||||
#define MAS_REM_NR_OF_EVENTS 2
|
||||
void test_feature_exchange_mas_rem(void)
|
||||
#define CEN_REM_NR_OF_EVENTS 2
|
||||
void test_feature_exchange_cen_rem(void)
|
||||
{
|
||||
uint64_t set_featureset[] = {
|
||||
DEFAULT_FEATURE,
|
||||
|
@ -207,14 +207,14 @@ void test_feature_exchange_mas_rem(void)
|
|||
|
||||
ull_cp_release_tx(&conn, tx);
|
||||
}
|
||||
zassert_equal(conn.lll.event_counter, MAS_REM_NR_OF_EVENTS * (feat_to_test),
|
||||
zassert_equal(conn.lll.event_counter, CEN_REM_NR_OF_EVENTS * (feat_to_test),
|
||||
"Wrong event-count %d\n", conn.lll.event_counter);
|
||||
zassert_equal(ctx_buffers_free(), CONFIG_BT_CTLR_LLCP_PROC_CTX_BUF_NUM,
|
||||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
#define MAS_REM_2_NR_OF_EVENTS 3
|
||||
void test_feature_exchange_mas_rem_2(void)
|
||||
#define CEN_REM_2_NR_OF_EVENTS 3
|
||||
void test_feature_exchange_cen_rem_2(void)
|
||||
{
|
||||
/*
|
||||
* we could combine some of the following,
|
||||
|
@ -294,13 +294,13 @@ void test_feature_exchange_mas_rem_2(void)
|
|||
ull_cp_release_ntf(ntf);
|
||||
}
|
||||
|
||||
zassert_equal(conn.lll.event_counter, MAS_REM_2_NR_OF_EVENTS * (feat_to_test),
|
||||
zassert_equal(conn.lll.event_counter, CEN_REM_2_NR_OF_EVENTS * (feat_to_test),
|
||||
"Wrong event-count %d\n", conn.lll.event_counter);
|
||||
zassert_equal(ctx_buffers_free(), CONFIG_BT_CTLR_LLCP_PROC_CTX_BUF_NUM,
|
||||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_slave_feature_exchange_sla_loc(void)
|
||||
void test_peripheral_feature_exchange_per_loc(void)
|
||||
{
|
||||
uint64_t err;
|
||||
uint64_t featureset;
|
||||
|
@ -358,7 +358,7 @@ void test_slave_feature_exchange_sla_loc(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_feature_exchange_sla_loc_unknown_rsp(void)
|
||||
void test_feature_exchange_per_loc_unknown_rsp(void)
|
||||
{
|
||||
uint64_t err;
|
||||
uint64_t featureset;
|
||||
|
@ -424,26 +424,26 @@ void test_hci_main(void);
|
|||
|
||||
void test_main(void)
|
||||
{
|
||||
ztest_test_suite(feature_exchange_master,
|
||||
ztest_unit_test_setup_teardown(test_feature_exchange_mas_loc, setup,
|
||||
ztest_test_suite(feature_exchange_central,
|
||||
ztest_unit_test_setup_teardown(test_feature_exchange_cen_loc, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_feature_exchange_mas_loc_2, setup,
|
||||
ztest_unit_test_setup_teardown(test_feature_exchange_cen_loc_2, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_feature_exchange_mas_rem, setup,
|
||||
ztest_unit_test_setup_teardown(test_feature_exchange_cen_rem, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_feature_exchange_mas_rem_2, setup,
|
||||
ztest_unit_test_setup_teardown(test_feature_exchange_cen_rem_2, setup,
|
||||
unit_test_noop));
|
||||
|
||||
ztest_test_suite(feature_exchange_slave,
|
||||
ztest_unit_test_setup_teardown(test_slave_feature_exchange_sla_loc, setup,
|
||||
unit_test_noop));
|
||||
|
||||
ztest_test_suite(feature_exchange_unknown,
|
||||
ztest_unit_test_setup_teardown(test_feature_exchange_sla_loc_unknown_rsp,
|
||||
ztest_test_suite(feature_exchange_peripheral,
|
||||
ztest_unit_test_setup_teardown(test_peripheral_feature_exchange_per_loc,
|
||||
setup, unit_test_noop));
|
||||
|
||||
ztest_run_test_suite(feature_exchange_master);
|
||||
ztest_run_test_suite(feature_exchange_slave);
|
||||
ztest_test_suite(feature_exchange_unknown,
|
||||
ztest_unit_test_setup_teardown(test_feature_exchange_per_loc_unknown_rsp,
|
||||
setup, unit_test_noop));
|
||||
|
||||
ztest_run_test_suite(feature_exchange_central);
|
||||
ztest_run_test_suite(feature_exchange_peripheral);
|
||||
ztest_run_test_suite(feature_exchange_unknown);
|
||||
|
||||
test_hci_main();
|
||||
|
|
|
@ -74,7 +74,7 @@ static void setup(void)
|
|||
* |<---------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_hci_feature_exchange_mas_loc(void)
|
||||
void test_hci_feature_exchange_cen_loc(void)
|
||||
{
|
||||
uint64_t err;
|
||||
uint64_t set_featureset[] = {
|
||||
|
@ -166,13 +166,13 @@ void test_hci_feature_exchange_wrong_handle(void)
|
|||
|
||||
void test_hci_main(void)
|
||||
{
|
||||
ztest_test_suite(hci_feature_exchange_master,
|
||||
ztest_unit_test_setup_teardown(test_hci_feature_exchange_mas_loc, setup,
|
||||
ztest_test_suite(hci_feature_exchange_central,
|
||||
ztest_unit_test_setup_teardown(test_hci_feature_exchange_cen_loc, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_hci_feature_exchange_wrong_handle,
|
||||
setup, unit_test_noop)
|
||||
|
||||
);
|
||||
|
||||
ztest_run_test_suite(hci_feature_exchange_master);
|
||||
ztest_run_test_suite(hci_feature_exchange_central);
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ static void setup(void)
|
|||
* | | |
|
||||
* | | |
|
||||
*/
|
||||
void test_ping_mas_loc(void)
|
||||
void test_ping_cen_loc(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -117,7 +117,7 @@ void test_ping_mas_loc(void)
|
|||
* | | |
|
||||
* | | |
|
||||
*/
|
||||
void test_ping_sla_loc(void)
|
||||
void test_ping_per_loc(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -170,7 +170,7 @@ void test_ping_sla_loc(void)
|
|||
* | |------------------>|
|
||||
* | | |
|
||||
*/
|
||||
void test_ping_mas_rem(void)
|
||||
void test_ping_cen_rem(void)
|
||||
{
|
||||
struct node_tx *tx;
|
||||
|
||||
|
@ -224,7 +224,7 @@ void test_ping_mas_rem(void)
|
|||
* | |------------------>|
|
||||
* | | |
|
||||
*/
|
||||
void test_ping_sla_rem(void)
|
||||
void test_ping_per_rem(void)
|
||||
{
|
||||
struct node_tx *tx;
|
||||
|
||||
|
@ -270,10 +270,10 @@ void test_ping_sla_rem(void)
|
|||
void test_main(void)
|
||||
{
|
||||
ztest_test_suite(ping,
|
||||
ztest_unit_test_setup_teardown(test_ping_mas_loc, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_ping_sla_loc, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_ping_mas_rem, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_ping_sla_rem, setup, unit_test_noop));
|
||||
ztest_unit_test_setup_teardown(test_ping_cen_loc, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_ping_per_loc, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_ping_cen_rem, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_ping_per_rem, setup, unit_test_noop));
|
||||
|
||||
ztest_run_test_suite(ping);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ static void setup(void)
|
|||
* | | |
|
||||
* | | |
|
||||
*/
|
||||
void test_min_used_chans_sla_loc(void)
|
||||
void test_min_used_chans_per_loc(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -104,7 +104,7 @@ void test_min_used_chans_sla_loc(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_min_used_chans_mas_loc(void)
|
||||
void test_min_used_chans_cen_loc(void)
|
||||
{
|
||||
uint8_t err;
|
||||
|
||||
|
@ -122,7 +122,7 @@ void test_min_used_chans_mas_loc(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_min_used_chans_mas_rem(void)
|
||||
void test_min_used_chans_cen_rem(void)
|
||||
{
|
||||
struct pdu_data_llctrl_min_used_chans_ind remote_muc_ind = { .phys = 1,
|
||||
.min_used_chans = 2 };
|
||||
|
@ -170,9 +170,9 @@ void test_main(void)
|
|||
{
|
||||
ztest_test_suite(
|
||||
muc,
|
||||
ztest_unit_test_setup_teardown(test_min_used_chans_sla_loc, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_min_used_chans_mas_loc, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_min_used_chans_mas_rem, setup, unit_test_noop));
|
||||
ztest_unit_test_setup_teardown(test_min_used_chans_per_loc, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_min_used_chans_cen_loc, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_min_used_chans_cen_rem, setup, unit_test_noop));
|
||||
|
||||
ztest_run_test_suite(muc);
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ static bool is_instant_reached(struct ll_conn *conn, uint16_t instant)
|
|||
* +-----+ +-------+ +-----+
|
||||
* | | |
|
||||
*/
|
||||
void test_phy_update_mas_loc(void)
|
||||
void test_phy_update_cen_loc(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -219,7 +219,7 @@ void test_phy_update_mas_loc(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_phy_update_mas_loc_unsupp_feat(void)
|
||||
void test_phy_update_cen_loc_unsupp_feat(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -270,7 +270,7 @@ void test_phy_update_mas_loc_unsupp_feat(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_phy_update_mas_rem(void)
|
||||
void test_phy_update_cen_rem(void)
|
||||
{
|
||||
struct node_tx *tx;
|
||||
struct node_rx_pdu *ntf;
|
||||
|
@ -369,7 +369,7 @@ void test_phy_update_mas_rem(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_phy_update_sla_loc(void)
|
||||
void test_phy_update_per_loc(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -463,7 +463,7 @@ void test_phy_update_sla_loc(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_phy_update_sla_rem(void)
|
||||
void test_phy_update_per_rem(void)
|
||||
{
|
||||
struct node_tx *tx;
|
||||
struct node_rx_pdu *ntf;
|
||||
|
@ -567,7 +567,7 @@ void test_phy_update_sla_rem(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_phy_update_mas_loc_collision(void)
|
||||
void test_phy_update_cen_loc_collision(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -738,14 +738,14 @@ void test_phy_update_mas_loc_collision(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_phy_update_mas_rem_collision(void)
|
||||
void test_phy_update_cen_rem_collision(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
struct node_rx_pdu *ntf;
|
||||
struct pdu_data *pdu;
|
||||
struct pdu_data_llctrl_phy_req req_slave = { .rx_phys = PHY_1M, .tx_phys = PHY_2M };
|
||||
struct pdu_data_llctrl_phy_req req_master = { .rx_phys = PHY_2M, .tx_phys = PHY_2M };
|
||||
struct pdu_data_llctrl_phy_req req_peripheral = { .rx_phys = PHY_1M, .tx_phys = PHY_2M };
|
||||
struct pdu_data_llctrl_phy_req req_central = { .rx_phys = PHY_2M, .tx_phys = PHY_2M };
|
||||
struct pdu_data_llctrl_phy_req rsp = { .rx_phys = PHY_1M | PHY_2M,
|
||||
.tx_phys = PHY_1M | PHY_2M };
|
||||
struct pdu_data_llctrl_phy_upd_ind ind_1 = { .instant = 7,
|
||||
|
@ -778,7 +778,7 @@ void test_phy_update_mas_rem_collision(void)
|
|||
event_prepare(&conn);
|
||||
|
||||
/* Rx */
|
||||
lt_tx(LL_PHY_REQ, &conn, &req_slave);
|
||||
lt_tx(LL_PHY_REQ, &conn, &req_peripheral);
|
||||
|
||||
/* Done */
|
||||
event_done(&conn);
|
||||
|
@ -832,7 +832,7 @@ void test_phy_update_mas_rem_collision(void)
|
|||
event_prepare(&conn);
|
||||
|
||||
/* Tx Queue should have one LL Control PDU */
|
||||
lt_rx(LL_PHY_REQ, &conn, &tx, &req_master);
|
||||
lt_rx(LL_PHY_REQ, &conn, &tx, &req_central);
|
||||
lt_rx_q_is_empty(&conn);
|
||||
|
||||
/* Rx */
|
||||
|
@ -911,13 +911,13 @@ void test_phy_update_mas_rem_collision(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_phy_update_sla_loc_collision(void)
|
||||
void test_phy_update_per_loc_collision(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
struct node_rx_pdu *ntf;
|
||||
struct pdu_data_llctrl_phy_req req_master = { .rx_phys = PHY_1M, .tx_phys = PHY_2M };
|
||||
struct pdu_data_llctrl_phy_req req_slave = { .rx_phys = PHY_2M, .tx_phys = PHY_2M };
|
||||
struct pdu_data_llctrl_phy_req req_central = { .rx_phys = PHY_1M, .tx_phys = PHY_2M };
|
||||
struct pdu_data_llctrl_phy_req req_peripheral = { .rx_phys = PHY_2M, .tx_phys = PHY_2M };
|
||||
struct pdu_data_llctrl_phy_req rsp = { .rx_phys = PHY_2M, .tx_phys = PHY_2M };
|
||||
struct pdu_data_llctrl_phy_upd_ind ind = { .instant = 7,
|
||||
.c_to_p_phy = PHY_2M,
|
||||
|
@ -951,11 +951,11 @@ void test_phy_update_sla_loc_collision(void)
|
|||
event_prepare(&conn);
|
||||
|
||||
/* Tx Queue should have one LL Control PDU */
|
||||
lt_rx(LL_PHY_REQ, &conn, &tx, &req_slave);
|
||||
lt_rx(LL_PHY_REQ, &conn, &tx, &req_peripheral);
|
||||
lt_rx_q_is_empty(&conn);
|
||||
|
||||
/* Rx */
|
||||
lt_tx(LL_PHY_REQ, &conn, &req_master);
|
||||
lt_tx(LL_PHY_REQ, &conn, &req_central);
|
||||
|
||||
/* TX Ack */
|
||||
event_tx_ack(&conn, tx);
|
||||
|
@ -1044,17 +1044,17 @@ void test_main(void)
|
|||
{
|
||||
ztest_test_suite(
|
||||
phy,
|
||||
ztest_unit_test_setup_teardown(test_phy_update_mas_loc, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_phy_update_mas_loc_unsupp_feat, setup,
|
||||
ztest_unit_test_setup_teardown(test_phy_update_cen_loc, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_phy_update_cen_loc_unsupp_feat, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_phy_update_mas_rem, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_phy_update_sla_loc, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_phy_update_sla_rem, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_phy_update_mas_loc_collision, setup,
|
||||
ztest_unit_test_setup_teardown(test_phy_update_cen_rem, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_phy_update_per_loc, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_phy_update_per_rem, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_phy_update_cen_loc_collision, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_phy_update_mas_rem_collision, setup,
|
||||
ztest_unit_test_setup_teardown(test_phy_update_cen_rem_collision, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_phy_update_sla_loc_collision, setup,
|
||||
ztest_unit_test_setup_teardown(test_phy_update_per_loc_collision, setup,
|
||||
unit_test_noop));
|
||||
|
||||
ztest_run_test_suite(phy);
|
||||
|
|
|
@ -73,12 +73,12 @@ static void test_terminate_rem(uint8_t role)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_terminate_mas_rem(void)
|
||||
void test_terminate_cen_rem(void)
|
||||
{
|
||||
test_terminate_rem(BT_HCI_ROLE_CENTRAL);
|
||||
}
|
||||
|
||||
void test_terminate_sla_rem(void)
|
||||
void test_terminate_per_rem(void)
|
||||
{
|
||||
test_terminate_rem(BT_HCI_ROLE_PERIPHERAL);
|
||||
}
|
||||
|
@ -125,12 +125,12 @@ void test_terminate_loc(uint8_t role)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_terminate_mas_loc(void)
|
||||
void test_terminate_cen_loc(void)
|
||||
{
|
||||
test_terminate_loc(BT_HCI_ROLE_CENTRAL);
|
||||
}
|
||||
|
||||
void test_terminate_sla_loc(void)
|
||||
void test_terminate_per_loc(void)
|
||||
{
|
||||
test_terminate_loc(BT_HCI_ROLE_PERIPHERAL);
|
||||
}
|
||||
|
@ -139,10 +139,10 @@ void test_main(void)
|
|||
{
|
||||
ztest_test_suite(
|
||||
term,
|
||||
ztest_unit_test_setup_teardown(test_terminate_mas_rem, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_terminate_sla_rem, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_terminate_mas_loc, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_terminate_sla_loc, setup, unit_test_noop));
|
||||
ztest_unit_test_setup_teardown(test_terminate_cen_rem, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_terminate_per_rem, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_terminate_cen_loc, setup, unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_terminate_per_loc, setup, unit_test_noop));
|
||||
|
||||
ztest_run_test_suite(term);
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ static void setup(void)
|
|||
* |<---------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_version_exchange_mas_loc(void)
|
||||
void test_version_exchange_cen_loc(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -111,7 +111,7 @@ void test_version_exchange_mas_loc(void)
|
|||
"Free CTX buffers %d", ctx_buffers_free());
|
||||
}
|
||||
|
||||
void test_version_exchange_mas_loc_2(void)
|
||||
void test_version_exchange_cen_loc_2(void)
|
||||
{
|
||||
uint8_t err;
|
||||
|
||||
|
@ -142,7 +142,7 @@ void test_version_exchange_mas_loc_2(void)
|
|||
* | |------------------>|
|
||||
* | | |
|
||||
*/
|
||||
void test_version_exchange_mas_rem(void)
|
||||
void test_version_exchange_cen_rem(void)
|
||||
{
|
||||
struct node_tx *tx;
|
||||
|
||||
|
@ -209,7 +209,7 @@ void test_version_exchange_mas_rem(void)
|
|||
* |<---------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_version_exchange_mas_rem_2(void)
|
||||
void test_version_exchange_cen_rem_2(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -284,7 +284,7 @@ void test_version_exchange_mas_rem_2(void)
|
|||
* |<---------------------------| |
|
||||
* | | |
|
||||
*/
|
||||
void test_version_exchange_mas_loc_twice(void)
|
||||
void test_version_exchange_cen_loc_twice(void)
|
||||
{
|
||||
uint8_t err;
|
||||
struct node_tx *tx;
|
||||
|
@ -356,15 +356,15 @@ void test_version_exchange_mas_loc_twice(void)
|
|||
void test_main(void)
|
||||
{
|
||||
ztest_test_suite(version_exchange,
|
||||
ztest_unit_test_setup_teardown(test_version_exchange_mas_loc, setup,
|
||||
ztest_unit_test_setup_teardown(test_version_exchange_cen_loc, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_version_exchange_mas_loc_2, setup,
|
||||
ztest_unit_test_setup_teardown(test_version_exchange_cen_loc_2, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_version_exchange_mas_rem, setup,
|
||||
ztest_unit_test_setup_teardown(test_version_exchange_cen_rem, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_version_exchange_mas_rem_2, setup,
|
||||
ztest_unit_test_setup_teardown(test_version_exchange_cen_rem_2, setup,
|
||||
unit_test_noop),
|
||||
ztest_unit_test_setup_teardown(test_version_exchange_mas_loc_twice, setup,
|
||||
ztest_unit_test_setup_teardown(test_version_exchange_cen_loc_twice, setup,
|
||||
unit_test_noop));
|
||||
|
||||
ztest_run_test_suite(version_exchange);
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
int lll_master_init(void);
|
||||
int lll_master_reset(void);
|
||||
void lll_master_prepare(void *param);
|
||||
int lll_central_init(void);
|
||||
int lll_central_reset(void);
|
||||
void lll_central_prepare(void *param);
|
Loading…
Add table
Add a link
Reference in a new issue