Skip to content

Commit 9678ff2

Browse files
cvinayakkartben
authored andcommitted
Bluetooth: Controller: Include mem and ecb in-system tests
Include mem and ecb implementation in-system tests. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 17846ed commit 9678ff2

File tree

8 files changed

+18
-9
lines changed

8 files changed

+18
-9
lines changed

subsys/bluetooth/controller/ll_sw/ull.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <zephyr/bluetooth/hci_types.h>
1616

1717
#include "hal/cpu.h"
18+
#include "hal/ecb.h"
1819
#include "hal/ccm.h"
1920
#include "hal/cntr.h"
2021
#include "hal/ticker.h"
@@ -760,7 +761,19 @@ int ll_init(struct k_sem *sem_rx)
760761
}
761762

762763
#if defined(CONFIG_BT_CTLR_TEST)
764+
err = mem_ut();
765+
if (err) {
766+
return err;
767+
}
768+
769+
err = ecb_ut();
770+
if (err) {
771+
return err;
772+
}
773+
774+
#if defined(CONFIG_BT_CTLR_CHAN_SEL_2)
763775
lll_chan_sel_2_ut();
776+
#endif /* CONFIG_BT_CTLR_CHAN_SEL_2 */
764777
#endif /* CONFIG_BT_CTLR_TEST */
765778

766779
return 0;

subsys/bluetooth/controller/util/mem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ uint8_t mem_nz(uint8_t *src, uint16_t len)
137137
/**
138138
* @brief Unit test
139139
*/
140-
uint32_t mem_ut(void)
140+
int mem_ut(void)
141141
{
142142
#define BLOCK_SIZE MROUND(10)
143143
#define BLOCK_COUNT 10

subsys/bluetooth/controller/util/mem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ uint16_t mem_index_get(const void *mem, const void *mem_pool, uint16_t mem_size)
6464
void mem_rcopy(uint8_t *dst, uint8_t const *src, uint16_t len);
6565
uint8_t mem_nz(uint8_t *src, uint16_t len);
6666

67-
uint32_t mem_ut(void);
67+
int mem_ut(void);

tests/bluetooth/init/prj_ctlr_ticker.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ CONFIG_BT_CTLR_SCAN_REQ_RSSI=y
2929
CONFIG_BT_CTLR_SCAN_INDICATION=y
3030
CONFIG_BT_CTLR_PROFILE_ISR=y
3131
CONFIG_BT_CTLR_DEBUG_PINS=y
32-
CONFIG_BT_CTLR_TEST=y
3332
CONFIG_BT_TICKER_EXT=n
3433
CONFIG_BT_TICKER_SLOT_AGNOSTIC=y
3534
CONFIG_BT_TICKER_PREFER_START_BEFORE_STOP=y
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
CONFIG_TEST_LL_INTERFACE=y
2+
3+
# This one bsim test is covering mem, ecb and channel selection unit testing
4+
CONFIG_BT_CTLR_TEST=y

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,5 @@ CONFIG_BT_CTLR_ISO_TX_BUFFER_SIZE=255
2020
CONFIG_BT_CTLR_ADV_ISO_PDU_LEN_MAX=247
2121
CONFIG_BT_CTLR_SYNC_ISO_PDU_LEN_MAX=251
2222

23-
CONFIG_BT_CTLR_TEST=y
24-
2523
CONFIG_BT_BUF_ACL_TX_SIZE=251
2624
CONFIG_BT_BUF_ACL_RX_SIZE=255

tests/bsim/bluetooth/ll/bis/prj_past.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ CONFIG_BT_PER_ADV=y
77
CONFIG_BT_PER_ADV_SYNC=y
88
CONFIG_BT_CTLR_ADV_EXT=y
99

10-
CONFIG_BT_CTLR_TEST=y
11-
1210
CONFIG_BT_ATT_PREPARE_COUNT=2
1311
CONFIG_BT_GATT_CLIENT=y
1412
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y

tests/bsim/bluetooth/ll/bis/prj_vs_dp.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,3 @@ CONFIG_BT_CTLR_ADV_ISO_PDU_LEN_MAX=251
2020
CONFIG_BT_CTLR_SYNC_ISO_PDU_LEN_MAX=251
2121

2222
CONFIG_BT_CTLR_ISO_VENDOR_DATA_PATH=y
23-
24-
CONFIG_BT_CTLR_TEST=y

0 commit comments

Comments
 (0)