summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-03-22 05:48:12 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-03-30 02:27:22 +0900
commit2dcfcc08d93f8b41ffa2226ddad2f5ae0c6261bc (patch)
treecbd59d40c8b4dc71e8b9f2ef36a5175c3f2c20f4 /test
parentd06f30fc73b8cbdaf719e9032d57883066ef8bae (diff)
downloadsystemd-2dcfcc08d93f8b41ffa2226ddad2f5ae0c6261bc.tar.gz
test-network: use wait_online() in test_link_local_addressing()
This also disables IPv6AcceptRA= to speed up the test.
Diffstat (limited to 'test')
-rw-r--r--test/test-network/conf/25-link-local-addressing-yes.network1
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py5
2 files changed, 3 insertions, 3 deletions
diff --git a/test/test-network/conf/25-link-local-addressing-yes.network b/test/test-network/conf/25-link-local-addressing-yes.network
index dcf2f2f7b1..8268da5aa8 100644
--- a/test/test-network/conf/25-link-local-addressing-yes.network
+++ b/test/test-network/conf/25-link-local-addressing-yes.network
@@ -3,3 +3,4 @@ Name=test1
[Network]
LinkLocalAddressing=yes
+IPv6AcceptRA=no
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index 91e03c074d..c39250caf2 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -1204,13 +1204,12 @@ class NetworkdNetWorkTests(unittest.TestCase, Utilities):
def test_link_local_addressing(self):
self.copy_unit_to_networkd_unit_path('25-link-local-addressing-yes.network', '11-dummy.netdev',
'25-link-local-addressing-no.network', '12-dummy.netdev')
- self.start_networkd()
+ self.start_networkd(0)
+ self.wait_online(['test1:degraded', 'dummy98:carrier'])
self.assertTrue(self.link_exits('test1'))
self.assertTrue(self.link_exits('dummy98'))
- time.sleep(10)
-
output = subprocess.check_output(['ip', 'address', 'show', 'dev', 'test1']).rstrip().decode('utf-8')
print(output)
self.assertRegex(output, 'inet .* scope link')