On 2023-07-05 18:58:13 +0200, Johannes Christ wrote:
> Is there another way to reproduce this issue?

I'm wondering whether there is a race condition in the test:

# use at command to schedule a job.
echo "echo `date` > ${WORKDIR}/${TMPFILE}" | at now + 1 minute

So the file is expected to be created 1 minute later.

Then in the script:

sleep 2

[...]

sleep 58

if grep -Fq "UTC" $WORKDIR/$TMPFILE

[...]

So the script waits for 1 minute (and some other fast commands)
before checking the existence of the file, which is the wait time
given to "at".

I can see 2 possible issues:

1. The system is a bit slow, and the job execution will take a bit
more time.

2. Time inaccuracies. What are the guaranties given by the system?

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to