1#!/usr/bin/env bash
2# Copyright 2024 Nordic Semiconductor
3# SPDX-License-Identifier: Apache-2.0
4
5source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
6
7# This test checks basic functionality of the Subnet Bridge with group addressing. It checks the
8# following:
9# - Messages are bridged to group address subscribers, only for subnets in the bridging table.
10# - Messages are not bridged when the Subnet Bridge state is disabled.
11#
12# 3 roles are used in this test: Tester, Subnet Bridge node, and Mesh node.
13#
14# Subnets topology*:
15#                  Tester
16#                    |
17#                (subnet 0)
18#                   |
19#              Subnet Bridge (bridges subnets: 0 --> 0xC000, subnets 1 and 2)
20#                   |
21#              Group Address (0xC000)
22#            /      |       \
23#    (subnet 1)  (subnet 2)  (subnet 3)**
24#       |          |             \
25#     Node       Node           Node
26#
27# (*)  - All nodes are in the tester's range
28# (**) - Messages are not bridged to subnet 3 via the group address. If the node belonging to subnet
29#        3 receives a message from the tester, the test will fail.
30#
31# Test procedure:
32# The same procedure as in the `mesh_brg_simple` test is used. The main differences are:
33# - An additional node is added to a new subnet (3).
34# - Each of the nodes are subscribed to the same group address. Messages are bridged from the tester
35#   to the group address, only for subnets 1 and 2.
36# - To allow nodes to respond to the tester, messages from each node is bridged to the tester.
37
38RunTest mesh_brg_simple_group \
39	brg_tester_simple_group brg_bridge_simple brg_device_simple brg_device_simple \
40	brg_device_simple
41
42overlay=overlay_psa_conf
43RunTest mesh_brg_simple_group_psa \
44	brg_tester_simple_group brg_bridge_simple brg_device_simple brg_device_simple \
45	brg_device_simple
46