]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: wait for addresses are not in tentative state
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 12 Jul 2020 00:28:53 +0000 (09:28 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 15 Jul 2020 08:15:25 +0000 (17:15 +0900)
test/networkd-test.py
test/test-network/systemd-networkd-tests.py

index 618237161a3f18b6648b1fcb36e9b248a1163fc8..b225694819447cc06023d7ba7422275ab98a04f1 100755 (executable)
@@ -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:
index 31ef04af8a48d146272014f97890d189aadb531b..2d7f915850ed7880530652429526b4ac5b055f86 100755 (executable)
@@ -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)