-
Notifications
You must be signed in to change notification settings - Fork 7.6k
tests: Bluetooth: Audio: Add common start_broadcast_adv #90434
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
tests: Bluetooth: Audio: Add common start_broadcast_adv #90434
Conversation
0b37aa5
to
a1090c5
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 consolidates the logic for starting broadcast advertising in the LE Audio BSIM tests by introducing a common utility function, start_broadcast_adv, to replace duplicated implementations across test files.
- Remove duplicated start_extended_adv functions.
- Update test files (pbp_public_broadcast_source_test.c, gmap_ugg_test.c, and cap_initiator_broadcast_test.c) to invoke the common function.
- Add the declaration in common.h and the implementation in common.c.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/bsim/bluetooth/audio/src/pbp_public_broadcast_source_test.c | Replaced start_extended_adv with start_broadcast_adv call |
tests/bsim/bluetooth/audio/src/gmap_ugg_test.c | Replaced start_extended_adv with start_broadcast_adv call |
tests/bsim/bluetooth/audio/src/common.h | Added declaration of start_broadcast_adv |
tests/bsim/bluetooth/audio/src/common.c | Added implementation for start_broadcast_adv |
tests/bsim/bluetooth/audio/src/cap_initiator_broadcast_test.c | Replaced start_extended_adv with start_broadcast_adv call (multiple sites) |
Comments suppressed due to low confidence (4)
tests/bsim/bluetooth/audio/src/common.c:250
- Consider adding inline documentation for start_broadcast_adv specifying its error handling strategy and its reliance on the FAIL macro, so that future maintainers understand that it does not return error codes.
void start_broadcast_adv(struct bt_le_ext_adv *adv)
tests/bsim/bluetooth/audio/src/pbp_public_broadcast_source_test.c:269
- Replacing start_extended_adv with start_broadcast_adv here is fine as long as the internal error handling (using FAIL) meets the test failure requirements. Please verify that the change does not alter the intended test behavior.
start_broadcast_adv(adv);
tests/bsim/bluetooth/audio/src/gmap_ugg_test.c:1206
- Ensure that replacing start_extended_adv with start_broadcast_adv maintains consistent error handling behavior, as the new function handles errors internally via FAIL without returning an error code.
start_broadcast_adv(adv);
tests/bsim/bluetooth/audio/src/cap_initiator_broadcast_test.c:646
- Since multiple call sites now use start_broadcast_adv instead of start_extended_adv, please ensure that the internal error handling via FAIL meets all test scenarios across this file.
start_broadcast_adv(adv);
Add a common function, start_broadcast_adv, to start broadcast advertisement in the LE Audio BSIM tests. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
a1090c5
to
6553c9b
Compare
|
Add a common function, start_broadcast_adv, to start
broadcast advertisement in the LE Audio BSIM tests.