Skip to content

Commit 5258b52

Browse files
cvinayaknashif
authored andcommitted
tests: bsim: Bluetooth: Reduce multiple id test execution iterations
Reduce the iterations in multiple id multiple simultaneous connections test, and tune the buffer counts to catch any buffer leak related regressions. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent c878e3f commit 5258b52

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

tests/bsim/bluetooth/ll/multiple_id/prj.conf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
3434

3535
# Each PHY update can pause connections for 6 interval hence to let other
3636
# parallel connection establishment to succeed increase Rx buffer count.
37-
CONFIG_BT_CTLR_RX_BUFFERS=6
37+
# A minimum of 1 Rx buffer is required to receive data PDU, during control
38+
# procedures Rx buffer could be held, preventing new connections to be
39+
# established, a value of 3 is tuned based on this test case execution for 2
40+
# iterations. If there is buffer leak, simulated by using value of 2 here, the
41+
# test is failing.
42+
# If there is buffer leak, this test now should catch it.
43+
CONFIG_BT_CTLR_RX_BUFFERS=3
3844

3945
# Provide enough spacing between connections so that multiple peripheral roles
4046
# when connected to a single peer device (peripheral_identity sample) have

tests/bsim/bluetooth/ll/multiple_id/src/main.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@
1818
#include "time_machine.h"
1919
#include "bstests.h"
2020

21-
#define ITERATIONS 10
21+
/* The test case is performing 250 simultaneous connections and managing
22+
* parallel control procedures utilizing the available/configured minimum
23+
* buffer counts. Hence, two iterations of connect-disconnect should be
24+
* sufficient to catch any regressions/buffer leaks.
25+
*/
26+
#define ITERATIONS 2
2227

2328
int init_central(uint8_t iterations);
2429
int init_peripheral(uint8_t iterations);
@@ -81,7 +86,7 @@ static void test_peripheral_main(void)
8186

8287
static void test_multiple_init(void)
8388
{
84-
bst_ticker_set_next_tick_absolute(4500e6);
89+
bst_ticker_set_next_tick_absolute(1500e6);
8590
bst_result = In_progress;
8691
}
8792

tests/bsim/bluetooth/ll/multiple_id/tests_scripts/multiple.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
77
# Multiple connection between two devices with multiple peripheral identity
88
simulation_id="multiple"
99
verbosity_level=2
10-
EXECUTE_TIMEOUT=2200
10+
EXECUTE_TIMEOUT=1600
1111

1212
cd ${BSIM_OUT_PATH}/bin
1313

@@ -18,6 +18,6 @@ Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_ll_multiple_id_prj_conf\
1818
-v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral
1919

2020
Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \
21-
-D=2 -sim_length=4500e6 $@ -argschannel -at=40
21+
-D=2 -sim_length=1800e6 $@ -argschannel -at=40
2222

2323
wait_for_background_jobs

0 commit comments

Comments
 (0)