Add functional tests for A2DP and BAP
Status from this message: This series was applied to bluetooth/bluez.git (master)
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | build: add doc/test-functional.rst to EXTRA_DISTMakefile.am | +1 | 1 reply | |
| 2/12 | doc: describe the functional test casesMakefile.am doc/ doc/ +1 more | +495 | 0 replies | |
| 3/12 | client: do not prompt for LE Audio settings on A2DP endpointsclient/ | +13 | 0 replies | |
| 4/12 | client: add A2DP endpoint registration scriptsclient/ client/ | +43 | 0 replies | |
| 5/12 | test: functional: add A2DP testsMakefile.am doc/ doc/ +1 more | +245 | 0 replies | |
| 6/12 | client: rename media endpoint scripts to include the codecclient/ client/ doc/ +1 more | +5 | 0 replies | |
| 7/12 | client: add BAP endpoint registration scriptsclient/ client/ | +66 | 0 replies | |
| 8/12 | doc: bluetoothctl: document init script option and scriptsdoc/ | +105 | 0 replies | |
| 9/12 | test: functional: add BAP unicast testsMakefile.am doc/ doc/ +1 more | +280 | 0 replies | |
| 10/12 | test: functional: add BAP broadcast testsdoc/ test/ | +172 | 0 replies | |
| 11/12 | test: functional: add BAP broadcast assistant testdoc/ test/ | +192 | 0 replies | |
| 12/12 | bap: reuse the PA sync established to discover a Broadcast Sourceprofiles/ | +107 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH BlueZ v1 00/12] Add functional tests for A2DP and BAP
From: Luiz Augusto von Dentz <[email protected]>
This adds functional tests for A2DP and BAP, driven through bluetoothctl, together with the endpoint registration scripts they use and the documentation describing what each of them does.
The test documentation is reworked to describe every case as setup, steps, expected outcome and notes, so a test can be reproduced and reviewed without reading its source, and the reason behind the way it is written is not lost. The setup of each case includes a topology diagram showing how many hosts are used and the role each of them takes. Tests of a profile need more context than the core ones, so they are documented separately, in doc/functional-<profile>.rst.
The cases added are:
- A2DP: a transport is created on both sides once the stream is configured, and the central can acquire it.
- BAP unicast: the initiator configures the remote PAC Sink endpoint, a transport is created per audio location, and acquiring all of them establishes the CIS. All the transports of a CIG have to be acquired, as the CIS are only created once every CIS of the CIG is ready.
- BAP broadcast: a Broadcast Sink scans, syncs to a Broadcast Source on its own and acquires a transport, for a plain broadcast and for a Public Broadcast Profile one.
- BAP broadcast assistant: a Broadcast Assistant colocated with a Broadcast Source shares its own broadcast with a Scan Delegator, which syncs using PAST. The topology where the assistant relays a source it scanned, which does not use PAST, needs the assistant on a third host and can be added later.
Writing the tests exposed two issues, which are fixed here as well:
- Registering an A2DP endpoint prompted for Locations, Supported Context, Context, CIG and CIS, which are LE Audio specific and have no meaning for A2DP. Answering Locations with a single location also pushes an LC3_CHAN_COUNT LTV into the capabilities, corrupting the SBC capabilities.
- A Broadcast Sink established a PA sync to read the BASE, closed it, and established a new one to sync to the BIG, delaying the start of the stream. The sync is now reused, but only while there is nothing else to discover, and it is released once another Broadcast Source is probed or after a grace timeout.
The broadcast tests also depend on the following kernel fix, without which the BIS connections are not notified to the listening socket and the transport acquire never completes:
Bluetooth: ISO: set BT_LISTEN before requesting a BIG sync
Note that the broadcast tests are still occasionally slow: the first LE BIG Create Sync may expire after 20 seconds and only the retry succeeds, which is being looked at separately.
Luiz Augusto von Dentz (12):
build: add doc/test-functional.rst to EXTRA_DIST
doc: describe the functional test cases
client: do not prompt for LE Audio settings on A2DP endpoints
client: add A2DP endpoint registration scripts
test: functional: add A2DP tests
client: rename media endpoint scripts to include the codec
client: add BAP endpoint registration scripts
doc: bluetoothctl: document init script option and scripts
test: functional: add BAP unicast tests
test: functional: add BAP broadcast tests
test: functional: add BAP broadcast assistant test
bap: reuse the PA sync established to discover a Broadcast Source
Makefile.am | 6 + client/player.c | 15 +- client/scripts/a2dp-sink-sbc.bt | 19 ++ client/scripts/a2dp-source-sbc.bt | 24 +++ client/scripts/bap-sink-lc3.bt | 32 +++ client/scripts/bap-source-lc3.bt | 34 +++ doc/bluetoothctl.rst | 105 +++++++++ doc/functional-a2dp.rst | 99 +++++++++ doc/functional-avrcp.rst | 64 ++++++ doc/functional-bap.rst | 290 +++++++++++++++++++++++++ doc/functional-obex.rst | 90 ++++++++ doc/functional-testing.rst | 340 ++++++++++++++++++++++++++++++ profiles/audio/bap.c | 115 +++++++++- test/functional/test_a2dp.py | 144 +++++++++++++ test/functional/test_bap.py | 318 ++++++++++++++++++++++++++++ 15 files changed, 1685 insertions(+), 10 deletions(-) create mode 100644 client/scripts/a2dp-sink-sbc.bt create mode 100644 client/scripts/a2dp-source-sbc.bt create mode 100644 client/scripts/bap-sink-lc3.bt create mode 100644 client/scripts/bap-source-lc3.bt create mode 100644 doc/functional-a2dp.rst create mode 100644 doc/functional-avrcp.rst create mode 100644 doc/functional-bap.rst create mode 100644 doc/functional-obex.rst create mode 100644 doc/functional-testing.rst create mode 100644 test/functional/test_a2dp.py create mode 100644 test/functional/test_bap.py
Signature · 1 line
2.55.0