test: use /run/ for temporary files in TEST-07-PID1.issue-14566
And delete the file before starting, to be safe against reruns
Follow-up for c1566ef0d2
This commit is contained in:
@@ -2,6 +2,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
sleep infinity &
|
||||
echo $! >/leakedtestpid
|
||||
echo $! >/run/leakedtestpid
|
||||
systemd-notify --ready
|
||||
wait $!
|
||||
|
||||
@@ -13,10 +13,11 @@ if [[ -v ASAN_OPTIONS ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
rm -f /run/leakedtestpid
|
||||
systemctl start issue14566-repro
|
||||
systemctl status issue14566-repro
|
||||
|
||||
leaked_pid=$(cat /leakedtestpid)
|
||||
leaked_pid=$(cat /run/leakedtestpid)
|
||||
|
||||
systemctl stop issue14566-repro
|
||||
timeout 30 bash -c 'while systemctl is-active issue14566-repro; do sleep .5; done'
|
||||
|
||||
Reference in New Issue
Block a user