This patch adds BAP unit tests for Broadcast Sink Streaming with one
BIS (4.14.2 Broadcast Audio Stream with One BIS - Sink - page 189).
Iulia Tanasescu (1):
test-bap: Add Broadcast Sink STR one BIS tests
unit/test-bap.c | 209 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 209 insertions(+)
base-commit: 62d38d6c9ef4017ff6a84af0a9cd9242a7f6a211
--
2.39.2
4.14.2 Broadcast Audio Stream with One BIS - Sink (page 189):
Test Purpose:
Verify that a Broadcast Sink IUT can stream one BIS from a
Broadcast Source. Verification is performed for each set of
codec specific capabilities in turn.
Test Case Configuration:
BAP/BSNK/STR/BV-01-C [BSNK, LC3 8_1]
BAP/BSNK/STR/BV-02-C [BSNK, LC3 8_2]
BAP/BSNK/STR/BV-03-C [BSNK, LC3 16_1]
BAP/BSNK/STR/BV-04-C [BSNK, LC3 16_2]
BAP/BSNK/STR/BV-05-C [BSNK, LC3 24_1]
BAP/BSNK/STR/BV-06-C [BSNK, LC3 24_2]
BAP/BSNK/STR/BV-07-C [BSNK, LC3 32_1]
BAP/BSNK/STR/BV-08-C [BSNK, LC3 32_2]
BAP/BSNK/STR/BV-09-C [BSNK, LC3 44.1_1]
BAP/BSNK/STR/BV-10-C [BSNK, LC3 44.1_2]
BAP/BSNK/STR/BV-11-C [BSNK, LC3 48_1]
BAP/BSNK/STR/BV-12-C [BSNK, LC3 48_2]
BAP/BSNK/STR/BV-13-C [BSNK, LC3 48_3]
BAP/BSNK/STR/BV-14-C [BSNK, LC3 48_4]
BAP/BSNK/STR/BV-15-C [BSNK, LC3 48_5]
BAP/BSNK/STR/BV-16-C [BSNK, LC3 48_6]
BAP/BSNK/STR/BV-17-C [BSNK, VS]
Pass verdict:
The IUT synchronizes to the Lower Tester (the Link Layer
receives a BIS Data PDU). The host on the IUT receives an
LE BIG Sync Established event.
If the Codec ID is LC3, the IUT receives BIS Data PDUs on
the broadcast Audio Stream containing encoded LC3 audio data
formatted using the LC3 Media Packet format.
If the Codec ID is a vendor-specific Codec ID, the IUT
receives BIS Data PDUs on the broadcast Audio Stream.
The parameters included in the Codec_Specific_Configuration
data are as defined in TSPX_VS_Codec_Specific_Configuration.
If the Codec ID is LC3, each parameter included in
Codec_Specific_Configuration data is formatted in an LTV
structure with the length, type, and value specified in
Table 4.81.
Test Summary
------------
BAP/BSNK/STR/BV-01-C [BSNK, LC3 8_1] Passed
BAP/BSNK/STR/BV-02-C [BSNK, LC3 8_2] Passed
BAP/BSNK/STR/BV-03-C [BSNK, LC3 16_1] Passed
BAP/BSNK/STR/BV-04-C [BSNK, LC3 16_2] Passed
BAP/BSNK/STR/BV-05-C [BSNK, LC3 24_1] Passed
BAP/BSNK/STR/BV-06-C [BSNK, LC3 24_2] Passed
BAP/BSNK/STR/BV-07-C [BSNK, LC3 32_1] Passed
BAP/BSNK/STR/BV-08-C [BSNK, LC3 32_2] Passed
BAP/BSNK/STR/BV-09-C [BSNK, LC3 44.1_1] Passed
BAP/BSNK/STR/BV-10-C [BSNK, LC3 44.1_2] Passed
BAP/BSNK/STR/BV-11-C [BSNK, LC3 48_1] Passed
BAP/BSNK/STR/BV-12-C [BSNK, LC3 48_2] Passed
BAP/BSNK/STR/BV-13-C [BSNK, LC3 48_3] Passed
BAP/BSNK/STR/BV-14-C [BSNK, LC3 48_4] Passed
BAP/BSNK/STR/BV-15-C [BSNK, LC3 48_5] Passed
BAP/BSNK/STR/BV-16-C [BSNK, LC3 48_6] Passed
BAP/BSNK/STR/BV-17-C [BSNK, VS] Passed
---
unit/test-bap.c | 209 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 209 insertions(+)
diff --git a/unit/test-bap.c b/unit/test-bap.c
index 46ee0e4e5..20609694e 100644
--- a/unit/test-bap.c
+++ b/unit/test-bap.c
@@ -6343,6 +6343,214 @@ static void test_bsnk_scc(void)
NULL, test_bcast, &cfg_bsnk_vs, IOV_NULL);
}
+static void bsnk_state_str(struct bt_bap_stream *stream, uint8_t old_state,
+ uint8_t new_state, void *user_data)
+{
+ struct test_data *data = user_data;
+ struct iovec *cc;
+
+ switch (new_state) {
+ case BT_BAP_STREAM_STATE_CONFIG:
+ if (old_state == BT_BAP_STREAM_STATE_IDLE) {
+ /* Check that stream has been configured as expected */
+ cc = bt_bap_stream_get_config(stream);
+
+ g_assert(cc);
+ g_assert(cc->iov_len == data->cfg->cc.iov_len);
+ g_assert(memcmp(cc->iov_base, data->cfg->cc.iov_base,
+ cc->iov_len) == 0);
+
+ /* Enable stream */
+ bt_bap_stream_enable(stream, true, NULL, NULL, NULL);
+ } else if (old_state == BT_BAP_STREAM_STATE_CONFIG) {
+ /* Start stream */
+ bt_bap_stream_start(stream, NULL, NULL);
+ } else {
+ /* Other state transitions are invalid */
+ tester_test_failed();
+ }
+
+ break;
+ case BT_BAP_STREAM_STATE_STREAMING:
+ tester_test_passed();
+ break;
+ }
+}
+
+static struct test_config cfg_bsnk_str_8_1 = {
+ .cc = LC3_CONFIG_8_1,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state_str,
+};
+
+static struct test_config cfg_bsnk_str_8_2 = {
+ .cc = LC3_CONFIG_8_2,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state_str,
+};
+
+static struct test_config cfg_bsnk_str_16_1 = {
+ .cc = LC3_CONFIG_16_1,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state_str,
+};
+
+static struct test_config cfg_bsnk_str_16_2 = {
+ .cc = LC3_CONFIG_16_2,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state_str,
+};
+
+static struct test_config cfg_bsnk_str_24_1 = {
+ .cc = LC3_CONFIG_24_1,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state_str,
+};
+
+static struct test_config cfg_bsnk_str_24_2 = {
+ .cc = LC3_CONFIG_24_2,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state_str,
+};
+
+static struct test_config cfg_bsnk_str_32_1 = {
+ .cc = LC3_CONFIG_32_1,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state_str,
+};
+
+static struct test_config cfg_bsnk_str_32_2 = {
+ .cc = LC3_CONFIG_32_2,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state_str,
+};
+
+static struct test_config cfg_bsnk_str_44_1 = {
+ .cc = LC3_CONFIG_44_1,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state_str,
+};
+
+static struct test_config cfg_bsnk_str_44_2 = {
+ .cc = LC3_CONFIG_44_2,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state_str,
+};
+
+static struct test_config cfg_bsnk_str_48_1 = {
+ .cc = LC3_CONFIG_48_1,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state_str,
+};
+
+static struct test_config cfg_bsnk_str_48_2 = {
+ .cc = LC3_CONFIG_48_2,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state_str,
+};
+
+static struct test_config cfg_bsnk_str_48_3 = {
+ .cc = LC3_CONFIG_48_3,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state_str,
+};
+
+static struct test_config cfg_bsnk_str_48_4 = {
+ .cc = LC3_CONFIG_48_4,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state_str,
+};
+
+static struct test_config cfg_bsnk_str_48_5 = {
+ .cc = LC3_CONFIG_48_5,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state_str,
+};
+
+static struct test_config cfg_bsnk_str_48_6 = {
+ .cc = LC3_CONFIG_48_6,
+ .qos = QOS_BCAST,
+ .snk = true,
+ .state_func = bsnk_state_str,
+};
+
+static struct test_config cfg_bsnk_str_vs = {
+ .cc = UTIL_IOV_INIT(VS_CC),
+ .qos = QOS_BCAST,
+ .snk = true,
+ .vs = true,
+ .state_func = bsnk_state_str,
+};
+
+static void test_bsnk_str(void)
+{
+ define_test("BAP/BSNK/STR/BV-01-C [BSNK, LC3 8_1]",
+ NULL, test_bcast, &cfg_bsnk_str_8_1, IOV_NULL);
+
+ define_test("BAP/BSNK/STR/BV-02-C [BSNK, LC3 8_2]",
+ NULL, test_bcast, &cfg_bsnk_str_8_2, IOV_NULL);
+
+ define_test("BAP/BSNK/STR/BV-03-C [BSNK, LC3 16_1]",
+ NULL, test_bcast, &cfg_bsnk_str_16_1, IOV_NULL);
+
+ define_test("BAP/BSNK/STR/BV-04-C [BSNK, LC3 16_2]",
+ NULL, test_bcast, &cfg_bsnk_str_16_2, IOV_NULL);
+
+ define_test("BAP/BSNK/STR/BV-05-C [BSNK, LC3 24_1]",
+ NULL, test_bcast, &cfg_bsnk_str_24_1, IOV_NULL);
+
+ define_test("BAP/BSNK/STR/BV-06-C [BSNK, LC3 24_2]",
+ NULL, test_bcast, &cfg_bsnk_str_24_2, IOV_NULL);
+
+ define_test("BAP/BSNK/STR/BV-07-C [BSNK, LC3 32_1]",
+ NULL, test_bcast, &cfg_bsnk_str_32_1, IOV_NULL);
+
+ define_test("BAP/BSNK/STR/BV-08-C [BSNK, LC3 32_2]",
+ NULL, test_bcast, &cfg_bsnk_str_32_2, IOV_NULL);
+
+ define_test("BAP/BSNK/STR/BV-09-C [BSNK, LC3 44.1_1]",
+ NULL, test_bcast, &cfg_bsnk_str_44_1, IOV_NULL);
+
+ define_test("BAP/BSNK/STR/BV-10-C [BSNK, LC3 44.1_2]",
+ NULL, test_bcast, &cfg_bsnk_str_44_2, IOV_NULL);
+
+ define_test("BAP/BSNK/STR/BV-11-C [BSNK, LC3 48_1]",
+ NULL, test_bcast, &cfg_bsnk_str_48_1, IOV_NULL);
+
+ define_test("BAP/BSNK/STR/BV-12-C [BSNK, LC3 48_2]",
+ NULL, test_bcast, &cfg_bsnk_str_48_2, IOV_NULL);
+
+ define_test("BAP/BSNK/STR/BV-13-C [BSNK, LC3 48_3]",
+ NULL, test_bcast, &cfg_bsnk_str_48_3, IOV_NULL);
+
+ define_test("BAP/BSNK/STR/BV-14-C [BSNK, LC3 48_4]",
+ NULL, test_bcast, &cfg_bsnk_str_48_4, IOV_NULL);
+
+ define_test("BAP/BSNK/STR/BV-15-C [BSNK, LC3 48_5]",
+ NULL, test_bcast, &cfg_bsnk_str_48_5, IOV_NULL);
+
+ define_test("BAP/BSNK/STR/BV-16-C [BSNK, LC3 48_6]",
+ NULL, test_bcast, &cfg_bsnk_str_48_6, IOV_NULL);
+
+ define_test("BAP/BSNK/STR/BV-17-C [BSNK, VS]",
+ NULL, test_bcast, &cfg_bsnk_str_vs, IOV_NULL);
+}
+
int main(int argc, char *argv[])
{
tester_init(&argc, &argv);
@@ -6351,6 +6559,7 @@ int main(int argc, char *argv[])
test_scc();
test_bsrc_scc();
test_bsnk_scc();
+ test_bsnk_str();
return tester_run();
}
--
2.39.2
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=854371
---Test result---
Test Summary:
CheckPatch PASS 0.59 seconds
GitLint PASS 0.34 seconds
BuildEll PASS 24.47 seconds
BluezMake PASS 1748.69 seconds
MakeCheck PASS 13.21 seconds
MakeDistcheck PASS 180.58 seconds
CheckValgrind PASS 254.29 seconds
CheckSmatch PASS 352.87 seconds
bluezmakeextell PASS 120.27 seconds
IncrementalBuild PASS 1602.87 seconds
ScanBuild PASS 1062.29 seconds
---
Regards,
Linux Bluetooth
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <[email protected]>:
On Mon, 20 May 2024 13:20:13 +0300 you wrote:
> This patch adds BAP unit tests for Broadcast Sink Streaming with one
> BIS (4.14.2 Broadcast Audio Stream with One BIS - Sink - page 189).
>
> Iulia Tanasescu (1):
> test-bap: Add Broadcast Sink STR one BIS tests
>
> unit/test-bap.c | 209 ++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 209 insertions(+)
>
> [...]
Here is the summary with links:
- [BlueZ,1/1] test-bap: Add Broadcast Sink STR one BIS tests
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=a2438e46f812
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html