]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: drop unnecessary sleep 31247/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 8 Feb 2024 03:55:07 +0000 (12:55 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 9 Feb 2024 05:25:54 +0000 (14:25 +0900)
Now, 'Reload' dbus method is synchronous. It is not necessary to wait
for link enter configuring state.

test/test-network/systemd-networkd-tests.py
test/units/testsuite-74.networkctl.sh

index 1700732e343acc3e68b6b79b47a596c0292f34b8..41c4c550625af04c4cedba8b89bed2f485ee28c3 100755 (executable)
@@ -789,12 +789,8 @@ def networkctl_json(*args):
 def networkctl_reconfigure(*links):
     networkctl('reconfigure', *links)
 
-def networkctl_reload(sleep_time=1):
+def networkctl_reload():
     networkctl('reload')
-    # 'networkctl reload' asynchronously reconfigure links.
-    # Hence, we need to wait for a short time for link to be in configuring state.
-    if sleep_time > 0:
-        time.sleep(sleep_time)
 
 def resolvectl(*args):
     return check_output(*(resolvectl_cmd + list(args)), env=env)
index 06a3c39e776a6c60971a3583ffcc619d6a05329f..6cd5267b721abe94da7d78d1c12573aa83a15a71 100755 (executable)
@@ -104,7 +104,6 @@ networkctl cat @test2:network | cmp - <(networkctl cat "$NETWORK_NAME")
 EDITOR='cp' script -ec 'networkctl edit @test2 --drop-in test2.conf' /dev/null
 cmp "+4" "/etc/systemd/network/${NETWORK_NAME}.d/test2.conf"
 
-sleep 1
 (! EDITOR='true' script -ec 'networkctl edit @test2 --runtime --drop-in test2.conf' /dev/null)
 
 ip_link="$(ip link show test2)"