Skip to content

Commit

Permalink
fixup! tests: Bluetooth: Audio: Remove uses of K_FOREVER in syswg for TX
Browse files Browse the repository at this point in the history
Several tests were using K_FOREVER when allocating the
buffer for TX in the system workqueue, which is illegal behavior.

The solution chosen was to create a TX thread to handle TX,
similar to the solution used in the audio shell and some
sample applications.

This way we can continue to use K_FOREVER when allocting buffers
and it will always be done in a round-robin fashion while
TXing as much as possible, by always enqueuing all the buffers
with mock data.

Since this works for all streams (both broadcast and unicast),
it was obvious to use the same implementation for all tests,
and thus cleaning up the tests a bit and more them more similar.

Signed-off-by: Emil Gydesen <[email protected]>
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
  • Loading branch information
Thalley authored and cvinayak committed Nov 4, 2024
1 parent ab519ab commit 58705a3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 34 deletions.
2 changes: 1 addition & 1 deletion tests/bsim/bluetooth/audio/src/bap_stream_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static void tx_thread_func(void *arg1, void *arg2, void *arg3)

if (err != 0) {
/* In case of any errors, retry with a delay */
k_sleep(K_MSEC(10));
k_sleep(K_MSEC(1));
}
}
}
Expand Down
33 changes: 0 additions & 33 deletions tests/bsim/bluetooth/audio/test_scripts/cap_broadcast_ac_12.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,37 +33,4 @@ function Execute_AC_12() {
set -e # Exit on error

# Low latency tests
Execute_AC_12 8_1_1
Execute_AC_12 8_2_1
Execute_AC_12 16_1_1
Execute_AC_12 16_2_1
Execute_AC_12 24_1_1
Execute_AC_12 24_2_1
Execute_AC_12 32_1_1
Execute_AC_12 32_2_1
Execute_AC_12 441_1_1
Execute_AC_12 441_2_1
Execute_AC_12 48_1_1
Execute_AC_12 48_2_1
Execute_AC_12 48_3_1
Execute_AC_12 48_4_1
Execute_AC_12 48_5_1
Execute_AC_12 48_6_1

# High reliability
Execute_AC_12 8_1_2
Execute_AC_12 8_2_2
Execute_AC_12 16_1_2
Execute_AC_12 16_2_2
Execute_AC_12 24_1_2
Execute_AC_12 24_2_2
Execute_AC_12 32_1_2
Execute_AC_12 32_2_2
# Execute_AC_12 441_1_2 # BT_ISO_FLAGS_LOST
# Execute_AC_12 441_2_2 # BT_ISO_FLAGS_LOST
Execute_AC_12 48_1_2
Execute_AC_12 48_2_2
Execute_AC_12 48_3_2
Execute_AC_12 48_4_2
Execute_AC_12 48_5_2
Execute_AC_12 48_6_2

0 comments on commit 58705a3

Please sign in to comment.