test: send trailing newlines in notify messages in TEST-50-DISSECT
It seems the failing test in https://github.com/systemd/systemd/issues/37626 is due to MONOTONIC_USEC= being somehow lost. Add a trailing newline when sending messages with socat, hopefully ensuring it is delivered and read.
This commit is contained in:
committed by
Yu Watanabe
parent
700c60dff1
commit
827ef318ec
@@ -653,12 +653,12 @@ NotifyAccess=all
|
||||
ExecStart=bash -x -c ' \
|
||||
trap '"'"' \
|
||||
now=\$\$(grep "^now" /proc/timer_list | cut -d" " -f3 | rev | cut -c 4- | rev); \
|
||||
printf "RELOADING=1\\nMONOTONIC_USEC=\$\${now}" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
printf "RELOADING=1\\nMONOTONIC_USEC=\$\${now}\\n" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
(ls /etc | grep marker) >/tmp/markers/50i; \
|
||||
(cat /usr/lib/os-release) >>/tmp/markers/50i; \
|
||||
echo -n "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
echo "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
'"'"' SIGHUP; \
|
||||
echo -n "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
echo "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
while true; do sleep 1; done; \
|
||||
'
|
||||
EOF
|
||||
@@ -688,12 +688,12 @@ NotifyAccess=all
|
||||
ExecStart=bash -x -c ' \
|
||||
trap '"'"' \
|
||||
now=\$\$(grep "^now" /proc/timer_list | cut -d" " -f3 | rev | cut -c 4- | rev); \
|
||||
printf "RELOADING=1\\nMONOTONIC_USEC=\$\${now}" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
printf "RELOADING=1\\nMONOTONIC_USEC=\$\${now}\\n" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
(ls /etc | grep marker) >/tmp/markers/50j; \
|
||||
(cat /usr/lib/os-release) >>/tmp/markers/50j; \
|
||||
echo -n "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
echo "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
'"'"' SIGHUP; \
|
||||
echo -n "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
echo "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
while true; do sleep 1; done; \
|
||||
'
|
||||
EOF
|
||||
@@ -718,12 +718,12 @@ NotifyAccess=all
|
||||
ExecStart=bash -x -c ' \
|
||||
trap '"'"' \
|
||||
now=\$\$(grep "^now" /proc/timer_list | cut -d" " -f3 | rev | cut -c 4- | rev); \
|
||||
printf "RELOADING=1\\nMONOTONIC_USEC=\$\${now}" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
printf "RELOADING=1\\nMONOTONIC_USEC=\$\${now}\\n" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
(ls /etc | grep marker) >/tmp/markers/50k; \
|
||||
(cat /usr/lib/os-release) >>/tmp/markers/50k; \
|
||||
echo -n "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
echo "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
'"'"' SIGHUP; \
|
||||
echo -n "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
echo "READY=1" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \
|
||||
while true; do sleep 1; done; \
|
||||
'
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user