fstests: add support for ext2 filesystem testing
PATCH 1/1 fstests: add support for ext2 filesystem testing
Add comprehensive ext2 filesystem testing support to the fstests workflow. This enables running the xfstests test suite against ext2 filesystems with different block size configurations.
The implementation includes:
- Add FSTESTS_EXT2 option to the main fstests Kconfig choice block
- Create ext2-specific Kconfig with manual coverage selection and test sections for different block sizes (defaults, 1k, 2k, 4k)
- Add ext2.config template for fstests configuration generation
- Create ext2 defconfig for easy deployment with all test sections enabled
- Integrate ext2 menu into the main fstests Kconfig structure
The ext2 test sections cover the standard block size variations that are commonly tested for ext2 filesystems. Unlike ext4, ext2 doesn't support advanced features like bigalloc, so the configuration is simpler and focuses on core block size testing.
This follows the established patterns used by other filesystems in kdevops, making it consistent with existing XFS, Btrfs, ext4, NFS, CIFS, and tmpfs implementations.
--- defconfigs/ext2 | 23 ++++++ .../roles/fstests/templates/ext2/ext2.config | 28 +++++++ workflows/fstests/Kconfig | 12 +++ workflows/fstests/ext2/Kconfig | 73 +++++++++++++++++++ 4 files changed, 136 insertions(+) create mode 100644 defconfigs/ext2 create mode 100644 playbooks/roles/fstests/templates/ext2/ext2.config create mode 100644 workflows/fstests/ext2/Kconfig
defconfigs/ext2 new file +23 -0
@@ -0,0 +1,23 @@ +CONFIG_GUESTFS=y +CONFIG_LIBVIRT=y + +CONFIG_WORKFLOWS=y +CONFIG_WORKFLOW_LINUX_CUSTOM=y + +CONFIG_BOOTLINUX=y +CONFIG_BOOTLINUX_9P=y + +CONFIG_WORKFLOWS_TESTS=y +CONFIG_WORKFLOWS_LINUX_TESTS=y +CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y +CONFIG_KDEVOPS_WORKFLOW_DEDICATE_FSTESTS=y +CONFIG_KDEVOPS_WORKFLOW_ENABLE_FSTESTS=y + +CONFIG_FSTESTS_EXT2=y +CONFIG_FSTESTS_FSTYP="ext2" +CONFIG_FSTESTS_EXT2_SECTION_DEFAULTS=y +CONFIG_FSTESTS_EXT2_SECTION_1K=y +CONFIG_FSTESTS_EXT2_SECTION_2K=y +CONFIG_FSTESTS_EXT2_SECTION_4K=y + +CONFIG_DEVCONFIG_ENABLE_SYSTEMD_JOURNAL_REMOTE=y
playbooks/roles/fstests/templates/ext2/ext2.config new file +28 -0
@@ -0,0 +1,28 @@ +# Automatically generated file by kdevops +[default] +FSTYP=ext2 +TEST_DIR={{ fstests_test_dir }} +SCRATCH_MNT={{ fstests_scratch_mnt }} +RESULT_BASE=$PWD/results/$HOST/$(uname -r) +DUMP_CORRUPT_FS=1 +CANON_DEVS=yes + +[ext2_defaults] +TEST_DEV={{ fstests_test_dev }} +SCRATCH_DEV_POOL="{{ fstests_scratch_devpool }}" +MKFS_OPTIONS='-F' + +[ext2_1k] +TEST_DEV={{ fstests_test_dev }} +SCRATCH_DEV_POOL="{{ fstests_scratch_devpool }}" +MKFS_OPTIONS='-F -b 1024' + +[ext2_2k] +TEST_DEV={{ fstests_test_dev }} +SCRATCH_DEV_POOL="{{ fstests_scratch_devpool }}" +MKFS_OPTIONS='-F -b 2048' + +[ext2_4k] +TEST_DEV={{ fstests_test_dev }} +SCRATCH_DEV_POOL="{{ fstests_scratch_devpool }}" +MKFS_OPTIONS='-F -b 4096'
workflows/fstests/Kconfig +12 -0
@@ -74,6 +74,11 @@ config FSTESTS_EXT4 help This will target testing the ext4 filesystem. +config FSTESTS_EXT2 + bool "ext2" + help + This will target testing the ext2 filesystem. + config FSTESTS_NFS bool "nfs" select FSTESTS_NFS_ENABLE
@@ -101,6 +106,7 @@ config FSTESTS_FSTYP default "xfs" if FSTESTS_XFS default "btrfs" if FSTESTS_BTRFS default "ext4" if FSTESTS_EXT4 + default "ext2" if FSTESTS_EXT2 default "nfs" if FSTESTS_NFS default "cifs" if FSTESTS_CIFS default "tmpfs" if FSTESTS_TMPFS
@@ -286,6 +292,12 @@ endmenu endif # FSTESTS_EXT4 +if FSTESTS_EXT2 +menu "Configure how to test ext2" +source "workflows/fstests/ext2/Kconfig" +endmenu +endif # FSTESTS_EXT2 + if FSTESTS_NFS menu "Configure how nfs should be tested"
workflows/fstests/ext2/Kconfig new file +73 -0
73 lines not on this page · raw message
Signature · 1 line
2.45.2
Quoted 12 lines · Luis Chamberlain
Add comprehensive ext2 filesystem testing support to the fstests workflow. This enables running the xfstests test suite against ext2 filesystems with different block size configurations.
The implementation includes:
- AddFSTESTS_EXT2option to the main fstestsKconfigchoice block
- Create ext2-specificKconfigwith manual coverage selection and test sections for different block sizes (defaults, 1k, 2k, 4k)
- Add ext2.config template for fstests configuration generation
- Create ext2 defconfig for easy deployment with all test sections enabled
- Integrate ext2 menu into the main fstestsKconfigstructure
Quoted 8 lines
The ext2 test sections cover the standard block size variations that are commonly tested for ext2 filesystems. Unlike ext4, ext2 doesn't support advanced features like bigalloc, so the configuration is simpler and focuses on core block size testing.
This follows the established patterns used by other filesystems in kdevops, making it consistent with existing XFS, Btrfs, ext4, NFS, CIFS, and tmpfs implementations.
Random thought: The patch could also allow "ext2" to be a choice for CONFIG_NFSD_EXPORT_FSTYPE and CONFIG_SMBD_SHARE_FSTYPE, since fstests targeting NFS or SMB can make use of ext2 on a shared file system.
Quoted 193 lines
Generated-by Claude AISigned-off-by Luis Chamberlain <[email protected]>--- defconfigs/ext2 | 23 ++++++ .../roles/fstests/templates/ext2/ext2.config | 28 +++++++ workflows/fstests/Kconfig | 12 +++ workflows/fstests/ext2/Kconfig | 73 +++++++++++++++++++ 4 files changed, 136 insertions(+) create mode 100644 defconfigs/ext2 create mode 100644 playbooks/roles/fstests/templates/ext2/ext2.config create mode 100644 workflows/fstests/ext2/Kconfigdefconfigs/ext2 new file +23
-0@@ -0,0 +1,23 @@ +CONFIG_GUESTFS=y +CONFIG_LIBVIRT=y + +CONFIG_WORKFLOWS=y +CONFIG_WORKFLOW_LINUX_CUSTOM=y + +CONFIG_BOOTLINUX=y +CONFIG_BOOTLINUX_9P=y + +CONFIG_WORKFLOWS_TESTS=y +CONFIG_WORKFLOWS_LINUX_TESTS=y +CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y +CONFIG_KDEVOPS_WORKFLOW_DEDICATE_FSTESTS=y +CONFIG_KDEVOPS_WORKFLOW_ENABLE_FSTESTS=y + +CONFIG_FSTESTS_EXT2=y +CONFIG_FSTESTS_FSTYP="ext2" +CONFIG_FSTESTS_EXT2_SECTION_DEFAULTS=y +CONFIG_FSTESTS_EXT2_SECTION_1K=y +CONFIG_FSTESTS_EXT2_SECTION_2K=y +CONFIG_FSTESTS_EXT2_SECTION_4K=y + +CONFIG_DEVCONFIG_ENABLE_SYSTEMD_JOURNAL_REMOTE=yplaybooks/roles/fstests/templates/ext2/ext2.config new file +28
-0@@ -0,0 +1,28 @@ +# Automatically generated file by kdevops +[default] +FSTYP=ext2 +TEST_DIR={{ fstests_test_dir }} +SCRATCH_MNT={{ fstests_scratch_mnt }} +RESULT_BASE=$PWD/results/$HOST/$(uname -r) +DUMP_CORRUPT_FS=1 +CANON_DEVS=yes + +[ext2_defaults] +TEST_DEV={{ fstests_test_dev }} +SCRATCH_DEV_POOL="{{ fstests_scratch_devpool }}" +MKFS_OPTIONS='-F' + +[ext2_1k] +TEST_DEV={{ fstests_test_dev }} +SCRATCH_DEV_POOL="{{ fstests_scratch_devpool }}" +MKFS_OPTIONS='-F -b 1024' + +[ext2_2k] +TEST_DEV={{ fstests_test_dev }} +SCRATCH_DEV_POOL="{{ fstests_scratch_devpool }}" +MKFS_OPTIONS='-F -b 2048' + +[ext2_4k] +TEST_DEV={{ fstests_test_dev }} +SCRATCH_DEV_POOL="{{ fstests_scratch_devpool }}" +MKFS_OPTIONS='-F -b 4096'workflows/fstests/Kconfig +12
-0@@ -74,6 +74,11 @@ config FSTESTS_EXT4 help This will target testing the ext4 filesystem. +config FSTESTS_EXT2 + bool "ext2" + help + This will target testing the ext2 filesystem. + config FSTESTS_NFS bool "nfs" select FSTESTS_NFS_ENABLE@@ -101,6 +106,7 @@ config FSTESTS_FSTYP default "xfs" if FSTESTS_XFS default "btrfs" if FSTESTS_BTRFS default "ext4" if FSTESTS_EXT4 + default "ext2" if FSTESTS_EXT2 default "nfs" if FSTESTS_NFS default "cifs" if FSTESTS_CIFS default "tmpfs" if FSTESTS_TMPFS@@ -286,6 +292,12 @@ endmenu endif # FSTESTS_EXT4 +if FSTESTS_EXT2 +menu "Configure how to test ext2" +source "workflows/fstests/ext2/Kconfig" +endmenu +endif # FSTESTS_EXT2 + if FSTESTS_NFS menu "Configure how nfs should be tested"workflows/fstests/ext2/Kconfig new file +73
-0@@ -0,0 +1,73 @@ +# Distributions actively maintaining ext2 support should select this and then +# be careful to select any of the other HAVE_DISTRO_EXT2_* below so that +# testers can know what to test for. +config HAVE_DISTRO_EXT2_PREFERS_MANUAL + bool + default n + +config FSTESTS_EXT2_MANUAL_COVERAGE + bool "Enable manual coverage selection" + default y if HAVE_DISTRO_EXT2_PREFERS_MANUAL + default n if !HAVE_DISTRO_EXT2_PREFERS_MANUAL + help + By default we aim to spawn enough hosts to cover testing the full + range of supported features upstream on the Linux kernel for ext2, + and for you to also be able to do development on each section + concurrently. Distributions however may override sensible defaults + and only support certain features. Enabling this option lets you + select and test only specific configurations. + + By default we enables all tests, but certain distributions may + disable certain features and as such don't need to run certain + type of tests. + + You can enable this to allow you to override the default test + coverage. + +if FSTESTS_EXT2_MANUAL_COVERAGE + +config FSTESTS_EXT2_SECTION_DEFAULTS + bool "Enable testing section: ext2_defaults" + help + Enabling this will test ext2 with the default options for the mkfs.ext2 + to create the filesystem. + +config FSTESTS_EXT2_SECTION_1K + bool "Enable testing section: ext2_1k" + help + Enabling this will test ext2 with the default options for the mkfs.ext2 + to create the filesystem but with 1k block size. + +config FSTESTS_EXT2_SECTION_2K + bool "Enable testing section: ext2_2k" + help + Enabling this will test ext2 with the default options for the mkfs.ext2 + to create the filesystem but with 2k block size. + +config FSTESTS_EXT2_SECTION_4K + bool "Enable testing section: ext2_4k" + help + Enabling this will test ext2 with the default options for the mkfs.ext2 + to create the filesystem but with 4k block size. + +endif # FSTESTS_EXT2_MANUAL_COVERAGE + +if !FSTESTS_EXT2_MANUAL_COVERAGE + +config FSTESTS_EXT2_SECTION_DEFAULTS + bool + default y + +config FSTESTS_EXT2_SECTION_1K + bool + default y + +config FSTESTS_EXT2_SECTION_2K + bool + default y + +config FSTESTS_EXT2_SECTION_4K + bool + default y + +endif # !FSTESTS_EXT2_MANUAL_COVERAGE
Signature · 1 line
Chuck Lever