Lines Matching full:friend
22 * Tests both the friend and the low power role in various scenarios.
93 /* Friend test functions */
95 /** Initialize as a friend and wait for the friendship to be established.
110 /** Initialize as a friend, and wait for multiple friendships to be established
139 /** As a friend, send messages to the LPN.
157 /* Send unsegmented message from friend to LPN: */ in test_friend_msg()
175 * This tests the friend role's re-encryption mechanism for the second in test_friend_msg()
198 /* - 2 for each SegAck (SegAcks are sent faster than Friend Poll messages); in test_friend_msg()
206 /** As a friend, overflow the message queue for the LPN with own packets.
238 "Friend never polled"); in test_friend_overflow()
240 /* LPN verifies that no more messages are in Friend Queue. */ in test_friend_overflow()
245 /* Make room in the Friend Queue for only one unsegmented message. */ in test_friend_overflow()
256 "Friend never polled"); in test_friend_overflow()
258 /* LPN verifies that there are no more messages in the Friend Queue. */ in test_friend_overflow()
263 /* Make space in the Friend Queue for only 2 unsegmented messages so the next unsgemented in test_friend_overflow()
276 /* This message should fit in Friend Queue as well. */ in test_friend_overflow()
281 "Friend never polled"); in test_friend_overflow()
341 /* Friend no-establish test functions */
343 /** Initialize as a friend and no friendships to be established.
389 /* One poll per message + Friend Update with md == 0 */ in test_friend_va_collision()
399 /* Friend will send both messages as the virtual address is the same, but LPN shall in test_friend_va_collision()
406 /* One poll per message + Friend Update with md == 0 */ in test_friend_va_collision()
418 /* Friend shall not send the messages to LPN because it is not subscribed to any virtual in test_friend_va_collision()
425 /* Shall be only one Friend Poll as the Friend Queue is empty. */ in test_friend_va_collision()
447 * when Friend Request from several devices collide in emulated radio channel. in test_lpn_est()
448 * This shift of start moment helps to avoid Friend Request collisions. in test_lpn_est()
465 /** As an LPN, exchange messages with the friend node.
468 * messages to and from the connected friend node.
481 /* Give friend time to prepare the message */ in test_lpn_msg_frnd()
489 /* Give friend time to prepare the message */ in test_lpn_msg_frnd()
497 /* Give friend time to prepare the messages */ in test_lpn_msg_frnd()
511 /* Send an unsegmented message to the friend. in test_lpn_msg_frnd()
515 "Send to friend failed"); in test_lpn_msg_frnd()
519 /* Send a segmented message to the friend. Should trigger a poll for the in test_lpn_msg_frnd()
523 "Send to friend failed"); in test_lpn_msg_frnd()
561 /* Send an unsegmented message with friend credentials to a third mesh in test_lpn_msg_mesh()
562 * node. The friend shall relay it. in test_lpn_msg_mesh()
565 test_model->pub->cred = true; /* Use friend credentials */ in test_lpn_msg_mesh()
575 /** As an LPN, establish and terminate a friendship with the same friend
625 /** Receive packets from a friend that overflowed its queue. Verify that the
661 * the friend, so the first message should have seq=2: in test_lpn_overflow()
668 /* Not expecting any more messages from friend */ in test_lpn_overflow()
682 exp_seq += 2; /* Skipping the first message in Friend Queue. */ in test_lpn_overflow()
696 /* Not expecting any more messages from friend */ in test_lpn_overflow()
707 exp_seq += 2; /* Skipping the first message in Friend Queue. */ in test_lpn_overflow()
727 /* Not expecting any more messages from friend */ in test_lpn_overflow()
738 * and friend. Then, add a second group address (while the friendship is
801 /* From friend */ in test_lpn_group()
818 /* Add a new group addr, then receive on it to ensure that the friend in test_lpn_group()
831 /* From friend on second group address */ in test_lpn_group()
843 * loopback mechanism, and ignored by friend.
887 /* Loopback on group address, should not come back from the friend */ in test_lpn_loopback()
891 /* Loopback on virtual address, should not come back from the friend */ in test_lpn_loopback()
901 /* Loopback on virtual address, should not come back from the friend */ in test_lpn_loopback()
907 /* Poll the friend and make sure we don't receive any messages: */ in test_lpn_loopback()
919 /** Without engaging in a friendship, communicate with an LPN through a friend
930 /* When this device and a friend device receive segments from LPN both start in test_other_msg()
931 * sending data. This device sends transport ack. Friend relays LPN's segment. in test_other_msg()
932 * As a consequence of this, the Friend loses transport ack, and the segmented in test_other_msg()
959 /* Send a segmented message to the friend. */ in test_other_msg()
964 * friend credentials. in test_other_msg()
1028 K_MSEC(1000)), "Friend never polled"); in test_lpn_term_cb_check()
1039 * to Friend when LPN is subscribed to 2 virtual addresses with collision.
1072 LOG_INF("Step 1: Waiting for msgs from Friend"); in test_lpn_va_collision()
1074 /* Let Friend prepare messages and the poll them. */ in test_lpn_va_collision()
1092 /* Remove the first virtual address from subscription and poll messages from Friend. This in test_lpn_va_collision()
1093 * call shall not generate Friend Subscription List Remove message because LPN is still in test_lpn_va_collision()
1105 LOG_INF("Step 2: Waiting for msgs from Friend"); in test_lpn_va_collision()
1118 /* Check that there are no more messages from Friend. */ in test_lpn_va_collision()
1141 LOG_INF("Step 3: Waiting for msgs from Friend"); in test_lpn_va_collision()
1143 /* As now there shall be no virtual addresses in the subscription list, Friend Queue shall in test_lpn_va_collision()
1168 TEST_CASE(friend, est, "Friend: establish friendship"),
1169 TEST_CASE(friend, est_multi, "Friend: establish multiple friendships"),
1170 TEST_CASE(friend, msg, "Friend: message exchange"),
1171 TEST_CASE(friend, overflow, "Friend: message queue overflow"),
1172 TEST_CASE(friend, group, "Friend: send to group addrs"),
1173 TEST_CASE(friend, no_est, "Friend: do not establish friendship"),
1174 TEST_CASE(friend, va_collision, "Friend: send to virtual addrs with collision"),
1177 TEST_CASE(lpn, msg_frnd, "LPN: message exchange with friend"),