1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00
systemd/test/units/testsuite-47.sh

26 lines
443 B
Bash
Raw Normal View History

2020-03-20 21:57:54 +03:00
#!/usr/bin/env bash
set -eux
set -o pipefail
systemd-analyze log-level debug
systemd-analyze log-target console
2020-03-20 21:57:54 +03:00
systemctl start testsuite-47-repro
sleep 4
2020-03-20 21:57:54 +03:00
systemctl status testsuite-47-repro
leaked_pid=$(cat /leakedtestpid)
2020-03-20 21:57:54 +03:00
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