* [LTP] [PATCH 0/3] Tests for fanotify and overlayfs
@ 2023-09-03 11:15 Amir Goldstein
2023-09-03 11:15 ` [LTP] [PATCH 1/3] fanotify13: Test watching overlayfs upper fs Amir Goldstein
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Amir Goldstein @ 2023-09-03 11:15 UTC (permalink / raw)
To: Petr Vorel
Cc: Christian Brauner, Jan Kara, Miklos Szeredi, linux-unionfs, ltp
Hi Petr,
Kernel 6.5 and upcoming kernel 6.6 have several improvements
to the integration of fanotify and overlayfs.
Kernel 6.5 includes the fix to generate fanotify events on watched
overlayfs underlying filesystem (tst_variant 1).
Kernel 6.5 also added support for the new AT_HANDLE_FID flag,
which is used in this test.
Kernel 6.6 brings overlayfs support for AT_HANDLE_FID and with it
better support for watching overlayfs with fanotify (tst_variant 2).
tst_variant 2 is duely skipped on kernel 6.5 and tst_variant 1
is skipped on older kernels.
Since the overlayfs changes are not in a release kernel yet, and
since this is not a new test that can go to staging tests, I will
leave it to you to decide how and when you want to merge these new
test variants.
Thanks,
Amir.
Amir Goldstein (3):
fanotify13: Test watching overlayfs upper fs
fanotify13: Test watching overlayfs with FAN_REPORT_FID
fanotify13: Test unique overlayfs fsid
lib/tst_fs_setup.c | 2 +-
testcases/kernel/syscalls/fanotify/fanotify.h | 36 ++++++++-
.../kernel/syscalls/fanotify/fanotify13.c | 77 +++++++++++++++++--
3 files changed, 105 insertions(+), 10 deletions(-)
--
2.34.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 9+ messages in thread
* [LTP] [PATCH 1/3] fanotify13: Test watching overlayfs upper fs
2023-09-03 11:15 [LTP] [PATCH 0/3] Tests for fanotify and overlayfs Amir Goldstein
@ 2023-09-03 11:15 ` Amir Goldstein
2023-09-14 10:32 ` Richard Palethorpe
2023-09-15 8:28 ` Cyril Hrubis
2023-09-03 11:15 ` [LTP] [PATCH 2/3] fanotify13: Test watching overlayfs with FAN_REPORT_FID Amir Goldstein
2023-09-03 11:15 ` [LTP] [PATCH 3/3] fanotify13: Test unique overlayfs fsid Amir Goldstein
2 siblings, 2 replies; 9+ messages in thread
From: Amir Goldstein @ 2023-09-03 11:15 UTC (permalink / raw)
To: Petr Vorel
Cc: Christian Brauner, Jan Kara, Miklos Szeredi, linux-unionfs, ltp
Run a test variant with overlayfs (over all supported fs)
when watching the upper fs.
This is a regression test for kernel fix bc2473c90fca
("ovl: enable fsnotify events on underlying real files"),
from kernel 6.5, which is not likely to be backported to older kernels.
To avoid waiting for events that won't arrive when testing old kernels,
require that kernel supports encoding fid with new flag AT_HADNLE_FID,
also merged to 6.5 and not likely to be backported to older kernels.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
lib/tst_fs_setup.c | 2 +-
testcases/kernel/syscalls/fanotify/fanotify.h | 21 +++++++
.../kernel/syscalls/fanotify/fanotify13.c | 62 +++++++++++++++++--
3 files changed, 79 insertions(+), 6 deletions(-)
diff --git a/lib/tst_fs_setup.c b/lib/tst_fs_setup.c
index 6b93483de..30673670f 100644
--- a/lib/tst_fs_setup.c
+++ b/lib/tst_fs_setup.c
@@ -42,7 +42,7 @@ int mount_overlay(const char *file, const int lineno, int skip)
tst_res_(file, lineno, TINFO,
TST_FS_SETUP_OVERLAYFS_MSG);
}
- } else {
+ } else if (skip) {
tst_brk_(file, lineno, TBROK | TERRNO,
"overlayfs mount failed");
}
diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
index 51078103e..75a081dc9 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify.h
+++ b/testcases/kernel/syscalls/fanotify/fanotify.h
@@ -72,6 +72,10 @@ static inline int safe_fanotify_mark(const char *file, const int lineno,
#define MAX_HANDLE_SZ 128
#endif
+#ifndef AT_HANDLE_FID
+#define AT_HANDLE_FID 0x200
+#endif
+
/*
* Helper function used to obtain fsid and file_handle for a given path.
* Used by test files correlated to FAN_REPORT_FID functionality.
@@ -260,10 +264,27 @@ static inline int fanotify_mark_supported_by_kernel(uint64_t flag)
return rval;
}
+static inline int fanotify_handle_supported_by_kernel(int flag)
+{
+ /*
+ * On Kernel that does not support AT_HANDLE_FID this will result
+ * with EINVAL. On older kernels, this will result in EBADF.
+ */
+ if (name_to_handle_at(-1, "", NULL, NULL, AT_EMPTY_PATH | flag)) {
+ if (errno == EINVAL)
+ return -1;
+ }
+ return 0;
+}
+
#define REQUIRE_MARK_TYPE_SUPPORTED_BY_KERNEL(mark_type) \
fanotify_init_flags_err_msg(#mark_type, __FILE__, __LINE__, tst_brk_, \
fanotify_mark_supported_by_kernel(mark_type))
+#define REQUIRE_HANDLE_TYPE_SUPPORTED_BY_KERNEL(handle_type) \
+ fanotify_init_flags_err_msg(#handle_type, __FILE__, __LINE__, tst_brk_, \
+ fanotify_handle_supported_by_kernel(handle_type))
+
#define REQUIRE_FANOTIFY_EVENTS_SUPPORTED_ON_FS(init_flags, mark_type, mask, fname) do { \
if (mark_type) \
REQUIRE_MARK_TYPE_SUPPORTED_BY_KERNEL(mark_type); \
diff --git a/testcases/kernel/syscalls/fanotify/fanotify13.c b/testcases/kernel/syscalls/fanotify/fanotify13.c
index c3daaf3a2..adba41453 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify13.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify13.c
@@ -25,6 +25,7 @@
#include <sys/statfs.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/mount.h>
#include <errno.h>
#include <unistd.h>
#include "tst_test.h"
@@ -37,7 +38,7 @@
#define DIR_ONE "dir_one"
#define FILE_ONE "file_one"
#define FILE_TWO "file_two"
-#define MOUNT_PATH "mntpoint"
+#define MOUNT_PATH "tstmnt"
#define EVENT_MAX ARRAY_SIZE(objects)
#define DIR_PATH_ONE MOUNT_PATH"/"DIR_ONE
#define FILE_PATH_ONE MOUNT_PATH"/"FILE_ONE
@@ -88,6 +89,8 @@ static struct test_case_t {
}
};
+static int ovl_mounted;
+static int bind_mounted;
static int nofid_fd;
static int fanotify_fd;
static int filesystem_mark_unsupported;
@@ -143,8 +146,13 @@ static void do_test(unsigned int number)
struct fanotify_mark_type *mark = &tc->mark;
tst_res(TINFO,
- "Test #%d: FAN_REPORT_FID with mark flag: %s",
- number, mark->name);
+ "Test #%d.%d: FAN_REPORT_FID with mark flag: %s",
+ number, tst_variant, mark->name);
+
+ if (tst_variant && !ovl_mounted) {
+ tst_res(TCONF, "overlayfs not supported on %s", tst_device->fs_type);
+ return;
+ }
if (filesystem_mark_unsupported && mark->flag & FAN_MARK_FILESYSTEM) {
tst_res(TCONF, "FAN_MARK_FILESYSTEM not supported in kernel?");
@@ -160,6 +168,15 @@ static void do_test(unsigned int number)
if (setup_marks(fanotify_fd, tc) != 0)
goto out;
+ /* Variant #1: watching upper fs - open files on overlayfs */
+ if (tst_variant == 1) {
+ if (mark->flag & FAN_MARK_MOUNT) {
+ tst_res(TCONF, "overlayfs upper fs cannot be watched with mount mark");
+ goto out;
+ }
+ SAFE_MOUNT(OVL_MNT, MOUNT_PATH, "none", MS_BIND, NULL);
+ }
+
/* Generate sequence of FAN_OPEN events on objects */
for (i = 0; i < ARRAY_SIZE(objects); i++)
fds[i] = SAFE_OPEN(objects[i].path, O_RDONLY);
@@ -174,6 +191,9 @@ static void do_test(unsigned int number)
SAFE_CLOSE(fds[i]);
}
+ if (tst_variant == 1)
+ SAFE_UMOUNT(MOUNT_PATH);
+
/* Read events from event queue */
len = SAFE_READ(0, fanotify_fd, events_buf, BUF_SIZE);
@@ -261,7 +281,32 @@ out:
static void do_setup(void)
{
- REQUIRE_FANOTIFY_INIT_FLAGS_SUPPORTED_ON_FS(FAN_REPORT_FID, MOUNT_PATH);
+ const char *mnt;
+
+ /*
+ * Bind mount to either base fs or to overlayfs over base fs:
+ * Variant #0: watch base fs - open files on base fs
+ * Variant #1: watch upper fs - open files on overlayfs
+ *
+ * Variant #1 tests a bug whose fix bc2473c90fca ("ovl: enable fsnotify
+ * events on underlying real files") in kernel 6.5 is not likely to be
+ * backported to older kernels.
+ * To avoid waiting for events that won't arrive when testing old kernels,
+ * require that kernel supports encoding fid with new flag AT_HADNLE_FID,
+ * also merged to 6.5 and not likely to be backported to older kernels.
+ */
+ if (tst_variant) {
+ REQUIRE_HANDLE_TYPE_SUPPORTED_BY_KERNEL(AT_HANDLE_FID);
+ ovl_mounted = TST_MOUNT_OVERLAY();
+ mnt = OVL_UPPER;
+ } else {
+ mnt = OVL_BASE_MNTPOINT;
+
+ }
+ REQUIRE_FANOTIFY_INIT_FLAGS_SUPPORTED_ON_FS(FAN_REPORT_FID, mnt);
+ SAFE_MKDIR(MOUNT_PATH, 0755);
+ SAFE_MOUNT(mnt, MOUNT_PATH, "none", MS_BIND, NULL);
+ bind_mounted = 1;
filesystem_mark_unsupported = fanotify_mark_supported_by_kernel(FAN_MARK_FILESYSTEM);
@@ -287,16 +332,23 @@ static void do_cleanup(void)
SAFE_CLOSE(nofid_fd);
if (fanotify_fd > 0)
SAFE_CLOSE(fanotify_fd);
+ if (bind_mounted) {
+ SAFE_UMOUNT(MOUNT_PATH);
+ SAFE_RMDIR(MOUNT_PATH);
+ }
+ if (ovl_mounted)
+ SAFE_UMOUNT(OVL_MNT);
}
static struct tst_test test = {
.test = do_test,
.tcnt = ARRAY_SIZE(test_cases),
+ .test_variants = 2,
.setup = do_setup,
.cleanup = do_cleanup,
.needs_root = 1,
.mount_device = 1,
- .mntpoint = MOUNT_PATH,
+ .mntpoint = OVL_BASE_MNTPOINT,
.all_filesystems = 1,
.tags = (const struct tst_tag[]) {
{"linux-git", "c285a2f01d69"},
--
2.34.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH 2/3] fanotify13: Test watching overlayfs with FAN_REPORT_FID
2023-09-03 11:15 [LTP] [PATCH 0/3] Tests for fanotify and overlayfs Amir Goldstein
2023-09-03 11:15 ` [LTP] [PATCH 1/3] fanotify13: Test watching overlayfs upper fs Amir Goldstein
@ 2023-09-03 11:15 ` Amir Goldstein
2023-09-03 11:15 ` [LTP] [PATCH 3/3] fanotify13: Test unique overlayfs fsid Amir Goldstein
2 siblings, 0 replies; 9+ messages in thread
From: Amir Goldstein @ 2023-09-03 11:15 UTC (permalink / raw)
To: Petr Vorel
Cc: Christian Brauner, Jan Kara, Miklos Szeredi, linux-unionfs, ltp
Run a test variant watching overlayfs (over all supported fs)
and reporting events with fid.
This requires overlayfs support for AT_HANDLE_FID.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
testcases/kernel/syscalls/fanotify/fanotify.h | 15 +++++++++++----
testcases/kernel/syscalls/fanotify/fanotify13.c | 7 +++++--
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
index 75a081dc9..eea1dad91 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify.h
+++ b/testcases/kernel/syscalls/fanotify/fanotify.h
@@ -93,6 +93,11 @@ static inline void fanotify_get_fid(const char *path, __kernel_fsid_t *fsid,
if (name_to_handle_at(AT_FDCWD, path, handle, &mount_id, 0) == -1) {
if (errno == EOPNOTSUPP) {
+ /* Try to request non-decodeable fid instead */
+ if (name_to_handle_at(AT_FDCWD, path, handle, &mount_id,
+ AT_HANDLE_FID) == 0)
+ return;
+
tst_brk(TCONF,
"filesystem %s does not support file handles",
tst_device->fs_type);
@@ -179,6 +184,7 @@ static inline int fanotify_events_supported_by_kernel(uint64_t mask,
* @return 0: fanotify supported both in kernel and on tested filesystem
* @return -1: @flags not supported in kernel
* @return -2: @flags not supported on tested filesystem (tested if @fname is not NULL)
+ * @return -3: @flags not supported on overlayfs (tested if @fname == OVL_MNT)
*/
static inline int fanotify_init_flags_supported_on_fs(unsigned int flags, const char *fname)
{
@@ -199,7 +205,7 @@ static inline int fanotify_init_flags_supported_on_fs(unsigned int flags, const
if (fname && fanotify_mark(fd, FAN_MARK_ADD, FAN_ACCESS, AT_FDCWD, fname) < 0) {
if (errno == ENODEV || errno == EOPNOTSUPP || errno == EXDEV) {
- rval = -2;
+ rval = strcmp(fname, OVL_MNT) ? -2 : -3;
} else {
tst_brk(TBROK | TERRNO,
"fanotify_mark (%d, FAN_MARK_ADD, ..., AT_FDCWD, %s) failed",
@@ -226,10 +232,11 @@ static inline void fanotify_init_flags_err_msg(const char *flags_str,
if (fail == -1)
res_func(file, lineno, TCONF,
"%s not supported in kernel?", flags_str);
- if (fail == -2)
+ if (fail == -2 || fail == -3)
res_func(file, lineno, TCONF,
- "%s not supported on %s filesystem",
- flags_str, tst_device->fs_type);
+ "%s not supported on %s%s filesystem",
+ flags_str, fail == -3 ? "overlayfs over " : "",
+ tst_device->fs_type);
}
#define FANOTIFY_INIT_FLAGS_ERR_MSG(flags, fail) \
diff --git a/testcases/kernel/syscalls/fanotify/fanotify13.c b/testcases/kernel/syscalls/fanotify/fanotify13.c
index adba41453..5c1d287d7 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify13.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify13.c
@@ -287,6 +287,7 @@ static void do_setup(void)
* Bind mount to either base fs or to overlayfs over base fs:
* Variant #0: watch base fs - open files on base fs
* Variant #1: watch upper fs - open files on overlayfs
+ * Variant #2: watch overlayfs - open files on overlayfs
*
* Variant #1 tests a bug whose fix bc2473c90fca ("ovl: enable fsnotify
* events on underlying real files") in kernel 6.5 is not likely to be
@@ -294,11 +295,13 @@ static void do_setup(void)
* To avoid waiting for events that won't arrive when testing old kernels,
* require that kernel supports encoding fid with new flag AT_HADNLE_FID,
* also merged to 6.5 and not likely to be backported to older kernels.
+ * Variant #2 tests overlayfs watch with FAN_REPORT_FID, which also
+ * requires kernel with support for AT_HADNLE_FID.
*/
if (tst_variant) {
REQUIRE_HANDLE_TYPE_SUPPORTED_BY_KERNEL(AT_HANDLE_FID);
ovl_mounted = TST_MOUNT_OVERLAY();
- mnt = OVL_UPPER;
+ mnt = tst_variant == 1 ? OVL_UPPER : OVL_MNT;
} else {
mnt = OVL_BASE_MNTPOINT;
@@ -343,7 +346,7 @@ static void do_cleanup(void)
static struct tst_test test = {
.test = do_test,
.tcnt = ARRAY_SIZE(test_cases),
- .test_variants = 2,
+ .test_variants = 3,
.setup = do_setup,
.cleanup = do_cleanup,
.needs_root = 1,
--
2.34.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH 3/3] fanotify13: Test unique overlayfs fsid
2023-09-03 11:15 [LTP] [PATCH 0/3] Tests for fanotify and overlayfs Amir Goldstein
2023-09-03 11:15 ` [LTP] [PATCH 1/3] fanotify13: Test watching overlayfs upper fs Amir Goldstein
2023-09-03 11:15 ` [LTP] [PATCH 2/3] fanotify13: Test watching overlayfs with FAN_REPORT_FID Amir Goldstein
@ 2023-09-03 11:15 ` Amir Goldstein
2 siblings, 0 replies; 9+ messages in thread
From: Amir Goldstein @ 2023-09-03 11:15 UTC (permalink / raw)
To: Petr Vorel
Cc: Christian Brauner, Jan Kara, Miklos Szeredi, linux-unionfs, ltp
With feature uuid=auto, overlayfs gets an fsid which is different than
the base fs fsid.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
testcases/kernel/syscalls/fanotify/fanotify13.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/testcases/kernel/syscalls/fanotify/fanotify13.c b/testcases/kernel/syscalls/fanotify/fanotify13.c
index 5c1d287d7..3bb9eb1df 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify13.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify13.c
@@ -96,6 +96,7 @@ static int fanotify_fd;
static int filesystem_mark_unsupported;
static char events_buf[BUF_SIZE];
static struct event_t event_set[EVENT_MAX];
+static struct fanotify_fid_t base_fs_fid;
static void create_objects(void)
{
@@ -113,8 +114,19 @@ static void get_object_stats(void)
{
unsigned int i;
+ fanotify_save_fid(OVL_BASE_MNTPOINT, &base_fs_fid);
for (i = 0; i < ARRAY_SIZE(objects); i++)
fanotify_save_fid(objects[i].path, &objects[i].fid);
+
+ /* Variant #2: watching overlayfs - expect fsid != base fs fsid */
+ if (ovl_mounted && tst_variant == 2 &&
+ memcmp(&objects[0].fid.fsid, &base_fs_fid.fsid,
+ sizeof(base_fs_fid.fsid)) == 0) {
+ tst_res(TFAIL,
+ "overlayfs fsid is the same as stat.f_fsid that was "
+ "obtained via statfs(2) on the base fs");
+ }
+
}
static int setup_marks(unsigned int fd, struct test_case_t *tc)
--
2.34.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [LTP] [PATCH 1/3] fanotify13: Test watching overlayfs upper fs
2023-09-03 11:15 ` [LTP] [PATCH 1/3] fanotify13: Test watching overlayfs upper fs Amir Goldstein
@ 2023-09-14 10:32 ` Richard Palethorpe
2023-09-14 13:24 ` Amir Goldstein
2023-09-15 8:28 ` Cyril Hrubis
1 sibling, 1 reply; 9+ messages in thread
From: Richard Palethorpe @ 2023-09-14 10:32 UTC (permalink / raw)
To: Amir Goldstein
Cc: Christian Brauner, Jan Kara, Miklos Szeredi, linux-unionfs, ltp
Hello Amir,
Amir Goldstein <amir73il@gmail.com> writes:
> Run a test variant with overlayfs (over all supported fs)
> when watching the upper fs.
>
> This is a regression test for kernel fix bc2473c90fca
> ("ovl: enable fsnotify events on underlying real files"),
> from kernel 6.5, which is not likely to be backported to older kernels.
>
> To avoid waiting for events that won't arrive when testing old kernels,
> require that kernel supports encoding fid with new flag AT_HADNLE_FID,
> also merged to 6.5 and not likely to be backported to older kernels.
Unfortunately Petr's not here at the moment.
I guess this first patch doesn't require 6.6? So it could be merged
independently without further considerations for what makes it into 6.6?
--
Thank you,
Richard.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LTP] [PATCH 1/3] fanotify13: Test watching overlayfs upper fs
2023-09-14 10:32 ` Richard Palethorpe
@ 2023-09-14 13:24 ` Amir Goldstein
2023-09-15 6:51 ` Petr Vorel
0 siblings, 1 reply; 9+ messages in thread
From: Amir Goldstein @ 2023-09-14 13:24 UTC (permalink / raw)
To: rpalethorpe
Cc: Christian Brauner, Jan Kara, Miklos Szeredi, linux-unionfs, ltp
On Thu, Sep 14, 2023 at 1:37 PM Richard Palethorpe <rpalethorpe@suse.de> wrote:
>
> Hello Amir,
>
> Amir Goldstein <amir73il@gmail.com> writes:
>
> > Run a test variant with overlayfs (over all supported fs)
> > when watching the upper fs.
> >
> > This is a regression test for kernel fix bc2473c90fca
> > ("ovl: enable fsnotify events on underlying real files"),
> > from kernel 6.5, which is not likely to be backported to older kernels.
> >
> > To avoid waiting for events that won't arrive when testing old kernels,
> > require that kernel supports encoding fid with new flag AT_HADNLE_FID,
> > also merged to 6.5 and not likely to be backported to older kernels.
>
> Unfortunately Petr's not here at the moment.
>
> I guess this first patch doesn't require 6.6? So it could be merged
> independently without further considerations for what makes it into 6.6?
>
Yes that is correct.
Thanks,
Amir.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LTP] [PATCH 1/3] fanotify13: Test watching overlayfs upper fs
2023-09-14 13:24 ` Amir Goldstein
@ 2023-09-15 6:51 ` Petr Vorel
0 siblings, 0 replies; 9+ messages in thread
From: Petr Vorel @ 2023-09-15 6:51 UTC (permalink / raw)
To: Amir Goldstein
Cc: Christian Brauner, Jan Kara, Miklos Szeredi, linux-unionfs, ltp
Hi Amir, Richie,
> On Thu, Sep 14, 2023 at 1:37 PM Richard Palethorpe <rpalethorpe@suse.de> wrote:
> > Hello Amir,
> > Amir Goldstein <amir73il@gmail.com> writes:
> > > Run a test variant with overlayfs (over all supported fs)
> > > when watching the upper fs.
> > > This is a regression test for kernel fix bc2473c90fca
> > > ("ovl: enable fsnotify events on underlying real files"),
> > > from kernel 6.5, which is not likely to be backported to older kernels.
> > > To avoid waiting for events that won't arrive when testing old kernels,
> > > require that kernel supports encoding fid with new flag AT_HADNLE_FID,
> > > also merged to 6.5 and not likely to be backported to older kernels.
> > Unfortunately Petr's not here at the moment.
> > I guess this first patch doesn't require 6.6? So it could be merged
> > independently without further considerations for what makes it into 6.6?
> Yes that is correct.
I'm finally back :).
Reviewed-by: Petr Vorel <pvorel@suse.cz>
I'll ask Cyril this patch to be merged before LTP release (final day today
before git freeze).
Kind regards,
Petr
> Thanks,
> Amir.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LTP] [PATCH 1/3] fanotify13: Test watching overlayfs upper fs
2023-09-03 11:15 ` [LTP] [PATCH 1/3] fanotify13: Test watching overlayfs upper fs Amir Goldstein
2023-09-14 10:32 ` Richard Palethorpe
@ 2023-09-15 8:28 ` Cyril Hrubis
2023-09-15 9:02 ` Petr Vorel
1 sibling, 1 reply; 9+ messages in thread
From: Cyril Hrubis @ 2023-09-15 8:28 UTC (permalink / raw)
To: Amir Goldstein
Cc: Christian Brauner, Jan Kara, Miklos Szeredi, linux-unionfs, ltp
Hi!
> ---
> lib/tst_fs_setup.c | 2 +-
> testcases/kernel/syscalls/fanotify/fanotify.h | 21 +++++++
> .../kernel/syscalls/fanotify/fanotify13.c | 62 +++++++++++++++++--
> 3 files changed, 79 insertions(+), 6 deletions(-)
>
> diff --git a/lib/tst_fs_setup.c b/lib/tst_fs_setup.c
> index 6b93483de..30673670f 100644
> --- a/lib/tst_fs_setup.c
> +++ b/lib/tst_fs_setup.c
> @@ -42,7 +42,7 @@ int mount_overlay(const char *file, const int lineno, int skip)
> tst_res_(file, lineno, TINFO,
> TST_FS_SETUP_OVERLAYFS_MSG);
> }
> - } else {
> + } else if (skip) {
> tst_brk_(file, lineno, TBROK | TERRNO,
> "overlayfs mount failed");
> }
The skip flag should be called strict, at least that is what we usually
name it, but that is very minor.
...
> static struct tst_test test = {
> .test = do_test,
> .tcnt = ARRAY_SIZE(test_cases),
> + .test_variants = 2,
> .setup = do_setup,
> .cleanup = do_cleanup,
> .needs_root = 1,
> .mount_device = 1,
> - .mntpoint = MOUNT_PATH,
> + .mntpoint = OVL_BASE_MNTPOINT,
> .all_filesystems = 1,
> .tags = (const struct tst_tag[]) {
> {"linux-git", "c285a2f01d69"},
The git hash for the regression test with variant=1 should have been
added here.
The rest looks good to me. With the two minor issues fixed:
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
@Peter Vorel Feel free to push the patch with the two fixes applied.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LTP] [PATCH 1/3] fanotify13: Test watching overlayfs upper fs
2023-09-15 8:28 ` Cyril Hrubis
@ 2023-09-15 9:02 ` Petr Vorel
0 siblings, 0 replies; 9+ messages in thread
From: Petr Vorel @ 2023-09-15 9:02 UTC (permalink / raw)
To: Cyril Hrubis
Cc: Christian Brauner, Jan Kara, Miklos Szeredi, linux-unionfs, ltp
Hi all,
...
> > - } else {
> > + } else if (skip) {
> > tst_brk_(file, lineno, TBROK | TERRNO,
> > "overlayfs mount failed");
> > }
> The skip flag should be called strict, at least that is what we usually
> name it, but that is very minor.
> ...
> > static struct tst_test test = {
> > .test = do_test,
> > .tcnt = ARRAY_SIZE(test_cases),
> > + .test_variants = 2,
> > .setup = do_setup,
> > .cleanup = do_cleanup,
> > .needs_root = 1,
> > .mount_device = 1,
> > - .mntpoint = MOUNT_PATH,
> > + .mntpoint = OVL_BASE_MNTPOINT,
> > .all_filesystems = 1,
> > .tags = (const struct tst_tag[]) {
> > {"linux-git", "c285a2f01d69"},
> The git hash for the regression test with variant=1 should have been
> added here.
> The rest looks good to me. With the two minor issues fixed:
> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
> @Peter Vorel Feel free to push the patch with the two fixes applied.
Thanks for spotting both issues, fixed and merged.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-09-15 9:02 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-03 11:15 [LTP] [PATCH 0/3] Tests for fanotify and overlayfs Amir Goldstein
2023-09-03 11:15 ` [LTP] [PATCH 1/3] fanotify13: Test watching overlayfs upper fs Amir Goldstein
2023-09-14 10:32 ` Richard Palethorpe
2023-09-14 13:24 ` Amir Goldstein
2023-09-15 6:51 ` Petr Vorel
2023-09-15 8:28 ` Cyril Hrubis
2023-09-15 9:02 ` Petr Vorel
2023-09-03 11:15 ` [LTP] [PATCH 2/3] fanotify13: Test watching overlayfs with FAN_REPORT_FID Amir Goldstein
2023-09-03 11:15 ` [LTP] [PATCH 3/3] fanotify13: Test unique overlayfs fsid Amir Goldstein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox