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:
Luca Boccassi
2026-06-29 12:03:57 +01:00
parent e9482b9ebb
commit 682a42891f
2 changed files with 3 additions and 2 deletions
@@ -2,6 +2,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
sleep infinity &
echo $! >/leakedtestpid
echo $! >/run/leakedtestpid
systemd-notify --ready
wait $!
+2 -1
View File
@@ -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'