]> git.ipfire.org Git - thirdparty/systemd.git/commit
test: fix flaky TEST-07-PID1.socket-defer.sh
authorLuca Boccassi <luca.boccassi@gmail.com>
Fri, 8 May 2026 15:16:04 +0000 (16:16 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 11 May 2026 08:59:00 +0000 (10:59 +0200)
commitd3f436aa101a793ac2fd30af7d8d398071ef1ff4
tree5f56585ba3c11935692dbf61faedb6cce6ae4bbf
parentcd57308303ecffaef01a5b27d7fa4ef7e7d6a9ce
test: fix flaky TEST-07-PID1.socket-defer.sh

The socket's SubState transitions from 'running' to 'listening' shortly
after the triggered service becomes inactive, so the assert can race and
observe the stale 'running' state:

[ 1882.425335] systemd[1]: TEST-07-PID1-socket-defer-23279.service: Changed dead -> running
[ 1882.495150] TEST-07-PID1.sh[20535]: ++ systemctl show TEST-07-PID1-socket-defer-23279.socket -P SubState
[ 1882.514239] TEST-07-PID1.sh[20509]: + assert_eq running listening
[ 1882.510529] systemd[1]: TEST-07-PID1-socket-defer-23279.socket: Flushing socket before listening.
[ 1882.510559] systemd[1]: TEST-07-PID1-socket-defer-23279.socket: Changed running -> listening

Poll for 30s instead of directly asserting to try and make it more robust
test/units/TEST-07-PID1.socket-defer.sh