systemctl: Implement --wait for kill command
TEST-26-SYSTEMCTL is racy as we call systemctl is-active immediately after systemctl kill. Let's implement --wait for systemctl kill and use it in TEST-26-SYSTEMCTL to avoid the race.
This commit is contained in:
@@ -141,7 +141,7 @@ systemctl reload -T "$UNIT_NAME"
|
||||
systemctl restart -T "$UNIT_NAME"
|
||||
systemctl try-restart --show-transaction "$UNIT_NAME"
|
||||
systemctl try-reload-or-restart --show-transaction "$UNIT_NAME"
|
||||
systemctl kill "$UNIT_NAME"
|
||||
timeout 10 systemctl kill --wait "$UNIT_NAME"
|
||||
(! systemctl is-active "$UNIT_NAME")
|
||||
systemctl restart "$UNIT_NAME"
|
||||
systemctl is-active "$UNIT_NAME"
|
||||
|
||||
Reference in New Issue
Block a user