summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-07-12 09:28:53 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-07-15 17:15:25 +0900
commit571f953934ad8369a1ef2761d6da1e03d3bbd48a (patch)
treea8a4675462d07d07a7b6f985135e28aa9e2039a7 /test
parent39373cb98425a7499ea65a1344947808035388d6 (diff)
downloadsystemd-571f953934ad8369a1ef2761d6da1e03d3bbd48a.tar.gz
test-network: wait for addresses are not in tentative state
Diffstat (limited to 'test')
-rwxr-xr-xtest/networkd-test.py2
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/networkd-test.py b/test/networkd-test.py
index 618237161a..b225694819 100755
--- a/test/networkd-test.py
+++ b/test/networkd-test.py
@@ -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:
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index 31ef04af8a..2d7f915850 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -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)