From: Anand Jain <anajain.sg@gmail.com>
To: Christoph Hellwig <hch@infradead.org>, Anand Jain <asj@kernel.org>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org,
linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org,
linux-f2fs@vger.kernel.org, amir73il@gmail.com, zlang@redhat.com,
"André Almeida" <andrealmeid@igalia.com>
Subject: Re: [PATCH v4 4/9] fstests: verify fanotify isolation on cloned filesystems
Date: Mon, 18 May 2026 22:43:56 +0800 [thread overview]
Message-ID: <aa4f29f5-b683-4d07-bc5f-fa5520ba2302@gmail.com> (raw)
In-Reply-To: <agK83s6NBxpbDREJ@infradead.org>
On 12/5/26 13:38, Christoph Hellwig wrote:
> On Tue, Apr 28, 2026 at 02:42:54PM +0800, Anand Jain wrote:
>> Verify that fanotify events are correctly routed to the appropriate
>> watcher when cloned filesystems are mounted.
>> Helps verify kernel's event notification distinguishes between devices
>> sharing the same FSID/UUID.
>
> Do these tests pass with all major file systems? Or does this reproduce
> the previous btrfs issues in this area?
Yes. The major FSs (BTRFS, EXT4, XFS, and F2FS) all pass, except
EXT4 does not run `generic/801` because statfs `f_fsid` is not
unique when the cloned FS is mounted. Also, BTRFS requires the
kernel patch mentioned in test cases `generic/802` and `generic/804`.
`generic/801` fails in an SELinux environment; this can be
fixed with the following changes in `generic/801` I'll add
this change in v5.
-------
diff --git a/tests/generic/801 b/tests/generic/801
index e1282f4e3d71..384e82120d4e 100644
--- a/tests/generic/801
+++ b/tests/generic/801
@@ -23,6 +23,10 @@ _cleanup()
umount $mnt1 $mnt2 2>/dev/null
_loop_image_destroy "${devs[@]}" 2> /dev/null
rm -r -f $tmp.*
+
+ if [ -n "$old_selinux_state" ]; then
+ setenforce "$old_selinux_state"
+ fi
}
monitor_fanotify()
@@ -49,6 +53,14 @@ mnt2=$TEST_DIR/$seq/mnt2
mkdir -p $mnt1
mkdir -p $mnt2
+# Setting SELINUX_MOUNT_OPTIONS to null still fails fanotify with
+# permission failure, so set SELinux to permissive if it is enforcing.
+if command -v getenforce &>/dev/null && [ "$(getenforce)" = "Enforcing"
]; then
+ old_selinux_state="Enforcing"
+ setenforce Permissive
+else
+ old_selinux_state=""
+fi
_mount $(_common_dev_mount_options) $(_clone_mount_option) ${devs[0]}
$mnt1 || \
_fail "Failed to mount dev1"
_mount $(_common_dev_mount_options) $(_clone_mount_option) ${devs[1]}
$mnt2 || \
(END)
-------
next prev parent reply other threads:[~2026-05-18 14:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 6:42 [PATCH v4 0/9] fstests: add test coverage for cloned filesystem ids Anand Jain
2026-04-28 6:42 ` [PATCH v4 1/9] fstests: add _loop_image_create_clone() helper Anand Jain
2026-04-28 6:42 ` [PATCH v4 2/9] fstests: add _clone_mount_option() helper Anand Jain
2026-04-28 6:42 ` [PATCH v4 3/9] fstests: add test for inotify isolation on cloned devices Anand Jain
2026-04-28 6:42 ` [PATCH v4 4/9] fstests: verify fanotify isolation on cloned filesystems Anand Jain
2026-05-12 5:38 ` Christoph Hellwig
2026-05-18 14:43 ` Anand Jain [this message]
2026-04-28 6:42 ` [PATCH v4 5/9] fstests: verify f_fsid for " Anand Jain
2026-04-28 6:42 ` [PATCH v4 6/9] fstests: verify libblkid resolution of duplicate UUIDs Anand Jain
2026-04-28 6:42 ` [PATCH v4 7/9] fstests: verify IMA isolation on cloned filesystems Anand Jain
2026-04-28 6:42 ` [PATCH v4 8/9] fstests: verify exportfs file handles " Anand Jain
2026-04-28 6:42 ` [PATCH v4 9/9] fstests: btrfs: test UUID consistency for clones with metadata_uuid Anand Jain
2026-05-12 5:40 ` Christoph Hellwig
2026-05-18 14:44 ` Anand Jain
2026-05-12 5:37 ` [PATCH v4 0/9] fstests: add test coverage for cloned filesystem ids Christoph Hellwig
2026-05-18 14:27 ` Anand Jain
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=aa4f29f5-b683-4d07-bc5f-fa5520ba2302@gmail.com \
--to=anajain.sg@gmail.com \
--cc=amir73il@gmail.com \
--cc=andrealmeid@igalia.com \
--cc=asj@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=hch@infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@redhat.com \
/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