tests: Bluetooth: Mesh: Op_agg coex loopback test
Adds coexistence Bsim test for Opcode Aggregator models using loopback. The test verifies that the Opcode Aggregator server and client can send messages to each other on the loopback interface. Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
This commit is contained in:
parent
fc152c8e43
commit
fe9ffdaded
|
@ -25,6 +25,7 @@ CONFIG_BT_MESH_TX_SEG_MAX=32
|
|||
CONFIG_BT_MESH_RX_SEG_MAX=32
|
||||
CONFIG_BT_MESH_TX_SEG_MSG_COUNT=10
|
||||
CONFIG_BT_MESH_RX_SEG_MSG_COUNT=10
|
||||
CONFIG_BT_MESH_SEG_BUFS=100
|
||||
CONFIG_BT_MESH_CFG_CLI=y
|
||||
CONFIG_BT_MESH_MODEL_GROUP_COUNT=3
|
||||
CONFIG_BT_MESH_LOW_POWER=y
|
||||
|
|
|
@ -257,6 +257,23 @@ static void test_dut_model_coex(void)
|
|||
PASS();
|
||||
}
|
||||
|
||||
static void test_dut_model_coex_loopback(void)
|
||||
{
|
||||
/* Start an aggregated sequence */
|
||||
common_init(SRV_ADDR, SRV_ADDR, true);
|
||||
|
||||
/* Send aggregated sequence to server model over loopback */
|
||||
ASSERT_OK(bt_mesh_op_agg_cli_seq_send());
|
||||
|
||||
/* Confirm incoming sequence messages */
|
||||
confirm_agg_seq();
|
||||
|
||||
/* Confirm status messages for sequence */
|
||||
confirm_agg_status();
|
||||
|
||||
PASS();
|
||||
}
|
||||
|
||||
#define TEST_CASE(role, name, description) \
|
||||
{ \
|
||||
.test_id = "op_agg_" #role "_" #name, \
|
||||
|
@ -273,6 +290,7 @@ static const struct bst_test_instance test_op_agg[] = {
|
|||
TEST_CASE(srv, max_len_status_msg_send,
|
||||
"OpAggSrv will respond with a 380 Byte status message. "),
|
||||
TEST_CASE(dut, model_coex, "DUT: Coexistence of OpAggSrv and OpAggCli."),
|
||||
TEST_CASE(dut, model_coex_loopback, "DUT: Coexistence for OpAggSrv and OpAggCli loopback."),
|
||||
|
||||
BSTEST_END_MARKER};
|
||||
|
||||
|
|
22
tests/bsim/bluetooth/mesh/tests_scripts/op_agg/loopback.sh
Executable file
22
tests/bsim/bluetooth/mesh/tests_scripts/op_agg/loopback.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright 2023 Nordic Semiconductor
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
|
||||
|
||||
# Test that an Opcode aggregated message can be sent and received on loopback.
|
||||
#
|
||||
# Test procedure:
|
||||
# 1. The device initializes both Opcode aggregator server and client.
|
||||
# The device starts an Opcode aggregator sequence and populates the buffer.
|
||||
# 2. The device starts sending the sequence on loopback.
|
||||
# 3. The device verifies that the sequence is correctly received by the server model.
|
||||
# 4. The device confirms that the client model received all status messages.
|
||||
conf=prj_mesh1d1_conf
|
||||
RunTest mesh_op_agg_model_coex_loopback \
|
||||
op_agg_dut_model_coex_loopback
|
||||
|
||||
conf=prj_mesh1d1_conf
|
||||
overlay=overlay_psa_conf
|
||||
RunTest mesh_op_agg_model_coex_loopback \
|
||||
op_agg_dut_model_coex_loopback
|
Loading…
Reference in a new issue