[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-mcron] tests/schedule.sh issues
From: |
Mathieu Lirzin |
Subject: |
Re: [Bug-mcron] tests/schedule.sh issues |
Date: |
Tue, 20 Mar 2018 13:52:44 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello again,
address@hidden (Ludovic Courtès) writes:
> There’s a couple of issues with tests/schedule.sh in mcron 1.1:
>
> 1. It expects to be running in a UTC+1 timezone. I think that can be
> enforced by doing “export TZ=UTC-1”, at least on GNU systems.
For simplicity I would rather use ‘TZ=UTC0; export TZ’.
> 2. It relies on non-deterministic behavior. Specifically, the order
> in which ‘mcron --schedule’ shows the foo.guile and the bar.guile
> jobs relies on the order in which files are traversed by
> ‘for-each-file’, which is non-deterministic.
>
> The fix would be to write ‘for-each-file’ along these lines:
>
> (define (for-each-file proc directory)
> (for-each proc (scandir directory)))
>
> because ‘scandir’ sorts entries.
While we are at it maybe we can remove ‘for-each-file’ and inline
‘(for-each PROC (scandir DIRECTORY))’ where it is used, no?
Do you want to send patches fixing those issues or you prefer that I fix
it myself? Both way are fine with me.
Thanks for the report.
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37