bh> Seen e.g. on NetBSD 10.0.

Which doesn't support subsecond mtimes?

    jb> Maybe the best answer is to test for subsecond timestamp
    granularity first, and then only do the slow test to distinguish
    between 1-second and 2-second granularity if the subsecond
    granularity test gives a negative result?

Unfortunately, that is already the case. The function
(_AM_FILESYSTEM_TIMESTAMP_RESOLUTION in m4/sanity.m4) does the tests
starting with .01, then .1, then 1. Searching for sleep [012] in Bruno's
log confirms this.

If I understand correctly, Bruno's goal is to omit the "1" test if we
can detect that we're not on a fat filesystem. But I admit I don't like
trying to inspect filesystem types. That way lies madness, it seems to
me, and this whole function is already maddening enough. E.g., mount
and/or df could hang if NFS is involved.

It seems to me that using stat doesn't help because it's not available
by default on the bsds etc., as Bruno pointed out. 

The simple change is to omit the make test if we are at resolution 1.
That will save 4 seconds. Omitting it is justified because the make test
is only there for the sake of makes that are broken wrt subsecond
timestamps. I will do that.

That will leave 2+ sec of sleeping, but if we are to reliably support
fat, I don't see a good alternative. At least it's not as bad as 6+.
Any other ideas?

karl

Reply via email to