From d64293b185324b302a3114b741d7b68282c0ea78 Mon Sep 17 00:00:00 2001 From: Andries Kruithof Date: Wed, 4 Dec 2024 14:16:46 +0100 Subject: [PATCH] Bluetooth: Audio: unittest fails when BT_MAX_CONN = 1 There is a unittest to verify that the distribute broadcast code procedure is not called with the same peer twice. This test requires a minimum of two connections, so we disable this test when only 1 connection can be made Signed-off-by: Andries Kruithof --- .../audio/cap_commander/src/test_distribute_broadcast_code.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/bluetooth/audio/cap_commander/src/test_distribute_broadcast_code.c b/tests/bluetooth/audio/cap_commander/src/test_distribute_broadcast_code.c index 6103e1c8dbd..b9480d73e11 100644 --- a/tests/bluetooth/audio/cap_commander/src/test_distribute_broadcast_code.c +++ b/tests/bluetooth/audio/cap_commander/src/test_distribute_broadcast_code.c @@ -245,6 +245,10 @@ ZTEST_F(cap_commander_test_distribute_broadcast_code, { int err; + if (CONFIG_BT_MAX_CONN == 1) { + ztest_test_skip(); + } + for (size_t i = 0; i < ARRAY_SIZE(fixture->broadcast_code_member_params); i++) { fixture->broadcast_code_member_params[i].member.member = &fixture->conns[0]; }