From: Frantisek Sumsal Date: Tue, 19 Dec 2023 15:54:35 +0000 (+0100) Subject: test: reset systemd-resolved.service's restart counter X-Git-Tag: v256-rc1~1453 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68785c7d6a3fe27a57dac3028957910afcfe1718;p=thirdparty%2Fsystemd.git test: reset systemd-resolved.service's restart counter Otherwise we might occasionally hit the start rate limit, as we restart the service a bunch of times: [ 3702.280886] testsuite-75.sh[1135]: + tee /tmp/tmp.wUL8bkJwrt [ 3702.283684] testsuite-75.sh[1135]: {} [ 3702.284254] testsuite-75.sh[46]: + restart_resolved [ 3702.284302] testsuite-75.sh[46]: + systemctl stop systemd-resolved.service [ 3702.310678] testsuite-75.sh[1140]: + systemctl is-failed systemd-resolved.service [ 3702.316766] testsuite-75.sh[1141]: inactive [ 3702.316998] testsuite-75.sh[46]: + systemctl start systemd-resolved.service [ 3702.322315] systemd[1]: systemd-resolved.service: Start request repeated too quickly. [ 3702.322343] systemd[1]: systemd-resolved.service: Failed with result 'start-limit-hit'. [ 3702.322609] systemd[1]: Failed to start systemd-resolved.service - Network Name Resolution. [ 3702.323619] systemctl[1142]: Job for systemd-resolved.service failed. [ 3702.323839] systemctl[1142]: See "systemctl status systemd-resolved.service" and "journalctl -xeu systemd-resolved.service" for details. [ 3702.325035] systemd[1]: testsuite-75.service: Failed with result 'exit-code'. [ 3702.325391] systemd[1]: Failed to start testsuite-75.service - Tests for systemd-resolved. Follow-up for b1384db11b and 6ef512c0bb. --- diff --git a/test/units/testsuite-75.sh b/test/units/testsuite-75.sh index 093fdf94da9..54234484c46 100755 --- a/test/units/testsuite-75.sh +++ b/test/units/testsuite-75.sh @@ -52,6 +52,9 @@ monitor_check_rr() ( restart_resolved() { systemctl stop systemd-resolved.service (! systemctl is-failed systemd-resolved.service) + # Reset the restart counter since we call this method a bunch of times + # and can occasionally hit the default rate limit + systemctl reset-failed systemd-resolved.service systemctl start systemd-resolved.service systemctl service-log-level systemd-resolved.service debug }