summaryrefslogtreecommitdiffstats
path: root/test/units/testsuite-47.sh
blob: ff10602df79295ef315b32a065de19434aa04a2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eux
set -o pipefail

systemd-analyze log-level debug
systemd-analyze log-target console

systemctl start testsuite-47-repro
sleep 4
systemctl status testsuite-47-repro

leaked_pid=$(cat /leakedtestpid)

systemctl stop testsuite-47-repro
sleep 4

# Leaked PID will still be around if we're buggy.
# I personally prefer to see 42.
ps -p "$leaked_pid" && exit 42

systemd-analyze log-level info

echo OK >/testok

exit 0