FS/XFS testing framework
 help / color / mirror / Atom feed
From: Anand Jain <asj@kernel.org>
To: zlang@kernel.org
Cc: linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org,
	linux-xfs@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net, fstests@vger.kernel.org
Subject: Re: [PATCH 0/21] fstests: tests for cloned filesystem validation and f_fsid
Date: Mon, 23 Nov 2026 10:01:03 +0800	[thread overview]
Message-ID: <768152d1-4215-4f27-a3ca-50252c5b5d9a@kernel.org> (raw)
In-Reply-To: <cover.1791272793.git.asj@kernel.org>

Zorro,

 Could we merge the patches in stages? What's your plan?

Regards, Anand


On 6/10/26 16:55, Anand Jain wrote:
> This series continues the work from the earlier "test coverage for cloned
> filesystem ids" series (last posted as v8 [1]) and has been tested against
> the major filesystems: Btrfs, XFS, ext4, and f2fs.
> 
> Although this version incorporates the review feedback received on v8, it
> expands substantially with additional infrastructure helpers, an extra test
> case to cover the recent regression report, and migration/cleanup of
> existing generic/744. Because the patch count grew from 13 to 21 patches,
> disrupting the previous patch numbering and scope, I have reset the
> versioning and updated the subject line to better reflect the broader
> validation coverage.
> 
> The core motivation remains identical: testing that mounting a block-level
> cloned filesystem concurrently with the original filesystem behaves
> correctly across filesystems and VFS subsystems (fanotify, statfs/f_fsid,
> libblkid resolution, IMA measurement, exportfs file handles, and
> metadata_uuid handling).
> 
> Summary of major changes since v8:
> - Added 1 new regression test case to verify statfs f_fsid derivation against FS UUID.
> - Dropped the test case verifying f_fsid persistence across mount cycles on
>   cloned filesystems, as this assumption is no longer valid following the Btrfs kernel
>   regression fix [2].
> - Introduced common helpers:
>   . _require_security_ima() and _require_metadata_uuid().
>   . _scratch_mkfs_uuid() and helpers for f_fsid verification.
> - Migrated generic/744 to utilize the new common clone helpers.
> - Worked on the review comments.
> 
> Details of changes:
> - _create_cloned_loop_devs():
>   . Renamed from _loop_image_create_clone() to _create_cloned_loop_devs().
>   . Relocated backing image files from "$TEST_DIR/${seq}.*" to a dedicated
>     directory "$TEST_DIR/${seq}/*".
>   . Added internal call to _require_clone_mount().
>   . Switched from _create_loop_device() to _create_loop_device_like_bdev()
>     to guarantee identical logical/physical sector sizes (512 vs 4096)
>     between the original and cloned loop devices.
>   . Used an intermediate local setup step to ensure consistent Direct I/O
>     attributes across both loop devices (preventing the first device from
>     enabling DIO while the cloned device fell back to buffered mode).
>   . Added device geometry and DIO attribute dump to $seqres.full for debugging.
>   . Renamed teardown helper _loop_image_destroy() to _destroy_cloned_loop_devs().
> - _clone_mount_options():
>   . Renamed from _clone_mount_option() to _clone_mount_options().
> - _require_metadata_uuid():
>   . Factored out prerequisite checks from _change_metadata_uuid() into a new
>     dedicated helper _require_metadata_uuid() and invoked it accordingly.
> - _require_clone_mount():
>   . Introduced new helper to check kernel support for concurrent clone mounts.
>   . Removed obsolete _require_duplicate_fsid() in favor of _require_clone_mount().
> - _require_security_ima():
>   . Introduced new helper to check securityfs and IMA policy availability.
> - _create_loop_device_like_bdev():
>   . Removed unused local variable 'dev'.
> 
> - Test Cases common update:
>   - Adjusted test groups: replaced 'clone' with 'tempfsid'.
>   - Standardized test exits: replaced open-coded "status=0; exit" with "_exit 0".
>   - Dropped stale "_require_block_device $TEST_DEV" checks left over from before
>     migrating tests to loop devices.
>   - Percolated helper renames across all tests:
>     . _loop_image_create_clone -> _create_cloned_loop_devs
>     . _loop_image_destroy      -> _destroy_cloned_loop_devs
>     . _clone_mount_option      -> _clone_mount_options
>   - Added cleanup of "$TEST_DIR/$seq" in test exit/cleanup handlers.
> 
> - Test Cases Individual Updates:
>   - generic/744:
>     . Replaced _require_duplicate_fsid with _require_clone_mount().
>     . Migrated to common _create_cloned_loop_devs() and _clone_mount_options().
>   - generic/902:
>     . New regression test case added to verify statfs f_fsid derivation against filesystem UUID.
>   - generic/903:
>     . Added --noheadings flag to findmnt queries for cleaner output parsing.
>   - generic/904:
>     . Dropped 'auto' and 'quick' from test groups due to runtime and policy requirements.
>     . Updated referenced kernel commit IDs.
> 
> [1] https://lore.kernel.org/fstests/cover.1784949154.git.asj@kernel.org
> [2] 72de4807ba84 ("btrfs: derive f_fsid with dev_t only when temp_fsid is active")
> 
> Anand Jain (21):
>   fstests: introduce _require_clone_mount() helper
>   fstests: introduce _create_cloned_loop_devs() helper
>   fstests: add _clone_mount_options() helper
>   fstests: add FSNOTIFYWAIT_PROG
>   fstests: add _require_fanotify_function
>   fstests: add _require_unique_f_fsid() helper
>   fstests: add SEMANAGE_PROG
>   fstests: verify fanotify isolation on cloned filesystems
>   fstests: introduce helper _scratch_mkfs_uuid()
>   fstests: add helpers to verify the expected f_fsid
>   fstests: verify statfs f_fsid is derived from the filesystem UUID
>   fstests: verify libblkid resolution of duplicate UUIDs
>   fstests: introduce _require_security_ima() helper
>   fstests: verify IMA isolation on cloned filesystems
>   fstests: verify exportfs file handles on cloned filesystems
>   fstests: introduce _require_metadata_uuid() helper
>   fstests: add _change_metadata_uuid helper
>   fstests: test UUID consistency for clones with metadata_uuid
>   fstests: generic/744: use new helper _require_clone_mount()
>   fstests: generic/744: migrate to _create_cloned_loop_devs()
>   fstests: _create_loop_device_like_bdev() remove unused variable
> 
>  common/config         |   2 +
>  common/rc             | 262 +++++++++++++++++++++++++++++++++++++++---
>  tests/generic/744     |  72 +++++-------
>  tests/generic/901     | 142 +++++++++++++++++++++++
>  tests/generic/901.out |   7 ++
>  tests/generic/902     |  38 ++++++
>  tests/generic/902.out |   2 +
>  tests/generic/903     |  71 ++++++++++++
>  tests/generic/903.out |   6 +
>  tests/generic/904     | 113 ++++++++++++++++++
>  tests/generic/904.out |  10 ++
>  tests/generic/905     |  79 +++++++++++++
>  tests/generic/905.out |   2 +
>  tests/generic/906     |  74 ++++++++++++
>  tests/generic/906.out |   6 +
>  15 files changed, 827 insertions(+), 59 deletions(-)
>  create mode 100644 tests/generic/901
>  create mode 100644 tests/generic/901.out
>  create mode 100644 tests/generic/902
>  create mode 100644 tests/generic/902.out
>  create mode 100644 tests/generic/903
>  create mode 100644 tests/generic/903.out
>  create mode 100644 tests/generic/904
>  create mode 100644 tests/generic/904.out
>  create mode 100644 tests/generic/905
>  create mode 100644 tests/generic/905.out
>  create mode 100644 tests/generic/906
>  create mode 100644 tests/generic/906.out
> 


      parent reply	other threads:[~2026-11-23  2:01 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-06  8:55 [PATCH 0/21] fstests: tests for cloned filesystem validation and f_fsid Anand Jain
2026-10-06  8:55 ` [PATCH 01/21] fstests: introduce _require_clone_mount() helper Anand Jain
2026-11-23 17:24   ` Zorro Lang
2026-10-06  8:55 ` [PATCH 02/21] fstests: introduce _create_cloned_loop_devs() helper Anand Jain
2026-11-23 17:36   ` Zorro Lang
2026-10-06  8:55 ` [PATCH 03/21] fstests: add _clone_mount_options() helper Anand Jain
2026-11-23 17:38   ` Zorro Lang
2026-10-06  8:55 ` [PATCH 04/21] fstests: add FSNOTIFYWAIT_PROG Anand Jain
2026-10-06  8:55 ` [PATCH 05/21] fstests: add _require_fanotify_function Anand Jain
2026-11-23 18:18   ` Zorro Lang
2026-10-06  8:55 ` [PATCH 06/21] fstests: add _require_unique_f_fsid() helper Anand Jain
2026-11-23 18:29   ` Zorro Lang
2026-10-06  8:55 ` [PATCH 07/21] fstests: add SEMANAGE_PROG Anand Jain
2026-11-23 18:29   ` Zorro Lang
2026-10-06  8:55 ` [PATCH 08/21] fstests: verify fanotify isolation on cloned filesystems Anand Jain
2026-11-23 18:41   ` Zorro Lang
2026-10-06  8:55 ` [PATCH 09/21] fstests: introduce helper _scratch_mkfs_uuid() Anand Jain
2026-10-06  8:55 ` [PATCH 10/21] fstests: add helpers to verify the expected f_fsid Anand Jain
2026-10-06  8:55 ` [PATCH 11/21] fstests: verify statfs f_fsid is derived from the filesystem UUID Anand Jain
2026-10-06  8:55 ` [PATCH 12/21] fstests: verify libblkid resolution of duplicate UUIDs Anand Jain
2026-10-06  8:55 ` [PATCH 13/21] fstests: introduce _require_security_ima() helper Anand Jain
2026-10-06  8:55 ` [PATCH 14/21] fstests: verify IMA isolation on cloned filesystems Anand Jain
2026-10-06  8:55 ` [PATCH 15/21] fstests: verify exportfs file handles " Anand Jain
2026-10-06  8:55 ` [PATCH 16/21] fstests: introduce _require_metadata_uuid() helper Anand Jain
2026-10-06  8:55 ` [PATCH 17/21] fstests: add _change_metadata_uuid helper Anand Jain
2026-10-06  8:55 ` [PATCH 18/21] fstests: test UUID consistency for clones with metadata_uuid Anand Jain
2026-10-06  8:55 ` [PATCH 19/21] fstests: generic/744: use new helper _require_clone_mount() Anand Jain
2026-10-06  8:55 ` [PATCH 20/21] fstests: generic/744: migrate to _create_cloned_loop_devs() Anand Jain
2026-10-06  8:55 ` [PATCH 21/21] fstests: _create_loop_device_like_bdev() remove unused variable Anand Jain
2026-10-22 13:19 ` [PATCH 0/21] fstests: tests for cloned filesystem validation and f_fsid Anand Jain
2026-11-23  2:01 ` Anand Jain [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=768152d1-4215-4f27-a3ca-50252c5b5d9a@kernel.org \
    --to=asj@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-xfs@vger.kernel.org \
    --cc=zlang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox