[v4,00/13] FUSE-based testing for file system functions

Message ID cover.1725047142.git.fweimer@redhat.com
Headers
Series FUSE-based testing for file system functions |

Message

Florian Weimer Aug. 30, 2024, 7:51 p.m. UTC
  This revision addresses a reliability problems (failure during unmount)
on older kernels.  It adds a facility for generating directory streams,
and uses that to test various historic readdir and readdir_r bugs.  This
revealed a bunch of other problems, which had to be fixed to get clean
test results for dirent/tst-readdir-long in particular.

The <support/readdir.h> abstraction allows testing various readdir
variants (we have six of them on some architectures) in a single test,
with a simple for loop, instead of using skeleton files.  The new
<support/xdirent.h> header is more along traditional lines and provides
x* wrappers.

Thanks,
Florian

Florian Weimer (13):
  Bundle <linux/fuse.h> userspace header from Linux 6.10
  support: Add <support/xdirent.h>
  Linux: readdir_r needs to report getdents failures (bug 32124)
  support: Add <support/readdir.h>
  support: Add FUSE-based file system test framework to support/
  misc: FUSE-based tests for mkstemp
  io: Add FUSE-based test for fchmod
  io: Add tst-lstat-nofollow, tst-lstat-nofollow-time64
  dirent: Add tst-closedir-leaks
  Linux: Use readdir64_r for compat __old_readdir64_r (bug 32128)
  dirent: Add tst-readdir-long
  dirent: Add tst-rewinddir
  Linux: readdir64_r should not skip d_ino == 0 entries (bug 32126)

 dirent/Makefile                               |   23 +
 dirent/tst-closedir-leaks.c                   |   76 ++
 dirent/tst-readdir-long.c                     |  231 ++++
 dirent/tst-readdir-zero-inode.c               |  134 ++
 dirent/tst-rewinddir.c                        |  207 +++
 io/Makefile                                   |    3 +
 io/tst-fchmod-fuse.c                          |  114 ++
 io/tst-lstat-nofollow-time64.c                |    1 +
 io/tst-lstat-nofollow.c                       |   98 ++
 misc/Makefile                                 |    6 +
 misc/tst-mkstemp-fuse-parallel.c              |  208 +++
 misc/tst-mkstemp-fuse.c                       |  195 +++
 support/Makefile                              |   10 +
 support/bundled/README                        |    5 +
 support/bundled/linux/COPYING                 |   20 +
 .../LICENSES/exceptions/Linux-syscall-note    |   24 +
 .../bundled/linux/LICENSES/preferred/GPL-2.0  |  359 +++++
 .../bundled/linux/include/uapi/linux/fuse.h   | 1189 +++++++++++++++++
 support/fuse.h                                |  215 +++
 support/readdir.h                             |   79 ++
 support/support_fuse.c                        |  705 ++++++++++
 support/support_readdir.c                     |  287 ++++
 support/support_readdir_check.c               |   30 +
 support/support_readdir_r_check.c             |   35 +
 support/tst-support_fuse.c                    |  348 +++++
 support/tst-support_readdir.c                 |   71 +
 support/tst-xdirent.c                         |   76 ++
 support/xclosedir.c                           |   28 +
 support/xdirent.h                             |   86 ++
 support/xfdopendir.c                          |   30 +
 support/xopendir.c                            |   30 +
 sysdeps/unix/sysv/linux/getdents64.c          |   97 --
 sysdeps/unix/sysv/linux/olddirent.h           |    2 -
 sysdeps/unix/sysv/linux/readdir64.c           |   90 +-
 sysdeps/unix/sysv/linux/readdir64_r.c         |  127 +-
 sysdeps/unix/sysv/linux/readdir_r.c           |   11 +-
 36 files changed, 5016 insertions(+), 234 deletions(-)
 create mode 100644 dirent/tst-closedir-leaks.c
 create mode 100644 dirent/tst-readdir-long.c
 create mode 100644 dirent/tst-readdir-zero-inode.c
 create mode 100644 dirent/tst-rewinddir.c
 create mode 100644 io/tst-fchmod-fuse.c
 create mode 100644 io/tst-lstat-nofollow-time64.c
 create mode 100644 io/tst-lstat-nofollow.c
 create mode 100644 misc/tst-mkstemp-fuse-parallel.c
 create mode 100644 misc/tst-mkstemp-fuse.c
 create mode 100644 support/bundled/README
 create mode 100644 support/bundled/linux/COPYING
 create mode 100644 support/bundled/linux/LICENSES/exceptions/Linux-syscall-note
 create mode 100644 support/bundled/linux/LICENSES/preferred/GPL-2.0
 create mode 100644 support/bundled/linux/include/uapi/linux/fuse.h
 create mode 100644 support/fuse.h
 create mode 100644 support/readdir.h
 create mode 100644 support/support_fuse.c
 create mode 100644 support/support_readdir.c
 create mode 100644 support/support_readdir_check.c
 create mode 100644 support/support_readdir_r_check.c
 create mode 100644 support/tst-support_fuse.c
 create mode 100644 support/tst-support_readdir.c
 create mode 100644 support/tst-xdirent.c
 create mode 100644 support/xclosedir.c
 create mode 100644 support/xdirent.h
 create mode 100644 support/xfdopendir.c
 create mode 100644 support/xopendir.c


base-commit: 424d97be50488beb6196c0ff0bc3dfeb87b4281c