-
Notifications
You must be signed in to change notification settings - Fork 8k
tests: Bluetooth: CAP: Handover u->b unittests #91170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
tests: Bluetooth: CAP: Handover u->b unittests #91170
Conversation
25a78fd
to
d07b671
Compare
d07b671
to
9fda4b4
Compare
8f1e6bf
to
e47f68c
Compare
417bbad
to
d6a1b93
Compare
7f1b407
to
6f80c10
Compare
depends on #91514 |
6f80c10
to
2c48e63
Compare
563398e
to
3143f6c
Compare
b7ef02f
to
10d5ef8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds unit tests for the CAP (Common Audio Profile) handover functionality, specifically testing the handover from unicast to broadcast APIs. The tests verify the CAP handover implementation with comprehensive coverage of valid operations and error conditions.
- Implements comprehensive unit tests for unicast-to-broadcast CAP handover functionality
- Adds mock implementations for Bluetooth audio components including unicast client, broadcast assistant, and advertising
- Creates test infrastructure with fixtures, setup/teardown procedures, and validation utilities
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
tests/bluetooth/audio/mocks/src/adv.c | New mock implementation for Bluetooth LE extended advertising functions |
tests/bluetooth/audio/mocks/include/bluetooth.h | Extended mock header with advertising state enums |
tests/bluetooth/audio/mocks/CMakeLists.txt | Added new advertising mock to build |
tests/bluetooth/audio/cap_handover/uut/*.c | Mock implementations for CSIP, CAP initiator, handover, unicast client, and broadcast assistant |
tests/bluetooth/audio/cap_handover/src/*.c | Unit test implementation and common test utilities |
tests/bluetooth/audio/cap_handover/.yaml/.conf/*.txt | Test configuration and build files |
subsys/bluetooth/audio/bap_broadcast_assistant.c | Removed unused device.h include |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
10d5ef8
to
309b3ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
} | ||
|
||
/* If the stream can be disconnected, BAP will disconnect the stream once it reaches the | ||
* QoS Configured state. We simulator that behavior here, and if the stream is disconnected, |
Copilot
AI
Sep 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in comment: 'simulator' should be 'simulate'.
* QoS Configured state. We simulator that behavior here, and if the stream is disconnected, | |
* QoS Configured state. We simulate that behavior here, and if the stream is disconnected, |
Copilot uses AI. Check for mistakes.
309b3ea
to
52ff03c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
int err = 0; | ||
|
||
/* Attempt to use a stream with invalid unicast group */ | ||
fixture->broadcast_stream_params[0].stream->bap_stream.group = UINT_TO_POINTER(0x12345678); |
Copilot
AI
Sep 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The magic number 0x12345678
should be defined as a named constant to improve code readability and maintainability.
Copilot uses AI. Check for mistakes.
37ea934
to
6dfff71
Compare
6dfff71
to
2560884
Compare
Adds unittests for the handover from unicast to broadcast APIs. Signed-off-by: Emil Gydesen <[email protected]>
2560884
to
03410b6
Compare
|
Adds unittests for the handover from unicast to broadcast APIs.