# IPv6, but we want to wait for both
for _ in range(10):
out = subprocess.check_output(['ip', 'a', 'show', 'dev', self.iface])
- if b'state UP' in out and b'inet6 2600' in out and b'inet 192.168' in out:
+ if b'state UP' in out and b'inet6 2600' in out and b'inet 192.168' in out and b'tentative' not in out:
break
time.sleep(1)
else:
if i > 0:
time.sleep(1)
output = check_output(f'ip {ipv} address show dev {link} scope {scope}')
- if re.search(address_regex, output):
+ if re.search(address_regex, output) and 'tentative' not in output:
break
else:
self.assertRegex(output, address_regex)