]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: wait for bound interface to be processed by udevd
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 1 Nov 2022 21:49:26 +0000 (06:49 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 1 Nov 2022 23:24:01 +0000 (08:24 +0900)
If another bound interface (dummy98) will be removed before that dummy99
is processed by udevd, then removing dummy98 in the next step makes the
target interface (test1) bring down.

Follow-up for 3e2f7c46da528775f90c521e4cf22c2f61f82a81.

test/test-network/systemd-networkd-tests.py

index 3fc0ad957e8fe7d4b3f0c1f1765dd354a56506b7..752a5e419481b682a01d0a80436803192251d097 100755 (executable)
@@ -3176,6 +3176,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         # add another bound interface. The interface is still up.
         check_output('ip link add dummy99 type dummy')
         check_output('ip link set dummy99 up')
+        self.wait_operstate('dummy99', 'degraded', setup_state='unmanaged')
         output = check_output('ip address show test1')
         print(output)
         self.assertIn('UP,LOWER_UP', output)