]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: use /run/ for temporary files in TEST-07-PID1.issue-14566
authorLuca Boccassi <luca.boccassi@gmail.com>
Mon, 29 Jun 2026 11:02:41 +0000 (12:02 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 29 Jun 2026 11:03:57 +0000 (12:03 +0100)
And delete the file before starting, to be safe against reruns

Follow-up for c1566ef0d22ed786b9ecf4c476e53b8a91e67578

test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.sh
test/units/TEST-07-PID1.issue-14566.sh

index ec0268e8916da9d508fbb2646d88a6e4f344ce31..6a85ce608fe186a59938f6fcddf84bc57a7abc9d 100755 (executable)
@@ -2,6 +2,6 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
 sleep infinity &
-echo $! >/leakedtestpid
+echo $! >/run/leakedtestpid
 systemd-notify --ready
 wait $!
index 05fade9c4c4e0726f68c5ed47d2637857d36287d..66d07bab84d09d5a4b2ac8772db43b7984577c0d 100755 (executable)
@@ -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'