[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
+13 -8
View File
@@ -105,13 +105,17 @@ class OtbrDocker:
'--cap-add=NET_ADMIN',
'--volume',
f'{self._rcp_device}:/dev/ttyUSB0',
'-v',
'/tmp/codecov.bash:/tmp/codecov.bash',
config.OTBR_DOCKER_IMAGE,
'-B',
config.BACKBONE_IFNAME,
],
stdin=subprocess.DEVNULL,
stdout=sys.stdout,
stderr=sys.stderr)
launch_docker_deadline = time.time() + 60
launch_docker_deadline = time.time() + 300
launch_ok = False
while time.time() < launch_docker_deadline:
@@ -121,7 +125,7 @@ class OtbrDocker:
logging.info("OTBR Docker %s Is Ready!", self._docker_name)
break
except subprocess.CalledProcessError:
time.sleep(0.2)
time.sleep(5)
continue
assert launch_ok
@@ -155,8 +159,7 @@ class OtbrDocker:
if COVERAGE or OTBR_COVERAGE:
self.bash('service otbr-agent stop')
self.bash('curl https://codecov.io/bash -o codecov_bash --retry 5')
codecov_cmd = 'bash codecov_bash -Z'
codecov_cmd = 'bash /tmp/codecov.bash -Z'
# Upload OTBR code coverage if OTBR_COVERAGE=1, otherwise OpenThread code coverage.
if not OTBR_COVERAGE:
codecov_cmd += ' -R third_party/openthread/repo'
@@ -381,9 +384,6 @@ class OtCli:
serialPort = '/dev/ttyUSB%d' % ((nodeid - 1) * 2)
self.pexpect = fdpexpect.fdspawn(os.open(serialPort, os.O_RDWR | os.O_NONBLOCK | os.O_NOCTTY))
def __del__(self):
self.destroy()
def destroy(self):
if not self._initialized:
return
@@ -609,6 +609,11 @@ class NodeImpl:
self.send_command(cmd)
self._expect('Done')
def commissioner_state(self):
states = [r'disabled', r'petitioning', r'active']
self.send_command('commissioner state')
return self._expect_result(states)
def commissioner_add_joiner(self, addr, psk):
cmd = 'commissioner joiner add %s %s' % (addr, psk)
self.send_command(cmd)
@@ -1904,7 +1909,7 @@ class Node(NodeImpl, OtCli):
class LinuxHost():
PING_RESPONSE_PATTERN = re.compile(r'\d+ bytes from .*:.*')
ETH_DEV = 'eth0'
ETH_DEV = config.BACKBONE_IFNAME
def get_ether_addrs(self):
output = self.bash(f'ip -6 addr list dev {self.ETH_DEV}')