forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Bluetooth: add babblesim connection stress test
This is supposed to stress the host buffer and metadata handling. It is not really testing any particular thing, ie. the pass criteria is just that each peripheral can send and receive a fixed number of GATT notifications without any device crashing or locking up. Original version by Ahmed Moheib (from cloud2ground). Signed-off-by: Jonathan Rico <[email protected]>
- Loading branch information
1 parent
8e5c3ce
commit 2dab5dd
Showing
8 changed files
with
1,472 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
tests/bsim/bluetooth/host/misc/conn_stress/central/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
|
||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
project(conn_stress_central) | ||
|
||
target_sources(app PRIVATE | ||
src/main.c | ||
) | ||
|
||
zephyr_include_directories( | ||
$ENV{BSIM_COMPONENTS_PATH}/libUtilv1/src/ | ||
$ENV{BSIM_COMPONENTS_PATH}/libPhyComv1/src/ | ||
) |
43 changes: 43 additions & 0 deletions
43
tests/bsim/bluetooth/host/misc/conn_stress/central/prj.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
CONFIG_BT=y | ||
CONFIG_BT_DEBUG_LOG=y | ||
CONFIG_BT_CENTRAL=y | ||
CONFIG_BT_MAX_CONN=12 | ||
CONFIG_BT_MAX_PAIRED=12 | ||
CONFIG_BT_SMP=y | ||
CONFIG_BT_PRIVACY=y | ||
CONFIG_BT_GATT_CLIENT=y | ||
|
||
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 | ||
CONFIG_BT_BUF_ACL_RX_SIZE=251 | ||
CONFIG_BT_BUF_ACL_TX_SIZE=251 | ||
|
||
CONFIG_BT_L2CAP_TX_MTU=247 | ||
|
||
# variations of this =n or =y on central/per produce different errors | ||
CONFIG_BT_AUTO_PHY_UPDATE=y | ||
CONFIG_BT_AUTO_DATA_LEN_UPDATE=y | ||
|
||
CONFIG_ASSERT=y | ||
CONFIG_ASSERT_LEVEL=2 | ||
CONFIG_ASSERT_VERBOSE=y | ||
CONFIG_ASSERT_ON_ERRORS=y | ||
|
||
# TODO: use default 3 | ||
# we get an ATT timeout if 3 | ||
# we get an SMP timeout if 10 | ||
# CONFIG_BT_L2CAP_TX_BUF_COUNT=10 | ||
|
||
# deadlock on central with the default. | ||
# the problem is that `tx_free` is called from both syswq and btwq in that case. | ||
CONFIG_BT_RECV_WORKQ_BT=y | ||
# CONFIG_BT_RECV_WORKQ_SYS=y | ||
|
||
# errors out getting event flags in hci_core.c | ||
# CONFIG_BT_RECV_BLOCKING=y | ||
|
||
# TODO: remove when test is stable | ||
CONFIG_BT_AUTO_PHY_UPDATE=n | ||
CONFIG_BT_AUTO_DATA_LEN_UPDATE=n | ||
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n | ||
|
||
CONFIG_THREAD_NAME=y |
Oops, something went wrong.