Skip to content

Commit 1eb751b

Browse files
committed
tests: Bluetooth: llcp: cte_req: remove invalid rsp test
There is a test that verifies a behavior of CTE request control procedure if receives LL_UNKNOWN_RSP. The expected behavior is to terminate connection if that is response handling is not implemented by a command. Other unexpected responses are treated as new remote control procedures. The CTE request has implemented handling of LL_UNKNOWN_RSP, hence this particular test is no longer valid. There is still open question how to handle other unexpected reposne PDUs while waiting for LL_CTE_RSP. That is not defined by BT 5.3. Core specification and not decided by community. The test is removed to because it fails and blocks CI. Signed-off-by: Piotr Pryga <[email protected]>
1 parent f4ab463 commit 1eb751b

File tree

1 file changed

+0
-108
lines changed
  • tests/bluetooth/controller/ctrl_cte_req/src

1 file changed

+0
-108
lines changed

tests/bluetooth/controller/ctrl_cte_req/src/main.c

Lines changed: 0 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -123,112 +123,6 @@ void test_cte_req_central_local(void)
123123
"Free CTX buffers %d", ctx_buffers_free());
124124
}
125125

126-
/* Tests of invalid rsp execution of CTE Request Procedure */
127-
128-
/* +-----+ +-------+ +-----+
129-
* | UT | | LL_A | | LT |
130-
* +-----+ +-------+ +-----+
131-
* | | |
132-
* | Start initiation | |
133-
* | CTE Request Proc. | |
134-
* |--------------------------->| |
135-
* | | |
136-
* | | LL_LE_CTE_REQ |
137-
* | |------------------>|
138-
* | | |
139-
* | | LL_<INVALID>_RSP |
140-
* | |<------------------|
141-
* | | |
142-
* ~~~~~~~~~~~~~~~~~ TERMINATE CONNECTION ~~~~~~~~~~~~~~
143-
* | | |
144-
* | | |
145-
* | | |
146-
*/
147-
void test_cte_req_central_local_invalid_rsp(void)
148-
{
149-
uint8_t err;
150-
struct node_tx *tx;
151-
struct pdu_data_llctrl_unknown_rsp unknown_rsp = {
152-
.type = PDU_DATA_LLCTRL_TYPE_CTE_REQ
153-
};
154-
struct pdu_data_llctrl_reject_ind reject_ind = {
155-
.error_code = BT_HCI_ERR_LL_PROC_COLLISION
156-
};
157-
struct pdu_data_llctrl_cte_req local_cte_req = {
158-
.cte_type_req = BT_HCI_LE_AOA_CTE,
159-
.min_cte_len_req = BT_HCI_LE_CTE_LEN_MIN,
160-
};
161-
162-
/* Role */
163-
test_set_role(&conn, BT_HCI_ROLE_PERIPHERAL);
164-
165-
/* Connect */
166-
ull_cp_state_set(&conn, ULL_CP_CONNECTED);
167-
168-
/* Initiate an CTE Request Procedure */
169-
err = ull_cp_cte_req(&conn, local_cte_req.min_cte_len_req, local_cte_req.cte_type_req);
170-
zassert_equal(err, BT_HCI_ERR_SUCCESS, NULL);
171-
172-
/* Prepare */
173-
event_prepare(&conn);
174-
175-
/* Tx Queue should have one LL Control PDU */
176-
lt_rx(LL_CTE_REQ, &conn, &tx, &local_cte_req);
177-
lt_rx_q_is_empty(&conn);
178-
179-
/* Rx */
180-
lt_tx(LL_UNKNOWN_RSP, &conn, &unknown_rsp);
181-
182-
/* Done */
183-
event_done(&conn);
184-
185-
/* There should not be a host notifications */
186-
ut_rx_q_is_empty();
187-
188-
/* Release tx node */
189-
ull_cp_release_tx(&conn, tx);
190-
191-
/* Termination 'triggered' */
192-
zassert_equal(conn.llcp_terminate.reason_final, BT_HCI_ERR_LMP_PDU_NOT_ALLOWED,
193-
"Terminate reason %d", conn.llcp_terminate.reason_final);
194-
195-
/* Clear termination flag for subsequent test cycle */
196-
conn.llcp_terminate.reason_final = 0;
197-
198-
zassert_equal(ctx_buffers_free(), test_ctx_buffers_cnt(),
199-
"Free CTX buffers %d", ctx_buffers_free());
200-
201-
/* Initiate another CTE Request Procedure */
202-
err = ull_cp_cte_req(&conn, local_cte_req.min_cte_len_req, local_cte_req.cte_type_req);
203-
zassert_equal(err, BT_HCI_ERR_SUCCESS, NULL);
204-
205-
/* Prepare */
206-
event_prepare(&conn);
207-
208-
/* Tx Queue should have one LL Control PDU */
209-
lt_rx(LL_CTE_REQ, &conn, &tx, &local_cte_req);
210-
lt_rx_q_is_empty(&conn);
211-
212-
/* Rx */
213-
lt_tx(LL_REJECT_IND, &conn, &reject_ind);
214-
215-
/* Done */
216-
event_done(&conn);
217-
218-
/* There should not be a host notifications */
219-
ut_rx_q_is_empty();
220-
221-
/* Release tx node */
222-
ull_cp_release_tx(&conn, tx);
223-
224-
/* Termination 'triggered' */
225-
zassert_equal(conn.llcp_terminate.reason_final, BT_HCI_ERR_LMP_PDU_NOT_ALLOWED,
226-
"Terminate reason %d", conn.llcp_terminate.reason_final);
227-
228-
zassert_equal(ctx_buffers_free(), test_ctx_buffers_cnt(),
229-
"Free CTX buffers %d", ctx_buffers_free());
230-
}
231-
232126
/* +-----+ +-------+ +-----+
233127
* | UT | | LL_A | | LT |
234128
* +-----+ +-------+ +-----+
@@ -1599,8 +1493,6 @@ void test_main(void)
15991493
ztest_test_suite(
16001494
cte_req,
16011495
ztest_unit_test_setup_teardown(test_cte_req_central_local, setup, unit_test_noop),
1602-
ztest_unit_test_setup_teardown(test_cte_req_central_local_invalid_rsp, setup,
1603-
unit_test_noop),
16041496
ztest_unit_test_setup_teardown(test_cte_req_peripheral_local, setup,
16051497
unit_test_noop),
16061498
ztest_unit_test_setup_teardown(test_cte_req_central_remote, setup, unit_test_noop),

0 commit comments

Comments
 (0)