* [LTP] [PATCH v3 1/5] lib: Rename function check_kver() => check_min_kver()
2026-07-31 10:51 [LTP] [PATCH v3 0/5] Add support for .max_kver Petr Vorel
@ 2026-07-31 10:51 ` Petr Vorel
2026-07-31 11:52 ` [LTP] " linuxtestproject.agent
2026-07-31 10:51 ` [LTP] [PATCH v3 2/5] lib: Add support for max_kver to struct tst_test and tst_fs Petr Vorel
` (3 subsequent siblings)
4 siblings, 1 reply; 12+ messages in thread
From: Petr Vorel @ 2026-07-31 10:51 UTC (permalink / raw)
To: ltp
Preparation for a next commit.
Reviewed-by: Avinesh Kumar <avinesh.kumar@suse.com>
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
The same as in v2.
lib/tst_test.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 5c3607016e..778a1fed40 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -1058,11 +1058,11 @@ static void do_exit(int ret)
}
/*
- * Check for the required kernel version.
+ * Check for the minimal required kernel version.
*
* return: true if the kernel version is high enough, false otherwise.
*/
-static bool check_kver(const char *min_kver, const int brk_nosupp)
+static bool check_min_kver(const char *min_kver, const int brk_nosupp)
{
char *msg;
int v1, v2, v3;
@@ -1461,7 +1461,7 @@ static void do_setup(int argc, char *argv[])
tst_brk(TCONF, "Test needs to be run as root");
if (tst_test->min_kver)
- check_kver(tst_test->min_kver, 1);
+ check_min_kver(tst_test->min_kver, 1);
if (tst_test->skip_in_lockdown && tst_lockdown_enabled() > 0)
tst_brk(TCONF, "Kernel is locked down, skipping test");
@@ -1584,7 +1584,7 @@ static void do_setup(int argc, char *argv[])
tst_check_cmd(tst_test->filesystems->mkfs_ver, 1);
if (tst_test->filesystems && tst_test->filesystems->min_kver)
- check_kver(tst_test->filesystems->min_kver, 1);
+ check_min_kver(tst_test->filesystems->min_kver, 1);
prepare_device(tst_test->filesystems);
}
@@ -1988,7 +1988,7 @@ static void run_tcase_on_fs(struct tst_fs *fs, const char *fs_type)
if (fs->mkfs_ver && !tst_check_cmd(fs->mkfs_ver, 0))
return;
- if (fs->min_kver && !check_kver(fs->min_kver, 0))
+ if (fs->min_kver && !check_min_kver(fs->min_kver, 0))
return;
prepare_device(fs);
--
2.55.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [LTP] lib: Rename function check_kver() => check_min_kver()
2026-07-31 10:51 ` [LTP] [PATCH v3 1/5] lib: Rename function check_kver() => check_min_kver() Petr Vorel
@ 2026-07-31 11:52 ` linuxtestproject.agent
2026-07-31 12:20 ` Petr Vorel
0 siblings, 1 reply; 12+ messages in thread
From: linuxtestproject.agent @ 2026-07-31 11:52 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
Hi Petr,
On Fri, 31 Jul 2026, Petr Vorel wrote:
> lib: Rename function check_kver() => check_min_kver()
--- [PATCH 1/5] ---
> Preparation for a next commit.
Could the message explain that the rename distinguishes the minimum-version
helper from the new maximum-version helper, without referring to a later
patch? The current body does not explain the change independently.
--- [PATCH 2/5] ---
> + * on any stable release (test with ``min_kver = "7.1"`` runs also on kernel
> + * 7.1.5). Stable releases are compared as expected.
Could this example use ``max_kver``? As written, the new field documents the
opposite API.
> + for (i=0, dots=0; max_kver[i]; i++)
Could spaces be added around both assignment operators to follow kernel
coding style?
--- [PATCH 3/5] ---
> + .max_kver = "6.10",
Could this test be allowed to run again on Linux 7.2? In that tree,
do_open_execat() calls exe_file_deny_write_access() and returns ETXTBSY when
the executable is open for writing (fs/exec.c:800-802).
A permanent maximum version therefore reports TCONF for behavior that is
valid again. It cannot represent the temporary 6.11 through 7.1 behavior
window.
--- [PATCH 4/5] ---
> + .max_kver = "6.10",
Could creat07 also be allowed to run again on Linux 7.2? The exec path makes
i_writecount negative through exe_file_deny_write_access(), and creat() then
reaches get_write_access(), which returns ETXTBSY for a negative count
(include/linux/fs.h:2813-2816).
This maximum bound suppresses valid 7.2 coverage and cannot describe the
temporary 6.11 through 7.1 behavior window.
--- [PATCH 5/5] ---
> Because the above flag combinations are already "tested" by the tests
> that use them and we don't have any tests that >= 5.10 has support for
> FAN_MARK_FILESYSTEM etc just simply skip the test on v7.2.
Could this claim be corrected? Other tests exercise FAN_REPORT_TID and
FAN_REPORT_PIDFD separately, but fanotify20 is the only LTP test combining
them.
> + .max_kver = "7.1",
Could the first case instead expect success when thread pidfds are supported,
while retaining the second valid-combination check? Linux 7.2 now uses
task_pid(current) for FAN_REPORT_TID and creates a thread pidfd
(fs/notify/fanotify/fanotify.c:843-849 and
fs/notify/fanotify/fanotify_user.c:906-913). Skipping the whole test removes
the only coverage of the newly valid combination.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [LTP] lib: Rename function check_kver() => check_min_kver()
2026-07-31 11:52 ` [LTP] " linuxtestproject.agent
@ 2026-07-31 12:20 ` Petr Vorel
2026-07-31 12:37 ` Andrea Cervesato via ltp
0 siblings, 1 reply; 12+ messages in thread
From: Petr Vorel @ 2026-07-31 12:20 UTC (permalink / raw)
To: linuxtestproject.agent; +Cc: ltp
Hi all,
> Hi Petr,
> On Fri, 31 Jul 2026, Petr Vorel wrote:
> > lib: Rename function check_kver() => check_min_kver()
> --- [PATCH 1/5] ---
> > Preparation for a next commit.
> Could the message explain that the rename distinguishes the minimum-version
> helper from the new maximum-version helper, without referring to a later
> patch? The current body does not explain the change independently.
Hm, I'm not sure if that's needed
> --- [PATCH 2/5] ---
> > + * on any stable release (test with ``min_kver = "7.1"`` runs also on kernel
> > + * 7.1.5). Stable releases are compared as expected.
> Could this example use ``max_kver``? As written, the new field documents the
> opposite API.
Ah, thanks! Before merge I'll amend:
- * on any stable release (test with ``min_kver = "7.1"`` runs also on kernel
+ * on any stable release (test with ``max_kver = "7.1"`` runs also on kernel
> > + for (i=0, dots=0; max_kver[i]; i++)
> Could spaces be added around both assignment operators to follow kernel
> coding style?
Ah, thanks! Before merge I'll amend:
- for (i=0, dots=0; max_kver[i]; i++)
+ for (i = 0, dots = 0; max_kver[i]; i++)
> --- [PATCH 3/5] ---
> > + .max_kver = "6.10",
> Could this test be allowed to run again on Linux 7.2? In that tree,
> do_open_execat() calls exe_file_deny_write_access() and returns ETXTBSY when
> the executable is open for writing (fs/exec.c:800-802).
> A permanent maximum version therefore reports TCONF for behavior that is
> valid again. It cannot represent the temporary 6.11 through 7.1 behavior
> window.
@Cyril @Andrea could you also please double check?
> --- [PATCH 4/5] ---
> > + .max_kver = "6.10",
> Could creat07 also be allowed to run again on Linux 7.2? The exec path makes
> i_writecount negative through exe_file_deny_write_access(), and creat() then
> reaches get_write_access(), which returns ETXTBSY for a negative count
> (include/linux/fs.h:2813-2816).
> This maximum bound suppresses valid 7.2 coverage and cannot describe the
> temporary 6.11 through 7.1 behavior window.
@Cyril @Andrea could you also please double check?
> --- [PATCH 5/5] ---
> > Because the above flag combinations are already "tested" by the tests
> > that use them and we don't have any tests that >= 5.10 has support for
> > FAN_MARK_FILESYSTEM etc just simply skip the test on v7.2.
> Could this claim be corrected? Other tests exercise FAN_REPORT_TID and
> FAN_REPORT_PIDFD separately, but fanotify20 is the only LTP test combining
> them.
Hm, do we care when Amir is ok with it?
Kind regards,
Petr
> > + .max_kver = "7.1",
> Could the first case instead expect success when thread pidfds are supported,
> while retaining the second valid-combination check? Linux 7.2 now uses
> task_pid(current) for FAN_REPORT_TID and creates a thread pidfd
> (fs/notify/fanotify/fanotify.c:843-849 and
> fs/notify/fanotify/fanotify_user.c:906-913). Skipping the whole test removes
> the only coverage of the newly valid combination.
> Verdict - Needs revision
> ---
> Note:
> The agent can sometimes produce false positives although often its
> findings are genuine. If you find issues with the review, please
> comment this email or ignore the suggestions.
> Regards,
> LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [LTP] lib: Rename function check_kver() => check_min_kver()
2026-07-31 12:20 ` Petr Vorel
@ 2026-07-31 12:37 ` Andrea Cervesato via ltp
2026-07-31 12:42 ` Petr Vorel
0 siblings, 1 reply; 12+ messages in thread
From: Andrea Cervesato via ltp @ 2026-07-31 12:37 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp, linuxtestproject.agent
Hi Petr,
> @Cyril @Andrea could you also please double check?
It's correct.
The legacy ETXTBSY behavior was fully restored in commit
3b832035387f (Revert "fs: don't block i_writecount during exec").
So we have a window where this is not valid anymore and we should
take this in consideration inside the test.
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 12+ messages in thread
* [LTP] [PATCH v3 2/5] lib: Add support for max_kver to struct tst_test and tst_fs
2026-07-31 10:51 [LTP] [PATCH v3 0/5] Add support for .max_kver Petr Vorel
2026-07-31 10:51 ` [LTP] [PATCH v3 1/5] lib: Rename function check_kver() => check_min_kver() Petr Vorel
@ 2026-07-31 10:51 ` Petr Vorel
2026-07-31 11:48 ` Avinesh Kumar via ltp
2026-07-31 10:51 ` [LTP] [PATCH v3 3/5] execve04: Use .max_kver Petr Vorel
` (2 subsequent siblings)
4 siblings, 1 reply; 12+ messages in thread
From: Petr Vorel @ 2026-07-31 10:51 UTC (permalink / raw)
To: ltp
max_kver adds a support to require a maximal kernel version the test can
run on. e.g. "7.2" (mainline release) or "6.1.180" (stable release).
NOTE: Mainline release is sufficient on any stable release (test with
.min_kver = "7.1" runs also on kernel 7.1.5). Stable releases are
compared as expected.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Changes v2->v3:
* Allow to pass mainline release (e.g. max_version = "7.1") on any stable
release (e.g. 7.1.5). Stable releases (e.g. 7.1.5) are compared as
expected. For this I'd like an explicit ack.
include/tst_test.h | 13 ++++++++++++-
lib/tst_test.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+), 1 deletion(-)
diff --git a/include/tst_test.h b/include/tst_test.h
index c69362485e..318b2f79b7 100644
--- a/include/tst_test.h
+++ b/include/tst_test.h
@@ -280,6 +280,9 @@ struct tst_ulimit_val {
*
* @min_kver: A minimum kernel version supporting the filesystem which has been
* created with mkfs.
+ *
+ * @max_kver: A maximum kernel version supporting the filesystem which has been
+ * created with mkfs.
*/
struct tst_fs {
const char *type;
@@ -292,6 +295,7 @@ struct tst_fs {
const void *mnt_data;
const char *min_kver;
+ const char *max_kver;
};
/**
@@ -301,7 +305,13 @@ struct tst_fs {
* and each time passed an increasing counter value.
* @options: An NULL optstr terminated array of struct tst_option.
*
- * @min_kver: A minimal kernel version the test can run on. e.g. "3.10".
+ * @min_kver: A minimal kernel version the test can run on. e.g. "4.4" (mainline
+ * release) or "6.1.180" (stable release).
+ *
+ * @max_kver: A maximal kernel version the test can run on. e.g. "7.2" (mainline
+ * release) or "6.1.180" (stable release). NOTE: Mainline release is sufficient
+ * on any stable release (test with ``min_kver = "7.1"`` runs also on kernel
+ * 7.1.5). Stable releases are compared as expected.
*
* @supported_archs: A NULL terminated array of architectures the test runs on
* e.g. {"x86_64, "x86", NULL}. Calls tst_is_on_arch() to
@@ -551,6 +561,7 @@ struct tst_fs {
struct tst_option *options;
const char *min_kver;
+ const char *max_kver;
const char *const *supported_archs;
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 778a1fed40..8b9abe716a 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -1087,6 +1087,44 @@ static bool check_min_kver(const char *min_kver, const int brk_nosupp)
return true;
}
+/*
+ * Check for the maximal required kernel version.
+ *
+ * return: true if the kernel version is low enough, false otherwise.
+ */
+static bool check_max_kver(const char *max_kver, const int brk_nosupp)
+{
+ char *msg;
+ int dots, i, v1, v2, v3;
+
+ if (tst_parse_kver(max_kver, &v1, &v2, &v3)) {
+ tst_res(TWARN,
+ "Invalid kernel version %s, expected %%d.%%d.%%d",
+ max_kver);
+ }
+
+ for (i=0, dots=0; max_kver[i]; i++)
+ dots += (max_kver[i] == '.');
+
+ /*
+ * For mainline kernel release without patch level (single dot e.g. "7.1")
+ * ignore v3 (the sublevel): 7.1.x is always ok.
+ * Do *not* ignore v3 on stable kernel release (2 dots, e.g. 7.1.5).
+ */
+ if (tst_kvercmp(v1, v2, v3) > (dots == 1 ? 1023 : 0)) {
+ msg = "The test requires kernel %s or older";
+
+ if (brk_nosupp)
+ tst_brk(TCONF, msg, max_kver);
+ else
+ tst_res(TCONF, msg, max_kver);
+
+ return false;
+ }
+
+ return true;
+}
+
/*
* Checks if the struct results values are equal.
*
@@ -1463,6 +1501,9 @@ static void do_setup(int argc, char *argv[])
if (tst_test->min_kver)
check_min_kver(tst_test->min_kver, 1);
+ if (tst_test->max_kver)
+ check_max_kver(tst_test->max_kver, 1);
+
if (tst_test->skip_in_lockdown && tst_lockdown_enabled() > 0)
tst_brk(TCONF, "Kernel is locked down, skipping test");
@@ -1586,6 +1627,9 @@ static void do_setup(int argc, char *argv[])
if (tst_test->filesystems && tst_test->filesystems->min_kver)
check_min_kver(tst_test->filesystems->min_kver, 1);
+ if (tst_test->filesystems && tst_test->filesystems->max_kver)
+ check_max_kver(tst_test->filesystems->max_kver, 1);
+
prepare_device(tst_test->filesystems);
}
}
@@ -1991,6 +2035,9 @@ static void run_tcase_on_fs(struct tst_fs *fs, const char *fs_type)
if (fs->min_kver && !check_min_kver(fs->min_kver, 0))
return;
+ if (fs->max_kver && !check_max_kver(fs->max_kver, 0))
+ return;
+
prepare_device(fs);
fork_testrun();
--
2.55.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [LTP] [PATCH v3 2/5] lib: Add support for max_kver to struct tst_test and tst_fs
2026-07-31 10:51 ` [LTP] [PATCH v3 2/5] lib: Add support for max_kver to struct tst_test and tst_fs Petr Vorel
@ 2026-07-31 11:48 ` Avinesh Kumar via ltp
0 siblings, 0 replies; 12+ messages in thread
From: Avinesh Kumar via ltp @ 2026-07-31 11:48 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
On 7/31/26 12:51 PM, Petr Vorel wrote:
> max_kver adds a support to require a maximal kernel version the test can
> run on. e.g. "7.2" (mainline release) or "6.1.180" (stable release).
>
> NOTE: Mainline release is sufficient on any stable release (test with
> .min_kver = "7.1" runs also on kernel 7.1.5). Stable releases are
> compared as expected.
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Changes v2->v3:
> * Allow to pass mainline release (e.g. max_version = "7.1") on any stable
> release (e.g. 7.1.5). Stable releases (e.g. 7.1.5) are compared as
> expected. For this I'd like an explicit ack.
>
> include/tst_test.h | 13 ++++++++++++-
> lib/tst_test.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 59 insertions(+), 1 deletion(-)
>
> diff --git a/include/tst_test.h b/include/tst_test.h
> index c69362485e..318b2f79b7 100644
> --- a/include/tst_test.h
> +++ b/include/tst_test.h
> @@ -280,6 +280,9 @@ struct tst_ulimit_val {
> *
> * @min_kver: A minimum kernel version supporting the filesystem which has been
> * created with mkfs.
> + *
> + * @max_kver: A maximum kernel version supporting the filesystem which has been
> + * created with mkfs.
> */
> struct tst_fs {
> const char *type;
> @@ -292,6 +295,7 @@ struct tst_fs {
> const void *mnt_data;
>
> const char *min_kver;
> + const char *max_kver;
> };
>
> /**
> @@ -301,7 +305,13 @@ struct tst_fs {
> * and each time passed an increasing counter value.
> * @options: An NULL optstr terminated array of struct tst_option.
> *
> - * @min_kver: A minimal kernel version the test can run on. e.g. "3.10".
> + * @min_kver: A minimal kernel version the test can run on. e.g. "4.4" (mainline
> + * release) or "6.1.180" (stable release).
> + *
> + * @max_kver: A maximal kernel version the test can run on. e.g. "7.2" (mainline
> + * release) or "6.1.180" (stable release). NOTE: Mainline release is sufficient
> + * on any stable release (test with ``min_kver = "7.1"`` runs also on kernel
> + * 7.1.5). Stable releases are compared as expected.
> *
> * @supported_archs: A NULL terminated array of architectures the test runs on
> * e.g. {"x86_64, "x86", NULL}. Calls tst_is_on_arch() to
> @@ -551,6 +561,7 @@ struct tst_fs {
> struct tst_option *options;
>
> const char *min_kver;
> + const char *max_kver;
>
> const char *const *supported_archs;
>
> diff --git a/lib/tst_test.c b/lib/tst_test.c
> index 778a1fed40..8b9abe716a 100644
> --- a/lib/tst_test.c
> +++ b/lib/tst_test.c
> @@ -1087,6 +1087,44 @@ static bool check_min_kver(const char *min_kver, const int brk_nosupp)
> return true;
> }
>
> +/*
> + * Check for the maximal required kernel version.
> + *
> + * return: true if the kernel version is low enough, false otherwise.
> + */
> +static bool check_max_kver(const char *max_kver, const int brk_nosupp)
> +{
> + char *msg;
> + int dots, i, v1, v2, v3;
> +
> + if (tst_parse_kver(max_kver, &v1, &v2, &v3)) {
> + tst_res(TWARN,
> + "Invalid kernel version %s, expected %%d.%%d.%%d",
> + max_kver);
> + }
> +
> + for (i=0, dots=0; max_kver[i]; i++)
> + dots += (max_kver[i] == '.');
> +
> + /*
> + * For mainline kernel release without patch level (single dot e.g. "7.1")
> + * ignore v3 (the sublevel): 7.1.x is always ok.
> + * Do *not* ignore v3 on stable kernel release (2 dots, e.g. 7.1.5).
> + */
> + if (tst_kvercmp(v1, v2, v3) > (dots == 1 ? 1023 : 0)) {
> + msg = "The test requires kernel %s or older";
> +
> + if (brk_nosupp)
> + tst_brk(TCONF, msg, max_kver);
> + else
> + tst_res(TCONF, msg, max_kver);
> +
> + return false;
> + }
> +
> + return true;
> +}
Hi Petr,
This looks good. I tested it (and other patches) as well.
on my system, test runs fine -
tst_test.c:2097: TINFO: Tested kernel: 7.1.4-1-default
...
and
on >=7.2
# ./fanotify20
tst_test.c:1118: TCONF: The test requires kernel 7.1 or older
so feel free to add
Tested-by: Avinesh Kumar <avinesh.kumar@suse.com>
Reviewed-by: Avinesh Kumar <avinesh.kumar@suse.com>
for whole series.
Thanks,
Avinesh
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 12+ messages in thread
* [LTP] [PATCH v3 3/5] execve04: Use .max_kver
2026-07-31 10:51 [LTP] [PATCH v3 0/5] Add support for .max_kver Petr Vorel
2026-07-31 10:51 ` [LTP] [PATCH v3 1/5] lib: Rename function check_kver() => check_min_kver() Petr Vorel
2026-07-31 10:51 ` [LTP] [PATCH v3 2/5] lib: Add support for max_kver to struct tst_test and tst_fs Petr Vorel
@ 2026-07-31 10:51 ` Petr Vorel
2026-07-31 10:51 ` [LTP] [PATCH v3 4/5] creat07: " Petr Vorel
2026-07-31 10:51 ` [LTP] [PATCH v3 5/5] fanotify20: Skip on v7.2 Petr Vorel
4 siblings, 0 replies; 12+ messages in thread
From: Petr Vorel @ 2026-07-31 10:51 UTC (permalink / raw)
To: ltp
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
The same as in v2.
testcases/kernel/syscalls/execve/execve04.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/testcases/kernel/syscalls/execve/execve04.c b/testcases/kernel/syscalls/execve/execve04.c
index 35ec882a07..6f06a4a4cc 100644
--- a/testcases/kernel/syscalls/execve/execve04.c
+++ b/testcases/kernel/syscalls/execve/execve04.c
@@ -11,6 +11,9 @@
/*\
* Attempt to :manpage:`execve(2)` a file which is being opened by another process for
* writing fails with ETXTBSY.
+ *
+ * NOTE: write to executed file is allowed since 6.11-rc1:
+ * 2a010c412853 ("fs: don't block i_writecount during exec")
*/
#define _GNU_SOURCE
@@ -62,19 +65,10 @@ static void do_child(void)
exit(0);
}
-static void setup(void)
-{
- if ((tst_kvercmp(6, 11, 0)) >= 0) {
- tst_brk(TCONF, "Skipping test, write to executed file is "
- "allowed since 6.11-rc1.\n"
- "2a010c412853 (\"fs: don't block i_writecount during exec\")");
- }
-}
-
static struct tst_test test = {
- .setup = setup,
.test_all = verify_execve,
.forks_child = 1,
+ .max_kver = "6.10",
.child_needs_reinit = 1,
.needs_checkpoints = 1,
.resource_files = (const char *const []) {
--
2.55.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 12+ messages in thread* [LTP] [PATCH v3 4/5] creat07: Use .max_kver
2026-07-31 10:51 [LTP] [PATCH v3 0/5] Add support for .max_kver Petr Vorel
` (2 preceding siblings ...)
2026-07-31 10:51 ` [LTP] [PATCH v3 3/5] execve04: Use .max_kver Petr Vorel
@ 2026-07-31 10:51 ` Petr Vorel
2026-07-31 10:51 ` [LTP] [PATCH v3 5/5] fanotify20: Skip on v7.2 Petr Vorel
4 siblings, 0 replies; 12+ messages in thread
From: Petr Vorel @ 2026-07-31 10:51 UTC (permalink / raw)
To: ltp
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
The same as in v2.
testcases/kernel/syscalls/creat/creat07.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/testcases/kernel/syscalls/creat/creat07.c b/testcases/kernel/syscalls/creat/creat07.c
index c7b85ee694..2b15d79b47 100644
--- a/testcases/kernel/syscalls/creat/creat07.c
+++ b/testcases/kernel/syscalls/creat/creat07.c
@@ -6,6 +6,9 @@
/*\
* Check that :manpage:`creat(2)` sets ETXTBSY correctly.
+ *
+ * NOTE: write to executed file is allowed since 6.11-rc1:
+ * 2a010c412853 ("fs: don't block i_writecount during exec")
*/
#include <sys/types.h>
@@ -47,19 +50,10 @@ static void verify_creat(void)
SAFE_WAITPID(pid, NULL, 0);
}
-static void setup(void)
-{
- if ((tst_kvercmp(6, 11, 0)) >= 0) {
- tst_brk(TCONF, "Skipping test, write to executed file is "
- "allowed since 6.11-rc1.\n"
- "2a010c412853 (\"fs: don't block i_writecount during exec\")");
- }
-}
-
static struct tst_test test = {
- .setup = setup,
.test_all = verify_creat,
.needs_checkpoints = 1,
+ .max_kver = "6.10",
.forks_child = 1,
.resource_files = (const char *const []) {
TEST_APP,
--
2.55.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 12+ messages in thread* [LTP] [PATCH v3 5/5] fanotify20: Skip on v7.2
2026-07-31 10:51 [LTP] [PATCH v3 0/5] Add support for .max_kver Petr Vorel
` (3 preceding siblings ...)
2026-07-31 10:51 ` [LTP] [PATCH v3 4/5] creat07: " Petr Vorel
@ 2026-07-31 10:51 ` Petr Vorel
4 siblings, 0 replies; 12+ messages in thread
From: Petr Vorel @ 2026-07-31 10:51 UTC (permalink / raw)
To: ltp; +Cc: Jan Kara, Amir Goldstein, AnonymeMeow
fanotify_init() used to reject FAN_REPORT_PIDFD combined with
FAN_REPORT_TID with EINVAL. Since Linux v7.2, fanotify supports
reporting pidfds for thread IDs, so this combination is expected to
succeed.
The test that these flag combinations are allowed:
FLAGS_DESC(FAN_REPORT_PIDFD | FAN_REPORT_TID),
FLAGS_DESC(FAN_REPORT_PIDFD | FAN_REPORT_FID |
FAN_REPORT_DFID_NAME),
Because the above flag combinations are already "tested" by the tests
that use them and we don't have any tests that >= 5.10 has support for
FAN_MARK_FILESYSTEM etc just simply skip the test on v7.2.
Reported-by: AnonymeMeow <anonymemeow@gmail.com>
Suggested-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
The same as in v2.
testcases/kernel/syscalls/fanotify/fanotify20.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/testcases/kernel/syscalls/fanotify/fanotify20.c b/testcases/kernel/syscalls/fanotify/fanotify20.c
index b32ecf6aa3..db4a5ba63b 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify20.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify20.c
@@ -15,6 +15,9 @@
*
* NOTE: FAN_REPORT_PIDFD support was added in v5.15-rc1 in
* af579beb666a ("fanotify: add pidfd support to the fanotify API").
+ *
+ * NOTE: since v7.2, fanotify supports reporting pidfds for thread IDs => skip
+ * the test.
*/
#define _GNU_SOURCE
@@ -75,6 +78,7 @@ static void do_cleanup(void)
static struct tst_test test = {
.setup = do_setup,
+ .max_kver = "7.1",
.test = do_test,
.tcnt = ARRAY_SIZE(test_cases),
.cleanup = do_cleanup,
--
2.55.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 12+ messages in thread