[Y2038] Question about porting y2038-tests to glibc

Carlos O'Donell carlos@redhat.com
Fri Oct 30 12:30:57 GMT 2020


On 10/30/20 5:44 AM, Lukasz Majewski wrote:
> 1. Best case - add self contained glibc tests for Y2038 compliance to
> build-many-glibcs.py, so those would be invoked each time we run this
> script. However, it would require adding/building qemu to this build
> system. Of course it would be best to have time namespaces supporting
> CLOCK_REALTIME, but we don't know when (or if) it will be added.
> 
> Pros:
> - Regression tests are run each time build-many-glibc is executed.
> 
> Cons:
> - Linux time namespaces doesn't support CLOCK_REALTIME
> - qemu would need to be added to CI glibc setup

 
> 3. Add tests to glibc source base - and use QEMU emulated complete
> system (glibc under test, Linux 5.1+, rootfs). Then use
> glibc/src/scripts/cross-test-ssh.sh (as described here:
> https://github.com/lmajewski/meta-y2038/blob/master/README)
> 
> This is the setup which I do use now.
> 
> Pros:
> - No modification to glibc current CI setup (i.e. build-many-glibcs.py)
> 
> Cons:
> - Performance and robustness (SSHfs exported directory)
> - Need to maintain QEMU based meta layer to build complete system to
>   just test a few time related syscalls

My technical opinion is as follows:

* We should be open to expanding what build-many-glibcs.py does,
  and providing options to select which operations are carried
  out, including new QEMU tests.

* Using QEMU user is OK in build-many-glibcs.py, but there may be
  false positives due to QEMU emulation of syscalls because of the
  host kernel.

* Using QEMU system in build-many-glibcs.py is even better, and
  would be a gold standard IMO.

-- 
Cheers,
Carlos.



More information about the Libc-help mailing list