xref: /aosp_15_r20/external/openthread/tests/toranj/ncp/test-026-slaac-address-wpantund.py (revision cfb92d1480a9e65faed56933e9c12405f45898b4)
1*cfb92d14SAndroid Build Coastguard Worker#!/usr/bin/env python3
2*cfb92d14SAndroid Build Coastguard Worker#
3*cfb92d14SAndroid Build Coastguard Worker#  Copyright (c) 2018, The OpenThread Authors.
4*cfb92d14SAndroid Build Coastguard Worker#  All rights reserved.
5*cfb92d14SAndroid Build Coastguard Worker#
6*cfb92d14SAndroid Build Coastguard Worker#  Redistribution and use in source and binary forms, with or without
7*cfb92d14SAndroid Build Coastguard Worker#  modification, are permitted provided that the following conditions are met:
8*cfb92d14SAndroid Build Coastguard Worker#  1. Redistributions of source code must retain the above copyright
9*cfb92d14SAndroid Build Coastguard Worker#     notice, this list of conditions and the following disclaimer.
10*cfb92d14SAndroid Build Coastguard Worker#  2. Redistributions in binary form must reproduce the above copyright
11*cfb92d14SAndroid Build Coastguard Worker#     notice, this list of conditions and the following disclaimer in the
12*cfb92d14SAndroid Build Coastguard Worker#     documentation and/or other materials provided with the distribution.
13*cfb92d14SAndroid Build Coastguard Worker#  3. Neither the name of the copyright holder nor the
14*cfb92d14SAndroid Build Coastguard Worker#     names of its contributors may be used to endorse or promote products
15*cfb92d14SAndroid Build Coastguard Worker#     derived from this software without specific prior written permission.
16*cfb92d14SAndroid Build Coastguard Worker#
17*cfb92d14SAndroid Build Coastguard Worker#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18*cfb92d14SAndroid Build Coastguard Worker#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19*cfb92d14SAndroid Build Coastguard Worker#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20*cfb92d14SAndroid Build Coastguard Worker#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21*cfb92d14SAndroid Build Coastguard Worker#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22*cfb92d14SAndroid Build Coastguard Worker#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23*cfb92d14SAndroid Build Coastguard Worker#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24*cfb92d14SAndroid Build Coastguard Worker#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25*cfb92d14SAndroid Build Coastguard Worker#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26*cfb92d14SAndroid Build Coastguard Worker#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27*cfb92d14SAndroid Build Coastguard Worker#  POSSIBILITY OF SUCH DAMAGE.
28*cfb92d14SAndroid Build Coastguard Worker
29*cfb92d14SAndroid Build Coastguard Workerimport time
30*cfb92d14SAndroid Build Coastguard Workerimport wpan
31*cfb92d14SAndroid Build Coastguard Workerfrom wpan import verify
32*cfb92d14SAndroid Build Coastguard Worker
33*cfb92d14SAndroid Build Coastguard Worker# -----------------------------------------------------------------------------------------------------------------------
34*cfb92d14SAndroid Build Coastguard Worker# Test description: SLAAC address
35*cfb92d14SAndroid Build Coastguard Worker#
36*cfb92d14SAndroid Build Coastguard Worker# This test covers the addition/removal of SLAAC IPv6 address by `wpantund`.
37*cfb92d14SAndroid Build Coastguard Worker#
38*cfb92d14SAndroid Build Coastguard Worker
39*cfb92d14SAndroid Build Coastguard Workertest_name = __file__[:-3] if __file__.endswith('.py') else __file__
40*cfb92d14SAndroid Build Coastguard Workerprint('-' * 120)
41*cfb92d14SAndroid Build Coastguard Workerprint('Starting \'{}\''.format(test_name))
42*cfb92d14SAndroid Build Coastguard Worker
43*cfb92d14SAndroid Build Coastguard Worker# -----------------------------------------------------------------------------------------------------------------------
44*cfb92d14SAndroid Build Coastguard Worker# Utility functions
45*cfb92d14SAndroid Build Coastguard Worker
46*cfb92d14SAndroid Build Coastguard Worker
47*cfb92d14SAndroid Build Coastguard Workerdef verify_address(node_list, prefix):
48*cfb92d14SAndroid Build Coastguard Worker    """
49*cfb92d14SAndroid Build Coastguard Worker    This function verifies that all nodes in the `node_list` contain an IPv6 address with the given `prefix`.
50*cfb92d14SAndroid Build Coastguard Worker    """
51*cfb92d14SAndroid Build Coastguard Worker    for node in node_list:
52*cfb92d14SAndroid Build Coastguard Worker        all_addrs = wpan.parse_list(node.get(wpan.WPAN_IP6_ALL_ADDRESSES))
53*cfb92d14SAndroid Build Coastguard Worker        verify(any([addr.startswith(prefix[:-1]) for addr in all_addrs]))
54*cfb92d14SAndroid Build Coastguard Worker
55*cfb92d14SAndroid Build Coastguard Worker
56*cfb92d14SAndroid Build Coastguard Workerdef verify_no_address(node_list, prefix):
57*cfb92d14SAndroid Build Coastguard Worker    """
58*cfb92d14SAndroid Build Coastguard Worker    This function verifies that none of nodes in the `node_list` contain an IPv6 address with the given `prefix`.
59*cfb92d14SAndroid Build Coastguard Worker    """
60*cfb92d14SAndroid Build Coastguard Worker    for node in node_list:
61*cfb92d14SAndroid Build Coastguard Worker        all_addrs = wpan.parse_list(node.get(wpan.WPAN_IP6_ALL_ADDRESSES))
62*cfb92d14SAndroid Build Coastguard Worker        verify(all([not addr.startswith(prefix[:-1]) for addr in all_addrs]))
63*cfb92d14SAndroid Build Coastguard Worker
64*cfb92d14SAndroid Build Coastguard Worker
65*cfb92d14SAndroid Build Coastguard Workerdef verify_prefix(
66*cfb92d14SAndroid Build Coastguard Worker    node_list,
67*cfb92d14SAndroid Build Coastguard Worker    prefix,
68*cfb92d14SAndroid Build Coastguard Worker    prefix_len=64,
69*cfb92d14SAndroid Build Coastguard Worker    stable=True,
70*cfb92d14SAndroid Build Coastguard Worker    priority='med',
71*cfb92d14SAndroid Build Coastguard Worker    on_mesh=False,
72*cfb92d14SAndroid Build Coastguard Worker    slaac=False,
73*cfb92d14SAndroid Build Coastguard Worker    dhcp=False,
74*cfb92d14SAndroid Build Coastguard Worker    configure=False,
75*cfb92d14SAndroid Build Coastguard Worker    default_route=False,
76*cfb92d14SAndroid Build Coastguard Worker    preferred=False,
77*cfb92d14SAndroid Build Coastguard Worker):
78*cfb92d14SAndroid Build Coastguard Worker    """
79*cfb92d14SAndroid Build Coastguard Worker    This function verifies that the `prefix` is present on all nodes in the `node_list`.
80*cfb92d14SAndroid Build Coastguard Worker    """
81*cfb92d14SAndroid Build Coastguard Worker    for node in node_list:
82*cfb92d14SAndroid Build Coastguard Worker        prefixes = wpan.parse_on_mesh_prefix_result(node.get(wpan.WPAN_THREAD_ON_MESH_PREFIXES))
83*cfb92d14SAndroid Build Coastguard Worker        for p in prefixes:
84*cfb92d14SAndroid Build Coastguard Worker            if p.prefix == prefix:
85*cfb92d14SAndroid Build Coastguard Worker                if (int(p.prefix_len) == prefix_len and p.is_stable() == stable and p.is_on_mesh() == on_mesh and
86*cfb92d14SAndroid Build Coastguard Worker                        p.is_def_route() == default_route and p.is_slaac() == slaac and p.is_dhcp() == dhcp and
87*cfb92d14SAndroid Build Coastguard Worker                        p.is_config() == configure and p.is_preferred() == preferred and p.priority == priority):
88*cfb92d14SAndroid Build Coastguard Worker                    break
89*cfb92d14SAndroid Build Coastguard Worker        else:
90*cfb92d14SAndroid Build Coastguard Worker            raise wpan.VerifyError("Did not find prefix {} on node {}".format(prefix, node))
91*cfb92d14SAndroid Build Coastguard Worker
92*cfb92d14SAndroid Build Coastguard Worker
93*cfb92d14SAndroid Build Coastguard Workerdef verify_no_prefix(node_list, prefix):
94*cfb92d14SAndroid Build Coastguard Worker    """
95*cfb92d14SAndroid Build Coastguard Worker    This function verifies that the `prefix` is NOT present on any node in the `node_list`.
96*cfb92d14SAndroid Build Coastguard Worker    """
97*cfb92d14SAndroid Build Coastguard Worker    for node in node_list:
98*cfb92d14SAndroid Build Coastguard Worker        prefixes = wpan.parse_on_mesh_prefix_result(node.get(wpan.WPAN_THREAD_ON_MESH_PREFIXES))
99*cfb92d14SAndroid Build Coastguard Worker        for p in prefixes:
100*cfb92d14SAndroid Build Coastguard Worker            verify(not p.prefix == prefix)
101*cfb92d14SAndroid Build Coastguard Worker
102*cfb92d14SAndroid Build Coastguard Worker
103*cfb92d14SAndroid Build Coastguard Worker# -----------------------------------------------------------------------------------------------------------------------
104*cfb92d14SAndroid Build Coastguard Worker# Creating `wpan.Nodes` instances
105*cfb92d14SAndroid Build Coastguard Worker
106*cfb92d14SAndroid Build Coastguard Workerspeedup = 4
107*cfb92d14SAndroid Build Coastguard Workerwpan.Node.set_time_speedup_factor(speedup)
108*cfb92d14SAndroid Build Coastguard Worker
109*cfb92d14SAndroid Build Coastguard Workerr1 = wpan.Node()
110*cfb92d14SAndroid Build Coastguard Workerr2 = wpan.Node()
111*cfb92d14SAndroid Build Coastguard Workerc2 = wpan.Node()
112*cfb92d14SAndroid Build Coastguard Worker
113*cfb92d14SAndroid Build Coastguard Workerall_nodes = [r1, r2, c2]
114*cfb92d14SAndroid Build Coastguard Worker
115*cfb92d14SAndroid Build Coastguard Worker# -----------------------------------------------------------------------------------------------------------------------
116*cfb92d14SAndroid Build Coastguard Worker# Init all nodes
117*cfb92d14SAndroid Build Coastguard Worker
118*cfb92d14SAndroid Build Coastguard Workerwpan.Node.init_all_nodes()
119*cfb92d14SAndroid Build Coastguard Worker
120*cfb92d14SAndroid Build Coastguard Worker# -----------------------------------------------------------------------------------------------------------------------
121*cfb92d14SAndroid Build Coastguard Worker# Build network topology
122*cfb92d14SAndroid Build Coastguard Worker
123*cfb92d14SAndroid Build Coastguard Workerr1.form('slaac-test')
124*cfb92d14SAndroid Build Coastguard Worker
125*cfb92d14SAndroid Build Coastguard Workerr1.allowlist_node(r2)
126*cfb92d14SAndroid Build Coastguard Workerr2.allowlist_node(r1)
127*cfb92d14SAndroid Build Coastguard Worker
128*cfb92d14SAndroid Build Coastguard Workerr2.join_node(r1, node_type=wpan.JOIN_TYPE_ROUTER)
129*cfb92d14SAndroid Build Coastguard Worker
130*cfb92d14SAndroid Build Coastguard Workerc2.allowlist_node(r2)
131*cfb92d14SAndroid Build Coastguard Workerr2.allowlist_node(c2)
132*cfb92d14SAndroid Build Coastguard Worker
133*cfb92d14SAndroid Build Coastguard Workerc2.join_node(r2, node_type=wpan.JOIN_TYPE_END_DEVICE)
134*cfb92d14SAndroid Build Coastguard Worker
135*cfb92d14SAndroid Build Coastguard Worker# -----------------------------------------------------------------------------------------------------------------------
136*cfb92d14SAndroid Build Coastguard Worker# Test implementation
137*cfb92d14SAndroid Build Coastguard Worker
138*cfb92d14SAndroid Build Coastguard Worker# This test covers the SLAAC address management by `wpantund`. So before starting the test we ensure that SLAAC module
139*cfb92d14SAndroid Build Coastguard Worker# on NCP is disabled on all nodes
140*cfb92d14SAndroid Build Coastguard Worker
141*cfb92d14SAndroid Build Coastguard Workerfor node in all_nodes:
142*cfb92d14SAndroid Build Coastguard Worker    node.set(wpan.WPAN_OT_SLAAC_ENABLED, 'false')
143*cfb92d14SAndroid Build Coastguard Worker    verify(node.get(wpan.WPAN_OT_SLAAC_ENABLED) == 'false')
144*cfb92d14SAndroid Build Coastguard Worker
145*cfb92d14SAndroid Build Coastguard WorkerWAIT_INTERVAL = 5
146*cfb92d14SAndroid Build Coastguard Worker
147*cfb92d14SAndroid Build Coastguard WorkerPREFIX = 'fd00:abba:beef:cafe::'
148*cfb92d14SAndroid Build Coastguard Worker
149*cfb92d14SAndroid Build Coastguard Workerr1.add_prefix(PREFIX, stable=True, on_mesh=True, slaac=True)
150*cfb92d14SAndroid Build Coastguard Worker
151*cfb92d14SAndroid Build Coastguard Worker# Verify that all nodes get the prefix and add the SLAAC address
152*cfb92d14SAndroid Build Coastguard Worker
153*cfb92d14SAndroid Build Coastguard Worker
154*cfb92d14SAndroid Build Coastguard Workerdef check_prefix_and_slaac_address_are_added():
155*cfb92d14SAndroid Build Coastguard Worker    verify_prefix(all_nodes, PREFIX, stable=True, on_mesh=True, slaac=True)
156*cfb92d14SAndroid Build Coastguard Worker    verify_address(all_nodes, PREFIX)
157*cfb92d14SAndroid Build Coastguard Worker
158*cfb92d14SAndroid Build Coastguard Worker
159*cfb92d14SAndroid Build Coastguard Workerwpan.verify_within(check_prefix_and_slaac_address_are_added, WAIT_INTERVAL)
160*cfb92d14SAndroid Build Coastguard Worker
161*cfb92d14SAndroid Build Coastguard Worker# Reset r1 and check that prefix and SLAAC address are re-added
162*cfb92d14SAndroid Build Coastguard Workerr1.reset()
163*cfb92d14SAndroid Build Coastguard Workerwpan.verify_within(check_prefix_and_slaac_address_are_added, WAIT_INTERVAL)
164*cfb92d14SAndroid Build Coastguard Worker
165*cfb92d14SAndroid Build Coastguard Worker# Remove the prefix on r1 and verify that the address and prefix are
166*cfb92d14SAndroid Build Coastguard Worker# removed on all nodes.
167*cfb92d14SAndroid Build Coastguard Workerr1.remove_prefix(PREFIX)
168*cfb92d14SAndroid Build Coastguard Worker
169*cfb92d14SAndroid Build Coastguard Worker
170*cfb92d14SAndroid Build Coastguard Workerdef check_prefix_and_slaac_address_are_removed():
171*cfb92d14SAndroid Build Coastguard Worker    verify_no_prefix(all_nodes, PREFIX)
172*cfb92d14SAndroid Build Coastguard Worker    verify_no_address(all_nodes, PREFIX)
173*cfb92d14SAndroid Build Coastguard Worker
174*cfb92d14SAndroid Build Coastguard Worker
175*cfb92d14SAndroid Build Coastguard Workerwpan.verify_within(check_prefix_and_slaac_address_are_removed, WAIT_INTERVAL)
176*cfb92d14SAndroid Build Coastguard Worker
177*cfb92d14SAndroid Build Coastguard Worker# Add prefix on r2
178*cfb92d14SAndroid Build Coastguard Workerr2.add_prefix(PREFIX, stable=True, on_mesh=True, slaac=True)
179*cfb92d14SAndroid Build Coastguard Workerwpan.verify_within(check_prefix_and_slaac_address_are_added, WAIT_INTERVAL)
180*cfb92d14SAndroid Build Coastguard Worker
181*cfb92d14SAndroid Build Coastguard Worker# Add same prefix on r1 and verify prefix and addresses stay as before
182*cfb92d14SAndroid Build Coastguard Workerr1.add_prefix(PREFIX, stable=True, on_mesh=True, slaac=True)
183*cfb92d14SAndroid Build Coastguard Workerwpan.verify_within(check_prefix_and_slaac_address_are_added, WAIT_INTERVAL)
184*cfb92d14SAndroid Build Coastguard Worker
185*cfb92d14SAndroid Build Coastguard Worker# Remove on r1, addresses and prefixes should stay as before (r2 still has
186*cfb92d14SAndroid Build Coastguard Worker# the same prefix)
187*cfb92d14SAndroid Build Coastguard Workerr1.remove_prefix(PREFIX)
188*cfb92d14SAndroid Build Coastguard Workertime.sleep(0.5)
189*cfb92d14SAndroid Build Coastguard Workerwpan.verify_within(check_prefix_and_slaac_address_are_added, WAIT_INTERVAL)
190*cfb92d14SAndroid Build Coastguard Worker
191*cfb92d14SAndroid Build Coastguard Worker# Remove the prefix on r2 and verify that the address and prefix are now
192*cfb92d14SAndroid Build Coastguard Worker# removed on all nodes.
193*cfb92d14SAndroid Build Coastguard Workerr2.remove_prefix(PREFIX)
194*cfb92d14SAndroid Build Coastguard Workerwpan.verify_within(check_prefix_and_slaac_address_are_removed, WAIT_INTERVAL)
195*cfb92d14SAndroid Build Coastguard Worker
196*cfb92d14SAndroid Build Coastguard Worker# Add prefix on r1 without SLAAC flag, and or r2 with SLAAC flag
197*cfb92d14SAndroid Build Coastguard Workerr1.add_prefix(PREFIX, stable=True, on_mesh=True, slaac=False)
198*cfb92d14SAndroid Build Coastguard Workerr2.add_prefix(PREFIX, stable=True, on_mesh=True, slaac=True)
199*cfb92d14SAndroid Build Coastguard Workerwpan.verify_within(check_prefix_and_slaac_address_are_added, WAIT_INTERVAL)
200*cfb92d14SAndroid Build Coastguard Worker
201*cfb92d14SAndroid Build Coastguard Worker# Now remove the prefix on r2 and verify that SLAAC address is removed
202*cfb92d14SAndroid Build Coastguard Workerr2.remove_prefix(PREFIX)
203*cfb92d14SAndroid Build Coastguard Worker
204*cfb92d14SAndroid Build Coastguard Worker
205*cfb92d14SAndroid Build Coastguard Workerdef check_slaac_address_is_removed():
206*cfb92d14SAndroid Build Coastguard Worker    verify_no_address(all_nodes, PREFIX)
207*cfb92d14SAndroid Build Coastguard Worker
208*cfb92d14SAndroid Build Coastguard Worker
209*cfb92d14SAndroid Build Coastguard Workerwpan.verify_within(check_slaac_address_is_removed, WAIT_INTERVAL)
210*cfb92d14SAndroid Build Coastguard Worker
211*cfb92d14SAndroid Build Coastguard Workerr1.remove_prefix(PREFIX)
212*cfb92d14SAndroid Build Coastguard Workerwpan.verify_within(check_prefix_and_slaac_address_are_removed, WAIT_INTERVAL)
213*cfb92d14SAndroid Build Coastguard Worker
214*cfb92d14SAndroid Build Coastguard Worker# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
215*cfb92d14SAndroid Build Coastguard Worker
216*cfb92d14SAndroid Build Coastguard WorkerIP_ADDRESS = PREFIX + "1234"
217*cfb92d14SAndroid Build Coastguard Worker
218*cfb92d14SAndroid Build Coastguard Worker# Explicitly add an address with the prefix on r1
219*cfb92d14SAndroid Build Coastguard Workerr1.add_ip6_address_on_interface(IP_ADDRESS)
220*cfb92d14SAndroid Build Coastguard Worker
221*cfb92d14SAndroid Build Coastguard Worker# Afterwards, add the prefix on r2 (with SLAAC flag)
222*cfb92d14SAndroid Build Coastguard Workerr2.add_prefix(PREFIX, stable=True, on_mesh=True, slaac=True)
223*cfb92d14SAndroid Build Coastguard Workerwpan.verify_within(check_prefix_and_slaac_address_are_added, WAIT_INTERVAL)
224*cfb92d14SAndroid Build Coastguard Worker
225*cfb92d14SAndroid Build Coastguard Worker# Verify that on r1 we do see the user-added address
226*cfb92d14SAndroid Build Coastguard Workerr1_addrs = wpan.parse_list(r1.get(wpan.WPAN_IP6_ALL_ADDRESSES))
227*cfb92d14SAndroid Build Coastguard Workerverify(IP_ADDRESS in r1_addrs)
228*cfb92d14SAndroid Build Coastguard Worker
229*cfb92d14SAndroid Build Coastguard Worker# Also verify that adding the prefix did not add a SLAAC address for same
230*cfb92d14SAndroid Build Coastguard Worker# prefix on r1
231*cfb92d14SAndroid Build Coastguard Workerr1_addrs.remove(IP_ADDRESS)
232*cfb92d14SAndroid Build Coastguard Workerverify(all([not addr.startswith(PREFIX[:-1]) for addr in r1_addrs]))
233*cfb92d14SAndroid Build Coastguard Worker
234*cfb92d14SAndroid Build Coastguard Worker# Remove the PREFIX on r2
235*cfb92d14SAndroid Build Coastguard Workerr2.remove_prefix(PREFIX)
236*cfb92d14SAndroid Build Coastguard Worker
237*cfb92d14SAndroid Build Coastguard Worker
238*cfb92d14SAndroid Build Coastguard Workerdef check_ip6_addresses():
239*cfb92d14SAndroid Build Coastguard Worker    # Verify that SLAAC addresses are removed on r2 and c2
240*cfb92d14SAndroid Build Coastguard Worker    verify_no_address([r2, c2], PREFIX)
241*cfb92d14SAndroid Build Coastguard Worker    # And that user-added address matching the preifx is not removed on r1
242*cfb92d14SAndroid Build Coastguard Worker    r1_addrs = wpan.parse_list(r1.get(wpan.WPAN_IP6_ALL_ADDRESSES))
243*cfb92d14SAndroid Build Coastguard Worker    verify(IP_ADDRESS in r1_addrs)
244*cfb92d14SAndroid Build Coastguard Worker
245*cfb92d14SAndroid Build Coastguard Worker
246*cfb92d14SAndroid Build Coastguard Workerwpan.verify_within(check_ip6_addresses, WAIT_INTERVAL)
247*cfb92d14SAndroid Build Coastguard Worker
248*cfb92d14SAndroid Build Coastguard Worker# Send from r2 to r1 using the user-added address verifying that address
249*cfb92d14SAndroid Build Coastguard Worker# is present on NCP
250*cfb92d14SAndroid Build Coastguard WorkerIP_ADDRESS_2 = PREFIX + "2"
251*cfb92d14SAndroid Build Coastguard Workerr2.add_ip6_address_on_interface(IP_ADDRESS_2)
252*cfb92d14SAndroid Build Coastguard Workersender = r2.prepare_tx(IP_ADDRESS_2, IP_ADDRESS, "Hello r1 from r2")
253*cfb92d14SAndroid Build Coastguard Workerrecver = r1.prepare_rx(sender)
254*cfb92d14SAndroid Build Coastguard Workerwpan.Node.perform_async_tx_rx()
255*cfb92d14SAndroid Build Coastguard Workerverify(sender.was_successful)
256*cfb92d14SAndroid Build Coastguard Workerverify(recver.was_successful)
257*cfb92d14SAndroid Build Coastguard Worker
258*cfb92d14SAndroid Build Coastguard Worker# -----------------------------------------------------------------------------------------------------------------------
259*cfb92d14SAndroid Build Coastguard Worker# Test finished
260*cfb92d14SAndroid Build Coastguard Worker
261*cfb92d14SAndroid Build Coastguard Workerwpan.Node.finalize_all_nodes()
262*cfb92d14SAndroid Build Coastguard Worker
263*cfb92d14SAndroid Build Coastguard Workerprint('\'{}\' passed.'.format(test_name))
264