From 6cd1842e330fb313c4f02dd9f55709b8cc10eef5 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 2 Jun 2025 19:45:02 +0100 Subject: [PATCH] test: send monotonic timestamp rather than unix seconds for MONOTONIC_USEC= argument Follow-up for 3998b30a040d1494918e11c78ef3eae72532bbca --- test/units/TEST-50-DISSECT.dissect.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/units/TEST-50-DISSECT.dissect.sh b/test/units/TEST-50-DISSECT.dissect.sh index 163311e6403..8cfeeb66d4c 100755 --- a/test/units/TEST-50-DISSECT.dissect.sh +++ b/test/units/TEST-50-DISSECT.dissect.sh @@ -652,7 +652,8 @@ ExtensionDirectories=-${VDIR} NotifyAccess=all ExecStart=bash -c ' \ trap '"'"' \ - printf "RELOADING=1\\nMONOTONIC_USEC=\$\${EPOCHREALTIME/[^0-9]/}" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \ + 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; \ (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; \ @@ -686,7 +687,8 @@ ExtensionDirectories=-${VDIR} NotifyAccess=all ExecStart=bash -c ' \ trap '"'"' \ - printf "RELOADING=1\\nMONOTONIC_USEC=\$\${EPOCHREALTIME/[^0-9]/}" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \ + 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; \ (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; \ @@ -715,7 +717,8 @@ PrivateUsers=yes NotifyAccess=all ExecStart=bash -c ' \ trap '"'"' \ - printf "RELOADING=1\\nMONOTONIC_USEC=\$\${EPOCHREALTIME/[^0-9]/}" | socat -t 5 - UNIX-SENDTO:\$\$NOTIFY_SOCKET; \ + 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; \ (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; \ -- 2.47.3