From 682a42891f81cf6346adbcdf6fc4061923777349 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 29 Jun 2026 12:02:41 +0100 Subject: [PATCH] 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 c1566ef0d22ed786b9ecf4c476e53b8a91e67578 --- .../TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.sh | 2 +- test/units/TEST-07-PID1.issue-14566.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.sh b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.sh index ec0268e891..6a85ce608f 100755 --- a/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.sh +++ b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.sh @@ -2,6 +2,6 @@ # SPDX-License-Identifier: LGPL-2.1-or-later sleep infinity & -echo $! >/leakedtestpid +echo $! >/run/leakedtestpid systemd-notify --ready wait $! diff --git a/test/units/TEST-07-PID1.issue-14566.sh b/test/units/TEST-07-PID1.issue-14566.sh index 05fade9c4c..66d07bab84 100755 --- a/test/units/TEST-07-PID1.issue-14566.sh +++ b/test/units/TEST-07-PID1.issue-14566.sh @@ -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'