[LTP] [PATCH v6 0/7] file_setattr/file_getattr testing suite

Andrea Cervesato andrea.cervesato@suse.de
Thu Aug 7 09:01:38 CEST 2025


This testing suite is validating file_getattr and file_setattr
syscalls, introducing tests for error validation and basic
functionalities. These features have been introduced in the kernel 6.17.

https://lore.kernel.org/lkml/20250725-vfs-fileattr-fcfc534aac44@brauner/

Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
Changes in v6:
- HAVE_FILE_GETATTR/HAVE_FILE_SETATTR
- file_attr01: use FILE_ATTR_SIZE_VER0
- Link to v5: https://lore.kernel.org/r/20250805-file_setattr_getattr-v5-0-2bc4d18e0033@suse.com

Changes in v5:
- file_attr04: only check for ENOTDIR
- Link to v4: https://lore.kernel.org/r/20250805-file_setattr_getattr-v4-0-08e23354abc8@suse.com

Changes in v4:
- import <linux/fs.h> in lapi/fs.h via HAVE_LINUX_FS
- file_attr01: initialize variables via .bufs and add one more test case
  for invalid usize
- file_attr02: avoid setting file desc to -1
- file_attr03: make use of AT_FWD
- add file_attr04 test
- Link to v3: https://lore.kernel.org/r/20250805-file_setattr_getattr-v3-0-67a7747d226c@suse.com

Changes in v3:
- fix fallback for fsxattr flags attributes
- Link to v2: https://lore.kernel.org/r/20250804-file_setattr_getattr-v2-0-651e50ec59e7@suse.com

Changes in v2:
- remove unrelated files
- fix fs.h ifndef
- Link to v1: https://lore.kernel.org/r/20250804-file_setattr_getattr-v1-0-6a43c3962c87@suse.com

---
Andrea Cervesato (7):
      Update LTP to the latest syscalls
      fs: add struct fsxattr fallback definitions
      fs: add file_setattr/file_getattr fallback definitions
      Add file_attr01 test
      Add file_attr02 test
      Add file_attr03 test
      Add file_attr04 test

 configure.ac                                      |   6 +
 include/lapi/fs.h                                 |  70 ++++++++-
 include/lapi/syscalls/arc.in                      |   7 +
 include/lapi/syscalls/arm.in                      |   7 +
 include/lapi/syscalls/arm64.in                    |   7 +
 include/lapi/syscalls/i386.in                     |   7 +
 include/lapi/syscalls/loongarch64.in              |   7 +
 include/lapi/syscalls/mips64.in                   |   7 +
 include/lapi/syscalls/mips64n32.in                |   7 +
 include/lapi/syscalls/mipso32.in                  |   7 +
 include/lapi/syscalls/parisc.in                   |   7 +
 include/lapi/syscalls/powerpc.in                  |   7 +
 include/lapi/syscalls/powerpc64.in                |   7 +
 include/lapi/syscalls/s390.in                     |   7 +
 include/lapi/syscalls/s390x.in                    |   7 +
 include/lapi/syscalls/sh.in                       |   7 +
 include/lapi/syscalls/sparc.in                    |   7 +
 include/lapi/syscalls/sparc64.in                  |   7 +
 include/lapi/syscalls/x86_64.in                   |   7 +
 runtest/syscalls                                  |   5 +
 testcases/kernel/syscalls/file_attr/.gitignore    |   4 +
 testcases/kernel/syscalls/file_attr/Makefile      |   8 +
 testcases/kernel/syscalls/file_attr/file_attr01.c | 178 ++++++++++++++++++++++
 testcases/kernel/syscalls/file_attr/file_attr02.c |  92 +++++++++++
 testcases/kernel/syscalls/file_attr/file_attr03.c |  76 +++++++++
 testcases/kernel/syscalls/file_attr/file_attr04.c |  62 ++++++++
 26 files changed, 619 insertions(+), 1 deletion(-)
---
base-commit: e59c60ff44bfc50a360838cc2819e693f3741d75
change-id: 20250801-file_setattr_getattr-74963fd52b05

Best regards,
-- 
Andrea Cervesato <andrea.cervesato@suse.com>



More information about the ltp mailing list