[mlr] send BMLR.ntf on Backbone link (#5388)

This commit enhances Backbone Router to send BMLR.ntf on the backbone
link for Multicast Listeners.
- Send BMLR.ntf to the Backbone link
- Add Backbone test with packet verification
- Includes some revision to the Thread 1.2 Backbone CI scripts to make
  it more stable
This commit is contained in:
Simon Lin
2020-09-29 22:37:33 -07:00
committed by GitHub
parent aa6abe1535
commit 809947e1f9
13 changed files with 301 additions and 24 deletions
+15 -1
View File
@@ -36,7 +36,7 @@ import sys
import time
import traceback
import unittest
from typing import Optional
from typing import Optional, Callable
import config
import debug
@@ -474,3 +474,17 @@ class TestCase(NcpSupportMixin, unittest.TestCase):
mergecap = pvutils.which_mergecap()
self.assure_run_ok(f'{mergecap} -w {merged_pcap} {thread_pcap} {backbone_pcap}', shell=True)
return merged_pcap
def wait_until(self, cond: Callable[[], bool], timeout: int, go_interval: int = 1):
while True:
self.simulator.go(go_interval)
if cond():
break
timeout -= go_interval
if timeout <= 0:
raise RuntimeError(f'wait failed after {timeout} seconds')
def wait_node_state(self, nodeid: int, state: str, timeout: int):
self.wait_until(lambda: self.nodes[nodeid].get_state() == state, timeout)