summaryrefslogtreecommitdiff
path: root/test/test-network/systemd-networkd-tests.py
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-01-18 18:53:42 +0900
committerFrantisek Sumsal <frantisek@sumsal.cz>2023-01-18 14:08:14 +0000
commitdf0a741cdd7549ca8ceb4a3acf294dd7bf87a2c1 (patch)
tree44ffbe9ae45a1d4bf2a2b555d8dde69985e2d18b /test/test-network/systemd-networkd-tests.py
parent11b6d7cba9309812070116b49bc670fefa31d05c (diff)
downloadsystemd-df0a741cdd7549ca8ceb4a3acf294dd7bf87a2c1.tar.gz
test-network: reprocess the loopback network interface
Fixes the issue reported at https://github.com/systemd/systemd-centos-ci/pull/585#issuecomment-1385537641.
Diffstat (limited to 'test/test-network/systemd-networkd-tests.py')
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index 12c7a1391e..4b62a30c9c 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -1070,6 +1070,10 @@ class NetworkctlTests(unittest.TestCase, Utilities):
self.assertRegex(output, r'Link File: /run/systemd/network/25-default.link')
self.assertRegex(output, r'Network File: /run/systemd/network/11-dummy.network')
+ # This test may be run on the system that has older udevd than 70f32a260b5ebb68c19ecadf5d69b3844896ba55 (v249).
+ # In that case, the udev DB for the loopback network interface may already have ID_NET_LINK_FILE property.
+ # Let's reprocess the interface and drop the property.
+ check_output(*udevadm_cmd, 'trigger', '--settle', '--action=add', '/sys/class/net/lo')
output = check_output(*networkctl_cmd, '-n', '0', 'status', 'lo', env=env)
print(output)
self.assertRegex(output, r'Link File: n/a')