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.
Bluetooth: Host: Add test for issue zephyrproject-rtos#42306
Checks that only CONFIG_BT_EATT_MAX EATT bearers get connected. Signed-off-by: Herman Berget <[email protected]>
- Loading branch information
1 parent
6a23439
commit 0e5d438
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
tests/bluetooth/bsim_bt/bsim_test_eatt/prj_multiple_conn.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,14 @@ | ||
CONFIG_BT=y | ||
CONFIG_BT_CENTRAL=y | ||
CONFIG_BT_PERIPHERAL=y | ||
CONFIG_BT_SMP=y | ||
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y | ||
CONFIG_BT_DEVICE_NAME="EATT test" | ||
CONFIG_BT_EATT=y | ||
CONFIG_BT_L2CAP_ECRED=y | ||
CONFIG_BT_EATT_MAX=5 | ||
CONFIG_BT_MAX_CONN=2 | ||
|
||
CONFIG_BT_TESTING=y | ||
CONFIG_BT_DEBUG_LOG=y | ||
CONFIG_ASSERT=y |
37 changes: 37 additions & 0 deletions
37
tests/bluetooth/bsim_bt/bsim_test_eatt/tests_scripts/multiple_conn.sh
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,37 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) 2022 Nordic Semiconductor | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
simulation_id="multiple_conn" | ||
verbosity_level=2 | ||
process_ids=""; exit_code=0 | ||
|
||
function Execute(){ | ||
if [ ! -f $1 ]; then | ||
echo -e " \e[91m`pwd`/`basename $1` cannot be found (did you forget to\ | ||
compile it?)\e[39m" | ||
exit 1 | ||
fi | ||
timeout 120 $@ & process_ids="$process_ids $!" | ||
} | ||
|
||
: "${BSIM_OUT_PATH:?BSIM_OUT_PATH must be defined}" | ||
|
||
#Give a default value to BOARD if it does not have one yet: | ||
BOARD="${BOARD:-nrf52_bsim}" | ||
|
||
cd ${BSIM_OUT_PATH}/bin | ||
|
||
Execute ./bs_${BOARD}_tests_bluetooth_bsim_bt_bsim_test_eatt_prj_multiple_conn_conf \ | ||
-v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central | ||
|
||
Execute ./bs_${BOARD}_tests_bluetooth_bsim_bt_bsim_test_eatt_prj_multiple_conn_conf \ | ||
-v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral | ||
|
||
Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ | ||
-D=2 -sim_length=200e6 $@ | ||
|
||
for process_id in $process_ids; do | ||
wait $process_id || let "exit_code=$?" | ||
done | ||
exit $exit_code #the last exit code != 0 |
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