[LTP] [PATCH v5 0/3] Fix ioctl_ficlone(range) failures on certain FS
Andrea Cervesato
andrea.cervesato@suse.de
Wed Oct 9 16:02:39 CEST 2024
Filesystems implementing copy-on-write are usually supported by the kernel
from a certain version. This is the case of XFS which carried an
experimental support for CoW from 4.9 until 4.16.
At the same time, some mkfs tools might not support CoW before a certain
version. This is the case of mkfs.xfs < 1.5.0.
For these reasons, this LTP patch series is meant to cover a particular
scenario, where kernel and mkfs tools versions have to be cross-checked
in order to run ioctl_ficlone(range) tests.
Two new flags have been added to the tst_fs struct:
- mkfs_ver: test the mkfs tool version before using it and eventually
skip test if it's not satisfied
- min_kver: test the minimum kernel version and skip the test if running
kernel is too old
Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
Changes in v5:
- alphabetical order for JSON lookup table
- better handling of op string in tst_cmd.c
- Link to v4: https://lore.kernel.org/r/20241008-ioctl_ficlone01_fix-v4-0-eae3adac33c9@suse.com
Changes in v4:
- change error message for min kernel and fs
- fix return when only one FS is given
- sort lookup table for tst_fs struct
- Link to v3: https://lore.kernel.org/r/20241002-ioctl_ficlone01_fix-v3-0-7e077918dfd4@suse.com
Changes in v3:
- invert skip flag logic in check_kver and tst_check_cmd, so now it
TBROK if defined
- test skip if FS is not supported by kernel
- remove bcachefs version check
- Link to v2: https://lore.kernel.org/r/20241001-ioctl_ficlone01_fix-v2-0-dd0b021dd31d@suse.com
Changes in v2:
- add mkfs_ver
- add min_kver
- fix mkfs.xfs version when using CoW
- fix bcachefs version
- Link to v1: https://lore.kernel.org/r/20240924-ioctl_ficlone01_fix-v1-1-7741e2e13cc2@suse.com
---
Andrea Cervesato (3):
Filter mkfs version in tst_fs
Add minimum kernel requirement for FS setup
Setup minimal kernel for ioctl_clone(range) tests
include/tst_private.h | 6 +-
include/tst_test.h | 9 ++
lib/tst_cmd.c | 131 +++++++++------------
lib/tst_test.c | 40 +++++--
testcases/kernel/syscalls/ioctl/ioctl_ficlone01.c | 4 +-
testcases/kernel/syscalls/ioctl/ioctl_ficlone03.c | 4 +-
.../kernel/syscalls/ioctl/ioctl_ficlonerange01.c | 4 +-
.../kernel/syscalls/ioctl/ioctl_ficlonerange02.c | 4 +-
testcases/lib/tst_run_shell.c | 10 ++
9 files changed, 123 insertions(+), 89 deletions(-)
---
base-commit: 701212f08d6e850457cc2b10238f28662ef48471
change-id: 20240924-ioctl_ficlone01_fix-88a17ef58543
Best regards,
--
Andrea Cervesato <andrea.cervesato@suse.com>
More information about the ltp
mailing list