This updates the stream state transition from CONFIG to ENABLING,
on enable for Broadcast Sink streams. This is done to differentiate
between streams discovered in the BASE after short-lived PA sync
and streams that have been selected and enabled by the user.
When running under root there is a possibility the bt_uhid_new_default
doesn't work (e.g. fakeroot) in which case the test shall be aborted
since it is likely a device specific test case which would require
proper permissions to run.
This enables device specific testing and switch to run
bt_uhid_new_default when running as root so the actual kernel driver is
used:
input: MX Anywhere 3 as /devices/virtual/misc/uhid/0005:046D:B025.0031/input/input86
logitech-hidpp-device 0005:046D:B025.0031: input,hidraw10: BLUETOOTH HID v0.14 Mouse [MX Anywhere 3] on 00:00:00:00:00:00
4.14.1 Broadcast Audio Stream with One BIS - Source (page 180):
Test Purpose:
Verify that a Broadcast Source IUT can stream one BIS
to a Broadcast Sink. The verification is performed for
each Config Settings in turn.
Test Case Configuration:
BAP/BSRC/STR/BV-01-C [BSRC, LC3 8_1]
BAP/BSRC/STR/BV-02-C [BSRC, LC3 8_2]
BAP/BSRC/STR/BV-03-C [BSRC, LC3 16_1]
BAP/BSRC/STR/BV-04-C [BSRC, LC3 16_2]
BAP/BSRC/STR/BV-05-C [BSRC, LC3 24_1]
BAP/BSRC/STR/BV-06-C [BSRC, LC3 24_2]
BAP/BSRC/STR/BV-07-C [BSRC, LC3 32_1
BAP/BSRC/STR/BV-08-C [BSRC, LC3 32_2]
BAP/BSRC/STR/BV-09-C [BSRC, LC3 44.1_1]
BAP/BSRC/STR/BV-10-C [BSRC, LC3 44.1_2]
BAP/BSRC/STR/BV-11-C [BSRC, LC3 48_1]
BAP/BSRC/STR/BV-12-C [BSRC, LC3 48_2]
BAP/BSRC/STR/BV-13-C [BSRC, LC3 48_3]
BAP/BSRC/STR/BV-14-C [BSRC, LC3 48_4]
BAP/BSRC/STR/BV-15-C [BSRC, LC3 48_5]
BAP/BSRC/STR/BV-16-C [BSRC, LC3 48_6]
BAP/BSRC/STR/BV-17-C [BSRC, VS]
Pass verdict:
If the Codec ID is LC3, the IUT sends encoded LC3 audio
data in BIS Data PDUs on the broadcast Audio Stream. The
audio data is formatted using the LC3 Media Packet format.
If the Codec ID is a vendor-specific Codec ID, the IUT
sends 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.79.
Test Summary
------------
BAP/BSRC/STR/BV-01-C [BSRC, LC3 8_1] Passed
BAP/BSRC/STR/BV-02-C [BSRC, LC3 8_2] Passed
BAP/BSRC/STR/BV-03-C [BSRC, LC3 16_1] Passed
BAP/BSRC/STR/BV-04-C [BSRC, LC3 16_2] Passed
BAP/BSRC/STR/BV-05-C [BSRC, LC3 24_1] Passed
BAP/BSRC/STR/BV-06-C [BSRC, LC3 24_2] Passed
BAP/BSRC/STR/BV-07-C [BSRC, LC3 32_1] Passed
BAP/BSRC/STR/BV-08-C [BSRC, LC3 32_2] Passed
BAP/BSRC/STR/BV-09-C [BSRC, LC3 44.1_1] Passed
BAP/BSRC/STR/BV-10-C [BSRC, LC3 44.1_2] Passed
BAP/BSRC/STR/BV-11-C [BSRC, LC3 48_1] Passed
BAP/BSRC/STR/BV-12-C [BSRC, LC3 48_2] Passed
BAP/BSRC/STR/BV-13-C [BSRC, LC3 48_3] Passed
BAP/BSRC/STR/BV-14-C [BSRC, LC3 48_4] Passed
BAP/BSRC/STR/BV-15-C [BSRC, LC3 48_5] Passed
BAP/BSRC/STR/BV-16-C [BSRC, LC3 48_6] Passed
BAP/BSRC/STR/BV-17-C [BSRC, VS] Passed
BAP/BSRC/SCC/BV-37-C [Releases Broadcast] (page 176):
Test Purpose:
Verify that a Broadcast Source IUT can release a broadcast
Audio Stream and transition from Configured state to Idle
state.
Pass verdict:
The IUT stops transmitting periodic advertising.
Test Summary
------------
BAP/BSRC/SCC/BV-37-C [Releases Broadcast] Passed
BAP/BSRC/SCC/BV-36-C [Disables Broadcast] (page 176):
Test Purpose:
Verify that a Broadcast Source IUT can disable a broadcast
Audio Stream.
Pass verdict:
The IUT sends a BIG_TERMINATE_IND PDU.
Test Summary
------------
BAP/BSRC/SCC/BV-36-C [Disables Broadcast] Passed
BAP/BSRC/SCC/BV-35-C [Establishes Broadcast] (page 175):
Test Purpose:
Verify that a Broadcast Source IUT can establish a broadcast
Audio Stream.
Pass verdict:
The IUT sends AUX_SYNC_IND PDUs with an Extended Header
containing BIGInfo in the ACAD field.
The IUT sends BIS Data PDUs over the broadcast Audio
Stream.
Test Summary
------------
BAP/BSRC/SCC/BV-35-C [Establishes Broadcast] Passed
This updates bsrc_state to just handle the CONFIG stream state. Dedicated
state changed callbacks will be implemented for tests that require streams
to be established, disabled etc.
Update BAP Broadcast Source state machine states to use BAP define states
for source Idle, Config, Streaming, and an intermediary state enabling.
Updated test-bap too.
4.14.4 Broadcast Sink Receives Audio Data Over Multiple BISes (page 193):
Test Purpose:
Verify that a Broadcast Sink IUT can receive audio data over
multiple BISes from a Broadcast Source. The verification is
performed for each set of parameters in turn.
Test Case Configuration:
BAP/BSNK/STR/BV-18-C [BSNK, Multiple BISes, LC3 8_1]
BAP/BSNK/STR/BV-19-C [BSNK, Multiple BISes, LC3 8_2]
BAP/BSNK/STR/BV-20-C [BSNK, Multiple BISes, LC3 16_1]
BAP/BSNK/STR/BV-21-C [BSNK, Multiple BISes, LC3 16_2]
BAP/BSNK/STR/BV-22-C [BSNK, Multiple BISes, LC3 24_1]
BAP/BSNK/STR/BV-23-C [BSNK, Multiple BISes, LC3 24_2]
BAP/BSNK/STR/BV-24-C [BSNK, Multiple BISes, LC3 32_1]
BAP/BSNK/STR/BV-25-C [BSNK, Multiple BISes, LC3 32_2]
BAP/BSNK/STR/BV-26-C [BSNK, Multiple BISes, LC3 44.1_1]
BAP/BSNK/STR/BV-27-C [BSNK, Multiple BISes, LC3 44.1_2]
BAP/BSNK/STR/BV-28-C [BSNK, Multiple BISes, LC3 48_1]
BAP/BSNK/STR/BV-29-C [BSNK, Multiple BISes, LC3 48_2]
BAP/BSNK/STR/BV-30-C [BSNK, Multiple BISes, LC3 48_3]
BAP/BSNK/STR/BV-31-C [BSNK, Multiple BISes, LC3 48_4]
BAP/BSNK/STR/BV-32-C [BSNK, Multiple BISes, LC3 48_5]
BAP/BSNK/STR/BV-33-C [BSNK, Multiple BISes, LC3 48_6]
BAP/BSNK/STR/BV-34-C [BSNK, Multiple BISes, 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 encoded LC3 audio
data in BIS Data PDUs on each synchronized BIS. The audio
data is formatted using the LC3 Media Packet format.
If the Codec ID is a vendor-specific Codec ID, the IUT receives
BIS Data PDUs on each synchronized BIS. 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.85.
Test Summary
------------
BAP/BSNK/STR/BV-18-C [BSNK, Multiple BISes, LC3 8_1] Passed
BAP/BSNK/STR/BV-19-C [BSNK, Multiple BISes, LC3 8_2] Passed
BAP/BSNK/STR/BV-20-C [BSNK, Multiple BISes, LC3 16_1] Passed
BAP/BSNK/STR/BV-21-C [BSNK, Multiple BISes, LC3 16_2] Passed
BAP/BSNK/STR/BV-22-C [BSNK, Multiple BISes, LC3 24_1] Passed
BAP/BSNK/STR/BV-23-C [BSNK, Multiple BISes, LC3 24_2] Passed
BAP/BSNK/STR/BV-24-C [BSNK, Multiple BISes, LC3 32_1] Passed
BAP/BSNK/STR/BV-25-C [BSNK, Multiple BISes, LC3 32_2] Passed
BAP/BSNK/STR/BV-26-C [BSNK, Multiple BISes, LC3 44.1_1] Passed
BAP/BSNK/STR/BV-27-C [BSNK, Multiple BISes, LC3 44.1_2] Passed
BAP/BSNK/STR/BV-28-C [BSNK, Multiple BISes, LC3 48_1] Passed
BAP/BSNK/STR/BV-29-C [BSNK, Multiple BISes, LC3 48_2] Passed
BAP/BSNK/STR/BV-30-C [BSNK, Multiple BISes, LC3 48_3] Passed
BAP/BSNK/STR/BV-31-C [BSNK, Multiple BISes, LC3 48_4] Passed
BAP/BSNK/STR/BV-32-C [BSNK, Multiple BISes, LC3 48_5] Passed
BAP/BSNK/STR/BV-33-C [BSNK, Multiple BISes, LC3 48_6] Passed
BAP/BSNK/STR/BV-34-C [BSNK, Multiple BISes, VS] Passed
This adds support for implementing Broadcast tests that require multiple
streams to be configured (for example, 4.14.4 Broadcast Sink Receives
Audio Data Over Multiple BISes).
The number of required streams is added inside the test_config struct.
The bsnk_pac_added and the bsnk_state_str callbacks have been updated
to support multiple streams.
Some BAP test configurations require multiple streams to be created
(for example, 4.14.4 Broadcast Sink Receives Audio Data Over Multiple
BISes).
This replaces the stream pointer inside test_data with a queue of
streams, where each created stream is pushed.
Unicast callbacks where the created stream needs to be accessed
already pass the stream reference as parameter, so there is no need
to access it from test_data.
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
This adds special handling for non-keyboards so they are destroyed when
disconnected rather than keeping their device node around.
Fixes: https://github.com/bluez/bluez/issues/848
The current test_setup function is only targeted for client test cases
that require service discovery. This commit makes the test define more
generic, by adding the test_setup to the list of parameters, so that
custom setup functions can be provided depending on the test case.
gatt_db_service_insert_characteristic shall not attempt to insert the
characteristic attribute handle on the next available index as there
could be descriptors in between so this changes the way
get_attribute_index calculates the index based on the given handle to
properly skip indexes used by descriptors.
44.1 Khz where broken due to change to LC3_QOS_UCAST which now properly
sets the framing, so this changes the test vectors of 44.1 Khz test to
properly set it since those required framing.
4.8.8 Unicast Client Initiates Update Metadata Operation (Page 53):
Test Purpose:
Verify that a Unicast Client IUT can update the Metadata of an ASE by
initiating an Update Metadata operation.
Pass verdict:
The IUT successfully writes to the ASE Control Point characteristic with the
opcode set to 0x07 (Update Metadata) and the specified parameters.
Test Summary
------------
BAP/UCL/SCC/BV-115-C [UCL SNK Update Metadata in Enabling State] Passed
BAP/UCL/SCC/BV-116-C [UCL SRC Update Metadata in Enabling or Streaming state]
Passed
BAP/UCL/SCC/BV-117-C [UCL SNK Update Metadata in Streaming State] Passed
Total: 3, Passed: 3 (100.0%), Failed: 0, Not Run: 0
4.8.7 Unicast Client Initiates Release Operation (Page 51):
Test Purpose:
Verify that a Unicast Client IUT can release an ASE by initiating a Release
operation.
Pass verdict:
The IUT successfully writes to the ASE Control Point characteristic with the
opcode set to 0x08 (Release) and the specified parameters.
Test Summary
------------
BAP/UCL/SCC/BV-106-C [UCL SNK Release in Codec Configured state] Passed
BAP/UCL/SCC/BV-107-C [UCL SRC Release in Codec Configured state] Passed
BAP/UCL/SCC/BV-108-C [UCL SNK Release in QoS Configured state] Passed
BAP/UCL/SCC/BV-109-C [UCL SRC Release in QoS Configured state] Passed
BAP/UCL/SCC/BV-110-C [UCL SNK Release in Enabling state] Passed
BAP/UCL/SCC/BV-111-C [UCL SRC Release in Enabling or Streaming state] Passed
BAP/UCL/SCC/BV-112-C [UCL SNK Release in Streaming state] Passed
BAP/UCL/SCC/BV-113-C [UCL SNK Release in Disabling state] Passed
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
4.8.6 Unicast Client Initiates Disable Operation (Page 50):
Test Purpose:
Verify that a Unicast Client IUT can initiate a Disable operation for an ASE
in the Enabling or Streaming state.
Pass verdict:
The IUT successfully writes to the ASE Control Point characteristic with the
opcode set to 0x05 (Disable) and the specified parameters.
Test Summary
------------
BAP/UCL/SCC/BV-103-C [UCL SNK Disable in Enabling State] Passed
BAP/UCL/SCC/BV-104-C [UCL SRC Disable in Enabling or Streaming state] Passed
BAP/UCL/SCC/BV-105-C [UCL SNK Disable in Streaming State] Passed
Total: 3, Passed: 3 (100.0%), Failed: 0, Not Run: 0
4.8.5 Unicast Client Initiates Enable Operation (Page 48)
Test Purpose:
Verify that a Unicast Client IUT can initiate an Enable operation for an ASE
with a Unicast Server that is either in the Audio Sink role or the Audio
Source role.
Pass verdict:
The IUT successfully writes to the ASE Control Point characteristic with the
opcode set to 0x03 (Enable) and the specified parameters.
Test Summary
------------
BAP/UCL/SCC/BV-101-C [UCL SRC Enable] Passed
BAP/UCL/SCC/BV-102-C [UCL SNK Enable] Passed
Total: 2, Passed: 2 (100.0%), Failed: 0, Not Run: 0
4.8.4 Unicast Client Initiates Config QoS – Vendor-Specific (Page 46)
Test Purpose:
Verify that a Unicast Client IUT can initiate a Config QoS operation for a
vendor-specific codec.
Pass verdict:
The IUT successfully writes to the ASE Control Point characteristic with the
opcode set to 0x02 (Config QoS) and the specified parameters.
Test Summary
------------
BAP/UCL/SCC/BV-099-C [UCL SNK Config QoS, VS] Passed
BAP/UCL/SCC/BV-100-C [UCL SRC Config QoS, VS] Passed
Total: 2, Passed: 2 (100.0%), Failed: 0, Not Run: 0
This fixes the following build errors:
unit/test-midi.c:541:82: error: function definition is not allowed here
void compare_events_cb(const struct midi_write_parser *parser,
void *user_data) {
^
unit/test-midi.c:587:17: error: use of undeclared identifier
'compare_events_cb'; did you mean 'compare_events'?
compare_events_cb, &midi_data);
^~~~~~~~~~~~~~~~~
compare_events
profiles/midi/midi.c:61:75: error: function definition is not allowed
here
void foreach_cb(const struct midi_write_parser *parser, void *user_data) {
^
profiles/midi/midi.c:78:40: error: use of undeclared identifier 'foreach_cb'
midi_read_ev(&midi->midi_out, event, foreach_cb, midi);
^
This adds 3 unit tests for BASS server, to simulate the
Generic GATT Integrated Test suite for BASS.
Test Summary
------------
BASS/SR/SGGIT/SER/BV-01-C Passed
BASS/SR/SGGIT/CHA/BV-01-C Passed
BASS/SR/SGGIT/CHA/BV-02-C Passed
Total: 3, Passed: 3 (100.0%), Failed: 0, Not Run: 0
4.8.2 Unicast Client Initiates a Config Codec Operation –
Vendor-Specific (page 42):
Test Purpose:
Verify that a Unicast Client IUT can initiate a Config Codec
operation for a vendor-specific codec.
Test Case Configuration:
BAP/UCL/SCC/BV-033-C [UCL SRC Config Codec, VS]
BAP/UCL/SCC/BV-034-C [UCL SNK Config Codec, VS]
Pass verdict:
The IUT successfully writes to the ASE Control Point characteristic
with the opcode set to 0x01 (Config Codec) and the specified
parameters. The Codec_ID parameter is formatted with octet 0 set to
0xFF, octets 1–2 set to TSPX_VS_Company_ID, and octets 3–4 set to
TSPX_VS_Codec_ID.
Test Summary
------------
BAP/UCL/SCC/BV-033-C [UCL SRC Config Codec, VS] Passed
BAP/UCL/SCC/BV-034-C [UCL SNK Config Codec, VS] Passed
Total: 2, Passed: 2 (100.0%), Failed: 0, Not Run: 0