test-network: wait for addresses are not in tentative state

This commit is contained in:
Yu Watanabe 2020-07-12 09:28:53 +09:00
parent 39373cb984
commit 571f953934
2 changed files with 2 additions and 2 deletions

View File

@ -376,7 +376,7 @@ DHCP={}
# 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:

View File

@ -557,7 +557,7 @@ class Utilities():
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)