2 # SPDX-License-Identifier: LGPL-2.1-or-later
8 TESTLOG
=/test.log.XXXXXXXX
12 local service
="${1:-wait_for: missing service argument}"
13 local result
="${2:-success}"
16 while [[ ! -f /${service}.terminated
&& ! -f /${service}.success
&& $time -gt 0 ]]; do
21 if [[ ! -f /${service}.
${result} ]]; then
22 journalctl
-u "${service/_/-}.service" >>"$TESTLOG"
26 # This checks all stages, start, runtime and stop, can be extended by
31 # These check that EXTEND_TIMEOUT_USEC that occurs at greater than the
32 # extend timeout interval but less then the stage limit (TimeoutStartSec,
33 # RuntimeMaxSec, TimeoutStopSec) still succeed.
35 wait_for success_start
36 wait_for success_runtime
39 # These ensure that EXTEND_TIMEOUT_USEC will still timeout in the
40 # appropriate stage, after the stage limit, when the EXTEND_TIMEOUT_USEC
41 # message isn't sent within the extend timeout interval.
43 wait_for fail_start startfail
44 wait_for fail_stop stopfail
45 wait_for fail_runtime runtimefail
47 if [[ -f "$TESTLOG" ]]; then
49 cp "$TESTLOG" /test.log