Commit 955b1f67 authored by Pavel Vasilyev's avatar Pavel Vasilyev Committed by Carles Cufi
Browse files

tests: bluetooth: mesh: add subnet bridge bsim tests

This commit adds the following tests:
- Simple test for bridging table
- Test bridging table state changes
- Test persistence storage of subnet bridge
- Test IV Index update with subnet bridge
- Test network key removal for subnet bridge

Signed-off-by: default avatarPavel Vasilyev <pavel.vasilyev@nordicsemi.no>
parent dab117c8
Loading
Loading
Loading
Loading
+2 −0
Changes for tests/bsim/bluetooth/mesh/CMakeLists.txt: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ if(CONFIG_SETTINGS)
  src/test_blob.c
  src/test_sar.c
  src/test_lcd.c
  src/test_brg.c
)

if(CONFIG_BT_MESH_USES_MBEDTLS_PSA)
@@ -72,6 +73,7 @@ else()
  src/test_op_agg.c
  src/test_sar.c
  src/test_cdp1.c
  src/test_brg.c
 )

endif()
+0 −3
Changes for tests/bsim/bluetooth/mesh/overlay_pst.conf: 0 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -11,9 +11,6 @@ CONFIG_BT_MESH_PB_GATT=y
CONFIG_BT_MESH_GATT_PROXY_ENABLED=n

CONFIG_BT_MESH_MODEL_GROUP_COUNT=4
CONFIG_BT_MESH_CDB_NODE_COUNT=3
CONFIG_BT_MESH_CDB_SUBNET_COUNT=2
CONFIG_BT_MESH_SUBNET_COUNT=2
CONFIG_BT_MESH_SEQ_STORE_RATE=1
CONFIG_BT_MESH_RPL_STORE_TIMEOUT=1
CONFIG_BT_MESH_STORE_TIMEOUT=1
+1 −0
Changes for tests/bsim/bluetooth/mesh/prj.conf: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ CONFIG_BT_MESH_CDB=y
CONFIG_BT_MESH_CDB_NODE_COUNT=4
CONFIG_BT_MESH_PROV_OOB_PUBLIC_KEY=y
CONFIG_BT_MESH_MODEL_EXTENSIONS=y
CONFIG_BT_MESH_CDB_SUBNET_COUNT=3
CONFIG_BT_MESH_SUBNET_COUNT=5
CONFIG_BT_MESH_SAR_CFG_CLI=y
CONFIG_BT_MESH_SAR_CFG_SRV=y
+4 −0
Changes for tests/bsim/bluetooth/mesh/src/main.c: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ extern struct bst_test_list *test_dfu_install(struct bst_test_list *test);
extern struct bst_test_list *test_blob_pst_install(struct bst_test_list *test);
extern struct bst_test_list *test_lcd_install(struct bst_test_list *test);
extern struct bst_test_list *test_sar_pst_install(struct bst_test_list *test);
extern struct bst_test_list *test_brg_install(struct bst_test_list *test);
#if (CONFIG_BT_MESH_GATT_PROXY && CONFIG_BT_MESH_PROXY_SOLICITATION)
extern struct bst_test_list *test_proxy_sol_install(struct bst_test_list *test);
#endif
@@ -42,6 +43,7 @@ extern struct bst_test_list *test_blob_install(struct bst_test_list *test);
extern struct bst_test_list *test_op_agg_install(struct bst_test_list *test);
extern struct bst_test_list *test_sar_install(struct bst_test_list *test);
extern struct bst_test_list *test_cdp1_install(struct bst_test_list *test);
extern struct bst_test_list *test_brg_install(struct bst_test_list *test);
#endif

bst_test_install_t test_installers[] = {
@@ -53,6 +55,7 @@ bst_test_install_t test_installers[] = {
	test_blob_pst_install,
	test_lcd_install,
	test_sar_pst_install,
	test_brg_install,
#if (CONFIG_BT_MESH_GATT_PROXY && CONFIG_BT_MESH_PROXY_SOLICITATION)
	test_proxy_sol_install,
#endif
@@ -80,6 +83,7 @@ bst_test_install_t test_installers[] = {
	test_op_agg_install,
	test_sar_install,
	test_cdp1_install,
	test_brg_install,
#endif
	NULL
};
+11 −1
Changes for tests/bsim/bluetooth/mesh/src/mesh_test.c: 11 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ static int ra_rx(const struct bt_mesh_model *mod, struct bt_mesh_msg_ctx *ctx,
	LOG_INF("\trssi: %d", ctx->recv_rssi);

	if (ra_cb) {
		ra_cb(net_buf_simple_pull_mem(buf, buf->len), buf->len);
		ra_cb(buf->data, buf->len);
	}

	return 0;
@@ -186,6 +186,10 @@ static struct bt_mesh_priv_beacon_cli priv_beacon_cli;
static struct bt_mesh_od_priv_proxy_cli priv_proxy_cli;
#endif

#if defined(CONFIG_BT_MESH_BRG_CFG_CLI)
static struct bt_mesh_brg_cfg_cli brg_cfg_cli;
#endif

static const struct bt_mesh_model models[] = {
	BT_MESH_MODEL_CFG_SRV,
	BT_MESH_MODEL_CFG_CLI(&cfg_cli),
@@ -205,6 +209,12 @@ static const struct bt_mesh_model models[] = {
#if defined(CONFIG_BT_MESH_OD_PRIV_PROXY_CLI)
	BT_MESH_MODEL_OD_PRIV_PROXY_CLI(&priv_proxy_cli),
#endif
#if defined(CONFIG_BT_MESH_BRG_CFG_SRV)
	BT_MESH_MODEL_BRG_CFG_SRV,
#endif
#if defined(CONFIG_BT_MESH_BRG_CFG_CLI)
	BT_MESH_MODEL_BRG_CFG_CLI(&brg_cfg_cli),
#endif
};

const struct bt_mesh_model *test_model = &models[2];
Loading