From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EA8335971 for ; Thu, 31 Jul 2025 19:12:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753989155; cv=none; b=fj4QonEkrYnjo2XYBvtSIsD8ssMnBNRaw8Ul2BENzxB97Oq6P/u4YwJTqFtYjpHf5ClhRVGGTKS2Ma8oJReZfXbFJNUccKzTEydPLkSaGHgAzLGEPkPq7Ha8IaANUtWy0f+iPl52lbQwNltsqLcnFckSfNBfFRSndHOVHHL6bTI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753989155; c=relaxed/simple; bh=4Rqq7BmvJD41tH1CfHJ1nDcgh9ss9/6Zqncfckh+tiU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PoAB7zPWAABkgKTY/K79WGKzITwJ2++fLaxG/Tr645dP0rF6I2D6eqnOy4mZEKTIWaQN2N+Cvwm5dDVc0fYbpLZweXDCReUw7Q/dG9eYq3p65/tHUMLwrr9jsWJQRMP6oEnoI+ZKK6Nz8gBQCJ0Qlq/D6wtopWLpF/zrueM9hgI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=1+jvecW7; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="1+jvecW7" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=YcxxlsBcdvBFMxJFctG/w0cGs1JQHoYxaDkhr2Z+2k0=; b=1+jvecW7MugO82mTg5hwPkA7aY RlOE2vYmQPxhuTnlFCaEXHMfmFQDe4+gZgPKRk+30U8HkkKZchkgN6HnpMvOjYMOa1PEEbHZKoXxo hm8FmIYqun8DFORaDMTSp33sj8g+sJRW7FWSvkDwDCwPpCyQxRAY8XfuYaHtrUO0Jry0XgwIY4XSk i6vkfjNn6HCCdQrkL1+KyGQeCGB36c95eh5zZ77aom0r4WOvBOjacaJINXA4EsqD14GeE1rEuOvD4 dALTh4n6eezu0wnVetfHvWvxrYzfZQs+Nd7TMbuhwkr295QIGtNFVHSz8PE6+dRv0Jgn0rf/z08iv 7/JW1RcA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1uhYhd-00000004Is0-49u3; Thu, 31 Jul 2025 19:12:33 +0000 From: Luis Chamberlain To: Chuck Lever , Daniel Gomez , kdevops@lists.linux.dev Cc: Luis Chamberlain Subject: [PATCH] fstests: add support for ext2 filesystem testing Date: Thu, 31 Jul 2025 12:12:29 -0700 Message-ID: <20250731191229.1025842-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: 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: - 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. Generated-by: Claude AI Signed-off-by: Luis Chamberlain --- 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 diff --git a/defconfigs/ext2 b/defconfigs/ext2 new file mode 100644 index 000000000000..9b8608219460 --- /dev/null +++ b/defconfigs/ext2 @@ -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 \ No newline at end of file diff --git a/playbooks/roles/fstests/templates/ext2/ext2.config b/playbooks/roles/fstests/templates/ext2/ext2.config new file mode 100644 index 000000000000..f1d4d7de01a4 --- /dev/null +++ b/playbooks/roles/fstests/templates/ext2/ext2.config @@ -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' \ No newline at end of file diff --git a/workflows/fstests/Kconfig b/workflows/fstests/Kconfig index a878b932c850..ce19dc31c8d3 100644 --- a/workflows/fstests/Kconfig +++ b/workflows/fstests/Kconfig @@ -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" diff --git a/workflows/fstests/ext2/Kconfig b/workflows/fstests/ext2/Kconfig new file mode 100644 index 000000000000..af65fe9c17ab --- /dev/null +++ b/workflows/fstests/ext2/Kconfig @@ -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 -- 2.45.2