From 2dcfcc08d93f8b41ffa2226ddad2f5ae0c6261bc Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 22 Mar 2019 05:48:12 +0900 Subject: [PATCH] test-network: use wait_online() in test_link_local_addressing() This also disables IPv6AcceptRA= to speed up the test. --- test/test-network/conf/25-link-local-addressing-yes.network | 1 + test/test-network/systemd-networkd-tests.py | 5 ++--- 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')