From: Daan De Meyer Date: Wed, 20 May 2026 08:52:21 +0000 (+0000) Subject: test-path: Fail earlier on start-limit-hit X-Git-Tag: v261-rc1~64^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb69a3c59dcd0dac67dc758429bfbe5980209d0e;p=thirdparty%2Fsystemd.git test-path: Fail earlier on start-limit-hit --- diff --git a/src/test/test-path.c b/src/test/test-path.c index 512eb96ead6..d9e11fd0294 100644 --- a/src/test/test-path.c +++ b/src/test/test-path.c @@ -118,6 +118,17 @@ static int _check_states(unsigned line, exit(EXIT_TEST_SKIP); } + /* SERVICE_FAILURE_START_LIMIT_HIT is terminal: the unit won't recover without an explicit + * reset, so further looping is pointless. Abort the subtest rather than burning the 30s + * timeout. */ + if (service->state == SERVICE_FAILED && + service->result == SERVICE_FAILURE_START_LIMIT_HIT) + return log_notice_errno(SYNTHETIC_ERRNO(ECANCELED), + "Failed to start service %s, aborting test: %s/%s", + UNIT(service)->id, + service_state_to_string(service->state), + service_result_to_string(service->result)); + if (n >= end) { log_error("Test timeout when testing %s", UNIT(path)->id); exit(EXIT_FAILURE);