mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
test-network: wait for addresses are not in tentative state
This commit is contained in:
parent
39373cb984
commit
571f953934
|
@ -376,7 +376,7 @@ DHCP={}
|
||||||
# IPv6, but we want to wait for both
|
# IPv6, but we want to wait for both
|
||||||
for _ in range(10):
|
for _ in range(10):
|
||||||
out = subprocess.check_output(['ip', 'a', 'show', 'dev', self.iface])
|
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
|
break
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -557,7 +557,7 @@ class Utilities():
|
||||||
if i > 0:
|
if i > 0:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
output = check_output(f'ip {ipv} address show dev {link} scope {scope}')
|
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
|
break
|
||||||
else:
|
else:
|
||||||
self.assertRegex(output, address_regex)
|
self.assertRegex(output, address_regex)
|
||||||
|
|
Loading…
Reference in a new issue