Skip to content

Commit 9b7aa98

Browse files
committed
tests: Bluetooth: BAP: Add retry with correct broadcast code
Expand test_sink_encrypted_incorrect_code to retry the sync with the correct broadcast code after failing the initial sync with the incorrect broadcast code. Signed-off-by: Emil Gydesen <[email protected]>
1 parent c0be51d commit 9b7aa98

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/bsim/bluetooth/audio/src/bap_broadcast_sink_test.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,6 +1054,18 @@ static void test_sink_encrypted_incorrect_code(void)
10541054
/* Wait for MIC failure */
10551055
WAIT_FOR_FLAG(flag_big_sync_mic_failure);
10561056

1057+
test_broadcast_sync(BROADCAST_CODE);
1058+
1059+
/* Wait for all to be started */
1060+
printk("Waiting for streams to be started\n");
1061+
for (size_t i = 0U; i < ARRAY_SIZE(streams); i++) {
1062+
k_sem_take(&sem_started, K_FOREVER);
1063+
}
1064+
1065+
printk("Waiting for data\n");
1066+
WAIT_FOR_FLAG(flag_audio_received);
1067+
printk("Data received\n");
1068+
10571069
backchannel_sync_send_all(); /* let other devices know we have received data */
10581070
backchannel_sync_send_all(); /* let the broadcast source know it can stop */
10591071

0 commit comments

Comments
 (0)