1#!/usr/bin/env bash
2# Copyright 2023 Nordic Semiconductor ASA
3# SPDX-License-Identifier: Apache-2.0
4
5source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
6
7# Test that LPN sends only one Subscription List Add and only one Subscription List Remove message
8# to Friend when LPN is subscribed to 2 virtual addresses with collision.
9# Test scenario:
10# 1. LPN subscribes a model to 2 virtual addresses with collision and sends single Friend
11# Subscription List Add message to its friend.
12# 2. Step 1:
13# 2.1. Friend sends a message to each virtual address, LPN receives both messages.
14# 3. Step 2:
15# 3.1. LPN unsubscribes from one of the virtual addresses. At this step no Friend Subscription
16# Remove messages are sent from LPN to its friend.
17# 3.2. Friend sends a message to each virtual address. LPN receives both, but successfully decrypts
18# only one message, which it is still subscribed to.
19# 4. Step 3:
20# 4.1. LPN unsubscribes from the second virtual address and sends Friend Subscription Remove message
21# to its friend.
22# 4.2. Friend sends a message to each virtual address, but non of them are received by LPN.
23RunTest mesh_friendship_msg_va_collision \
24	friendship_lpn_va_collision \
25	friendship_friend_va_collision
26
27overlay=overlay_psa_conf
28RunTest mesh_friendship_msg_va_collision_psa \
29	friendship_lpn_va_collision \
30	friendship_friend_va_collision
31