mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
core: add varlink Reload/Reexecute methods
Same as the D-Bus ones
This commit is contained in:
@@ -89,6 +89,9 @@ systemctl daemon-reload
|
||||
# The timeout will hit (and the test will fail) if the reloads are not rate-limited
|
||||
timeout 15 bash -c 'while systemctl daemon-reload --no-block; do true; done'
|
||||
|
||||
# Same for varlink, rate limiting is shared
|
||||
timeout 15 bash -c 'while varlinkctl call --timeout=1 /run/systemd/io.systemd.Manager io.systemd.Manager.Reload '{}'; do true; done'
|
||||
|
||||
# Rate limit should reset after 9s
|
||||
sleep 10
|
||||
|
||||
@@ -96,6 +99,7 @@ systemctl daemon-reload
|
||||
|
||||
# Same test for reexec, but we wait here
|
||||
timeout 15 bash -c 'while systemctl daemon-reexec; do true; done'
|
||||
timeout 15 bash -c 'while varlinkctl call --timeout=infinity /run/systemd/io.systemd.Manager io.systemd.Manager.Reload '{}'; do true; done'
|
||||
|
||||
# Rate limit should reset after 9s
|
||||
sleep 10
|
||||
|
||||
@@ -184,6 +184,9 @@ rm /tmp/describe1.json /tmp/describe2.json
|
||||
varlinkctl info /run/systemd/io.systemd.Manager
|
||||
varlinkctl introspect /run/systemd/io.systemd.Manager io.systemd.Manager
|
||||
varlinkctl call /run/systemd/io.systemd.Manager io.systemd.Manager.Describe '{}'
|
||||
varlinkctl call /run/systemd/io.systemd.Manager io.systemd.Manager.Reload '{}'
|
||||
# This will disconnect and fail, as the manager reexec and drops connections
|
||||
varlinkctl call /run/systemd/io.systemd.Manager io.systemd.Manager.Reexecute '{}' ||:
|
||||
|
||||
# test io.systemd.Network
|
||||
varlinkctl info /run/systemd/netif/io.systemd.Network
|
||||
|
||||
Reference in New Issue
Block a user