Skip to content

Commit f27f8ed

Browse files
Thalleyjhedberg
authored andcommitted
tests: Bluetooth: BAP: Add test of bt_bap_unicast_group_get_info
Use bt_bap_unicast_group_get_info in the BSIM test to verify that the return values are as expected. Signed-off-by: Emil Gydesen <[email protected]>
1 parent dae29d3 commit f27f8ed

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ static void codec_configure_streams(size_t stream_cnt)
623623
static void qos_configure_streams(struct bt_bap_unicast_group *unicast_group,
624624
size_t stream_cnt)
625625
{
626+
struct bt_bap_unicast_group_info info;
626627
int err;
627628

628629
UNSET_FLAG(flag_stream_qos_configured);
@@ -640,6 +641,23 @@ static void qos_configure_streams(struct bt_bap_unicast_group *unicast_group,
640641
while (atomic_get(&flag_stream_qos_configured) != stream_cnt) {
641642
(void)k_sleep(K_MSEC(1));
642643
}
644+
645+
err = bt_bap_unicast_group_get_info(unicast_group, &info);
646+
if (err != 0) {
647+
FAIL("Unable to QoS configure streams: %d\n", err);
648+
return;
649+
}
650+
651+
if (info.sink_pd != preset_16_2_1.qos.pd) {
652+
FAIL("Unexpected sink PD %u (expected %u)\n", info.sink_pd, preset_16_2_1.qos.pd);
653+
return;
654+
}
655+
656+
if (info.source_pd != preset_16_2_1.qos.pd) {
657+
FAIL("Unexpected source PD %u (expected %u)\n", info.source_pd,
658+
preset_16_2_1.qos.pd);
659+
return;
660+
}
643661
}
644662

645663
static int enable_stream(struct bt_bap_stream *stream)

0 commit comments

Comments
 (0)