[PATCH 44/52] y2038: Add test coverage

Adhemerval Zanella adhemerval.zanella@linaro.org
Mon Mar 8 13:12:55 GMT 2021



On 05/03/2021 21:13, Joseph Myers wrote:
> On Fri, 5 Mar 2021, Adhemerval Zanella via Libc-alpha wrote:
> 
>> It is enabled through a new rule, tests-y2038, which is built only
>> when the ABI supports the comapt 64-bit time_t (defined by the
>> header time64-compat.h, which also enables the creation of the
>> symbol Version for Linux).  It means the tests are not built
>> for ABI which already provide default 64-bit time_t.
> 
> I'm not convinced it's correct not to build them for ABIs that already 
> have 64-bit time_t.  _TIME_BITS=64 should work, and do nothing, for such 
> ABIs; it seems useful to build and run the tests to verify that the 
> headers don't have any incorrect redirections in that case, for example.

I was not sure about enabling or not the tests for ABI with already
support 64 bit time as default (my initial approach was to enable them
to all ABIs).  If we prefer, I can re-enabled it regardless.

I disabled because of two reasons:

  1. Different than LFS where redirections does happen for ABI with 
     64-bit off_t as default; _TIME_BITS=64 is really a no-op for
     such ABIS (there is no redirection involved, neither any new type or
     type redefinition).
     It means that issues on 64-bit time_t default ABI that might happen
     will mostly likely trigger build issues (like type mismatch or symbol
     redirection to nonexistent symbol).   It also speed up the glibc test
     on such architectures.

  2. It is simpler to handle systems (Hurd) that do not support 64-bit
     time_t as well.

> 
> (On the other hand, if any systems - Hurd? - don't get support for 64-bit 
> time, it's correct not to build the tests for such systems.)
> 
The patch already does it.


More information about the Libc-alpha mailing list