Skip to content

Commit

Permalink
tests: Bluetooth: llpc: Add at-instant conn evt proc in collision UT
Browse files Browse the repository at this point in the history
Unit tests reposnsible for verification of collisions mitigation
didn't have handling for delayed completion of PHY Update control
procedure. The PHY Update is completed on event generated when
"at-instant" connection event is on air.

Signed-off-by: Piotr Pryga <[email protected]>
  • Loading branch information
ppryga-nordic authored and carlescufi committed Jul 25, 2022
1 parent 64d6760 commit 01a8d2b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/bluetooth/controller/ctrl_collision/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ void test_phy_update_central_rem_collision(void)
struct pdu_data_llctrl_phy_upd_ind ind_1 = { .instant = 7,
.c_to_p_phy = 0,
.p_to_c_phy = PHY_2M };
struct pdu_data_llctrl_phy_upd_ind ind_2 = { .instant = 14,
struct pdu_data_llctrl_phy_upd_ind ind_2 = { .instant = 15,
.c_to_p_phy = PHY_2M,
.p_to_c_phy = 0 };
uint16_t instant;
Expand Down Expand Up @@ -400,6 +400,15 @@ void test_phy_update_central_rem_collision(void)
/* Prepare */
event_prepare(&conn);

/* Tx Queue should NOT have a LL Control PDU */
lt_rx_q_is_empty(&conn);

/* Done */
event_done(&conn);

/* Prepare */
event_prepare(&conn);

/* Tx Queue should have one LL Control PDU */
lt_rx(LL_PHY_REQ, &conn, &tx, &req_central);
lt_rx_q_is_empty(&conn);
Expand Down

0 comments on commit 01a8d2b

Please sign in to comment.