about summary refs log tree commit diff
path: root/debian/tests
diff options
context:
space:
mode:
authorLukas Märdian <lukas.maerdian@canonical.com>2021-02-08 17:31:24 +0100
committerSebastien Bacher <seb128@ubuntu.com>2021-02-08 17:31:24 +0100
commitd146a0c31be889a6062220c285a2defa5811b8cc (patch)
treedb25b66b62b090f2067d4a7a9a3a10fcf1f5cf7c /debian/tests
parent8f15fa2707ac08152d876ff192c765690b0640f9 (diff)
tests: fix nm.py with new systemd
Diffstat (limited to 'debian/tests')
-rw-r--r--debian/tests/network_test_base.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/debian/tests/network_test_base.py b/debian/tests/network_test_base.py
index 9ef8dec3..ffbd60df 100644
--- a/debian/tests/network_test_base.py
+++ b/debian/tests/network_test_base.py
@@ -99,6 +99,11 @@ class NetworkTestBase(unittest.TestCase):
         klass.dev_w_client = devs[1]
 
         # determine and store MAC addresses
+        # Creation of the veths introduces a race with newer versions of
+        # systemd, as it  will change the initial MAC address after the device
+        # was created and networkd took control. Give it some time, so we read
+        # the correct MAC address
+        time.sleep(0.1)
         with open('/sys/class/net/%s/address' % klass.dev_w_ap) as f:
             klass.mac_w_ap = f.read().strip().upper()
         with open('/sys/class/net/%s/address' % klass.dev_w_client) as f: