Skip to content

Commit c5fc9a2

Browse files
Thalleykartben
authored andcommitted
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 <emil.gydesen@nordicsemi.no>
1 parent 64442ae commit c5fc9a2

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
@@ -1082,6 +1082,18 @@ static void test_sink_encrypted_incorrect_code(void)
10821082
/* Wait for MIC failure */
10831083
WAIT_FOR_FLAG(flag_big_sync_mic_failure);
10841084

1085+
test_broadcast_sync(BROADCAST_CODE);
1086+
1087+
/* Wait for all to be started */
1088+
printk("Waiting for streams to be started\n");
1089+
for (size_t i = 0U; i < ARRAY_SIZE(streams); i++) {
1090+
k_sem_take(&sem_started, K_FOREVER);
1091+
}
1092+
1093+
printk("Waiting for data\n");
1094+
WAIT_FOR_FLAG(flag_audio_received);
1095+
printk("Data received\n");
1096+
10851097
backchannel_sync_send_all(); /* let other devices know we have received data */
10861098
backchannel_sync_send_all(); /* let the broadcast source know it can stop */
10871099

0 commit comments

Comments
 (0)