]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: dummy interface is initially down when activation policy is manual
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 27 Jan 2022 22:17:08 +0000 (07:17 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 27 Jan 2022 22:17:08 +0000 (07:17 +0900)
test/test-network/systemd-networkd-tests.py

index 0b17a58d065494e9c8106c51aae559674634794b..c53092562a5eb42dfa9d99ef6ae3de9144329e90 100755 (executable)
@@ -3075,10 +3075,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         start_networkd()
 
         always = test.startswith('always')
-        if test == 'manual':
-            initial_up = 'UP' in check_output('ip link show test1')
-        else:
-            initial_up = not test.endswith('down') # note: default is up
+        initial_up = test != 'manual' and not test.endswith('down') # note: default is up
         expect_up = initial_up
         next_up = not expect_up