]> git.ipfire.org Git - thirdparty/systemd.git/commit
test: include MAINPID in notify message in TEST-50-DISSECT for notify socket
authorLuca Boccassi <luca.boccassi@gmail.com>
Sat, 14 Dec 2024 16:44:40 +0000 (16:44 +0000)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 15 Dec 2024 00:07:57 +0000 (09:07 +0900)
commit498c20fad6a472dfbbfacc1ed55754f9ebfa869e
tree2342c5c44043d0234e0fb30e3f6ed58c4e5a55bd
parentc5f95bc19b227cd5294502fa36638052c62a7760
test: include MAINPID in notify message in TEST-50-DISSECT for notify socket

Copy what systemd-notify does by default by setting it to the PID of the shell,
so that main process tracking works as expected. Also use test -S instead of ls
to check socket.

[   33.980396] (sh)[1024]: run-p1022-i1322.service: Executing: sh -c "echo READY=1 | ncat --unixsock --udp \$NOTIFY_SOCKET --source /run/notify && env"
[   34.138778] systemd[1]: run-p1022-i1322.service: Child 1024 belongs to run-p1022-i1322.service.
[   34.138825] systemd[1]: run-p1022-i1322.service: Main process exited, code=exited, status=0/SUCCESS (success)
[   34.139451] systemd[1]: run-p1022-i1322.service: Failed with result 'protocol'.
[   34.139559] systemd[1]: run-p1022-i1322.service: Service will not restart (restart setting)
[   34.139573] systemd[1]: run-p1022-i1322.service: Changed start -> failed
[   34.139945] systemd[1]: run-p1022-i1322.service: Job 1364 run-p1022-i1322.service/start finished, result=failed

Fixes #35619

Follow-up for 18bb30c3b2ea7f4497edf86414133667b3e155fe
test/units/TEST-50-DISSECT.dissect.sh