From 4bc771d0614de18ca4d0b1312e5e12666c7e00d5 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 8 Feb 2024 12:55:07 +0900 Subject: [PATCH] test: drop unnecessary sleep Now, 'Reload' dbus method is synchronous. It is not necessary to wait for link enter configuring state. --- test/test-network/systemd-networkd-tests.py | 6 +----- test/units/testsuite-74.networkctl.sh | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 1700732e34..41c4c55062 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -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) diff --git a/test/units/testsuite-74.networkctl.sh b/test/units/testsuite-74.networkctl.sh index 06a3c39e77..6cd5267b72 100755 --- a/test/units/testsuite-74.networkctl.sh +++ b/test/units/testsuite-74.networkctl.sh @@ -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)" -- 2.25.1