summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-12-09 00:39:33 +0900
committerFrantisek Sumsal <frantisek@sumsal.cz>2019-12-08 19:52:01 +0000
commitbc942f69aa49b320d8ad385ac89b2fbb00c18e9c (patch)
tree2996e6726aa843b4d7dbd6af02f354ba3620902c
parent84043bfd74c5d1dcbcf9c24d60dda56a81bd22c0 (diff)
downloadsystemd-bc942f69aa49b320d8ad385ac89b2fbb00c18e9c.tar.gz
test-network: make test_bind_carrier more stable
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index fb31a65125..7f63e59ed9 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -1991,13 +1991,14 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
self.assertRegex(output, 'default via 2607:5300:203:39ff:ff:ff:ff:ff proto static')
def test_bind_carrier(self):
+ check_output('ip link add dummy98 type dummy')
+ check_output('ip link set dummy98 up')
+ time.sleep(2)
+
copy_unit_to_networkd_unit_path('25-bind-carrier.network', '11-dummy.netdev')
start_networkd()
self.wait_online(['test1:routable'])
- check_output('ip link add dummy98 type dummy')
- check_output('ip link set dummy98 up')
- time.sleep(2)
output = check_output('ip address show test1')
print(output)
self.assertRegex(output, 'UP,LOWER_UP')
@@ -2021,7 +2022,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
self.assertRegex(output, 'inet 192.168.10.30/24 brd 192.168.10.255 scope global test1')
self.check_operstate('test1', 'routable')
- check_output('ip link del dummy99')
+ check_output('ip link set dummy99 down')
time.sleep(2)
output = check_output('ip address show test1')
print(output)
@@ -2030,8 +2031,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
self.assertNotRegex(output, '192.168.10')
self.check_operstate('test1', 'off')
- check_output('ip link add dummy98 type dummy')
- check_output('ip link set dummy98 up')
+ check_output('ip link set dummy99 up')
time.sleep(2)
output = check_output('ip address show test1')
print(output)