mbox

[0/5] More stat fixes

Message ID 20210319183121.2252064-1-adhemerval.zanella@linaro.org
Headers

Message

Adhemerval Zanella Netto March 19, 2021, 6:31 p.m. UTC
  This patchset fixes 2 issues recently found with newer stat tests
(s390-32 missing nanoseconds support on legacy stat calls and
MIPSn64 y2106 limitation), adds the __ASSUME_STATX optimization
on fstatat/fstatat64, and improve the 64 bit timestamp tests on
Linux.

I have checked on i686-linux-gnu and x86_64-linux-gnu
(kernel 5.4 x86_64-64) and on powerpc-linux-gnu and
(kernel 5.10 ppc64).

I also tested the utimensat tests on mips64el on two kernels:
4.1.4 (without statx support) and 5.10 (with statx support).
On 4.1.4 kernel the tst-utime now shows the missing y2106
support:

| $ ./testrun mist/tst-utime
| warning: skipping tests[3] { 100000000, fffffffe }: unsupported timestamp value
| warning: skipping tests[4] { 100000001, 100000002 }: unsupported timestamp value

While on a 5.10 kernel all the tests pass without any warning.

Adhemerval Zanella (5):
  linux: Implement fstatat with __fstatat64_time64
  linux: Disable fstatat64 fallback if __ASSUME_STATX is defined
  linux: Use statx for MIPSn64
  support: Add support_path_support_time64_value
  linux: Add y2106 support on utimensat tests

 support/support.h                             | 11 ++-
 support/support_path_support_time64.c         | 10 +-
 sysdeps/unix/sysv/linux/fstatat.c             | 52 +++--------
 sysdeps/unix/sysv/linux/fstatat64.c           | 82 +++++++++++++----
 sysdeps/unix/sysv/linux/fxstat64.c            |  1 +
 sysdeps/unix/sysv/linux/mips/kernel_stat.h    |  4 +
 sysdeps/unix/sysv/linux/statx_cp.c            | 29 ------
 sysdeps/unix/sysv/linux/tst-futimens.c        | 63 ++-----------
 sysdeps/unix/sysv/linux/tst-utime.c           | 63 ++-----------
 .../unix/sysv/linux/tst-utimensat-skeleton.c  | 92 +++++++++++++++++++
 sysdeps/unix/sysv/linux/tst-utimes.c          | 68 +++-----------
 11 files changed, 212 insertions(+), 263 deletions(-)
 create mode 100644 sysdeps/unix/sysv/linux/tst-utimensat-skeleton.c