Skip to content

Commit 2bb4fd4

Browse files
committed
tests: bsim: Bluetooth: Host: Port gatt notify_stress test
Port GATT notify_stress test. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent f2dc5c9 commit 2bb4fd4

File tree

8 files changed

+16
-7
lines changed

8 files changed

+16
-7
lines changed

tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpuapp.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ mkdir -p ${WORK_DIR}
1919

2020
source ${ZEPHYR_BASE}/tests/bsim/compile.source
2121

22+
app=tests/bsim/bluetooth/host/gatt/notify_stress sysbuild=1 compile
23+
2224
app=tests/bsim/bluetooth/ll/conn conf_file=prj_split_privacy.conf sysbuild=1 compile
2325
app=tests/bsim/bluetooth/ll/bis sysbuild=1 compile
2426
app=tests/bsim/bluetooth/ll/cis conf_overlay=overlay-acl_group.conf sysbuild=1 compile

tests/bsim/bluetooth/host/compile.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ app=tests/bsim/bluetooth/host/gatt/authorization compile
4545
app=tests/bsim/bluetooth/host/gatt/caching compile
4646
app=tests/bsim/bluetooth/host/gatt/general compile
4747
app=tests/bsim/bluetooth/host/gatt/notify compile
48+
app=tests/bsim/bluetooth/host/gatt/notify_stress compile
4849
app=tests/bsim/bluetooth/host/gatt/notify_multiple compile
4950
app=tests/bsim/bluetooth/host/gatt/settings compile
5051
app=tests/bsim/bluetooth/host/gatt/settings conf_file=prj_2.conf compile

tests/bsim/bluetooth/host/gatt/notify_stress/Kconfig.sysbuild

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ source "share/sysbuild/Kconfig"
55

66
config NET_CORE_BOARD
77
string
8-
default "nrf5340bsim/nrf5340/cpunet" if $(BOARD_TARGET_STRING) = "NRF5340BSIM_NRF5340_CPUAPP"
8+
default "nrf5340bsim_nrf5340_cpunet" if $(BOARD) = "nrf5340bsim_nrf5340_cpuapp"
99

1010
config NATIVE_SIMULATOR_PRIMARY_MCU_INDEX
1111
int
1212
# Let's pass the test arguments to the application MCU test
1313
# otherwise by default they would have gone to the net core.
14-
default 0 if $(BOARD_TARGET_STRING) = "NRF5340BSIM_NRF5340_CPUAPP"
14+
default 0 if $(BOARD) = "nrf5340bsim_nrf5340_cpuapp"

tests/bsim/bluetooth/host/gatt/notify_stress/nrf5340_cpunet-bt_ll_sw_split.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ CONFIG_BT_HCI_RAW=y
1414
CONFIG_BT_MAX_CONN=1
1515

1616
# Controller
17-
CONFIG_BT_LL_SW_SPLIT=y
17+
# CONFIG_BT_LL_SW_SPLIT=y
1818
CONFIG_BT_CTLR_ASSERT_HANDLER=y
1919

2020
CONFIG_BT_CTLR_DATA_LENGTH_MAX=70

tests/bsim/bluetooth/host/gatt/notify_stress/prj.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ CONFIG_BT_EATT=y
1414
CONFIG_BT_AUTO_PHY_UPDATE=n
1515
CONFIG_BT_AUTO_DATA_LEN_UPDATE=n
1616

17+
# Zephyr Controller has bug, connection update fails with instant passed under high throughput
18+
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n
19+
1720
CONFIG_ASSERT=y
1821
CONFIG_BT_TESTING=y
1922
CONFIG_LOG=y
@@ -33,3 +36,6 @@ CONFIG_BT_BUF_EVT_RX_COUNT=17
3336
CONFIG_BT_BUF_ACL_RX_COUNT_EXTRA=1
3437

3538
CONFIG_BT_BUF_CMD_TX_COUNT=2
39+
40+
# Explicitly use Zephyr Controller, defaults to SDC in nRFConnect SDK
41+
# CONFIG_BT_LL_SW_SPLIT=y

tests/bsim/bluetooth/host/gatt/notify_stress/src/gatt_client_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ static struct bt_gatt_discover_params disc_params_long;
213213
static struct bt_gatt_subscribe_params sub_params_long = {
214214
.notify = test_notify,
215215
.subscribe = test_long_subscribed,
216-
.ccc_handle = BT_GATT_AUTO_DISCOVER_CCC_HANDLE,
216+
.ccc_handle = 0x0000,
217217
.disc_params = &disc_params_long,
218218
.end_handle = BT_ATT_LAST_ATTRIBUTE_HANDLE,
219219
.value = BT_GATT_CCC_NOTIFY,

tests/bsim/bluetooth/host/gatt/notify_stress/src/gatt_server_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static void setup(void)
146146

147147
printk("Bluetooth initialized\n");
148148

149-
err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_1, ad, ARRAY_SIZE(ad), NULL, 0);
149+
err = bt_le_adv_start(BT_LE_ADV_CONN_NAME, ad, ARRAY_SIZE(ad), NULL, 0);
150150
if (err != 0) {
151151
TEST_FAIL("Advertising failed to start (err %d)", err);
152152
return;

tests/bsim/bluetooth/host/gatt/notify_stress/test_scripts/run_test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ client_id="gatt_client_enhanced_notif_stress"
4444

4545
cd ${BSIM_OUT_PATH}/bin
4646

47-
Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_notify_stress_prj_conf \
47+
Execute ./bs_${BOARD}_tests_bsim_bluetooth_host_gatt_notify_stress_prj_conf \
4848
-v=${verbosity_level} -s=${simulation_id} -d=0 -testid=${client_id} -RealEncryption=1
4949

50-
Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_notify_stress_prj_conf \
50+
Execute ./bs_${BOARD}_tests_bsim_bluetooth_host_gatt_notify_stress_prj_conf \
5151
-v=${verbosity_level} -s=${simulation_id} -d=1 -testid=${server_id} -RealEncryption=1
5252

5353
Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=70e6 $@

0 commit comments

Comments
 (0)