Skip to content

Commit 4be7e8b

Browse files
authored
[tests] allow service bind9 stop to fail (openthread#11438)
1 parent ffb8e4d commit 4be7e8b

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

tests/scripts/thread-cert/border_router/internet/test_multi_border_routers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def test(self):
100100
# ensure NAT64 is enabled here.
101101
br1.nat64_set_enabled(True)
102102
self.simulator.go(config.LEADER_STARTUP_DELAY)
103-
br1.bash("service bind9 stop")
103+
br1.bash("service bind9 stop || true")
104104
self.simulator.go(NAT64_PREFIX_REFRESH_DELAY)
105105
self.assertEqual('leader', br1.get_state())
106106

@@ -167,7 +167,7 @@ def test(self):
167167
# Case 3. Re-enables BR2 with a local prefix and it will not add
168168
# its local nat64 prefix to Network Data.
169169
#
170-
br2.bash("service bind9 stop")
170+
br2.bash("service bind9 stop || true")
171171
self.simulator.go(5)
172172
br2.nat64_set_enabled(True)
173173

tests/scripts/thread-cert/border_router/internet/test_single_border_router.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def test(self):
123123
# ensure NAT64 is enabled here.
124124
br.nat64_set_enabled(True)
125125
self.simulator.go(config.LEADER_STARTUP_DELAY)
126-
br.bash("service bind9 stop")
126+
br.bash("service bind9 stop || true")
127127
self.simulator.go(330)
128128
self.assertEqual('leader', br.get_state())
129129

tests/scripts/thread-cert/border_router/internet/test_upstream_dns.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def test(self):
9191
self._start_dns_server(dns_server_2, TEST_DOMAIN_2, TEST_DOMAIN_IP6_ADDRESSES_2)
9292

9393
# Disable the bind9 service on the BR otherwise bind9 may respond to Thread devices' DNS queries
94-
br.bash('service bind9 stop')
94+
br.bash('service bind9 stop || true')
9595

9696
br.start()
9797
self.simulator.go(config.LEADER_STARTUP_DELAY)
@@ -144,7 +144,7 @@ def _start_dns_server(self, dns_server, test_domain, test_domain_ip6_addresses):
144144
''' + '\n'.join(f'@ IN AAAA {addr}' for addr in test_domain_ip6_addresses)
145145

146146
dns_server.start(start_radvd=False)
147-
dns_server.bash('service bind9 stop')
147+
dns_server.bash('service bind9 stop || true')
148148

149149
dns_server.bash(shlex.join(['echo', test_domain_bind_conf]) + ' >> /etc/bind/named.conf.local')
150150
dns_server.bash(shlex.join(['echo', test_domain_bind_zone]) + ' >> /etc/bind/db.test.domain')

tests/scripts/thread-cert/border_router/internet/test_with_infrastructure_prefix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def test(self):
157157
self.simulator.go(5)
158158

159159
# Case 5 Infrastructure nat64 prefix no longer presents
160-
br.bash("service bind9 stop")
160+
br.bash("service bind9 stop || true")
161161
self.simulator.go(NAT64_PREFIX_REFRESH_DELAY)
162162

163163
local_nat64_prefix = br.get_br_nat64_prefix()

0 commit comments

Comments
 (0)