diff mbox series

[1/1] fanotify09: Skip testing e730558adffb on SLE < 5.19 kernel

Message ID 20240904123604.875639-1-pvorel@suse.cz
State Rejected
Headers show
Series [1/1] fanotify09: Skip testing e730558adffb on SLE < 5.19 kernel | expand

Commit Message

Petr Vorel Sept. 4, 2024, 12:36 p.m. UTC
Kernel commit e730558adffb ("fsnotify: consistent behavior for parent
not watching children") will not be backported to SLE15-SP[45] v5.14
based kernel, therefore skip it for kernel < 5.19 (the original mainline
kernel which brought the functionality.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/kernel/syscalls/fanotify/fanotify09.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Avinesh Kumar Sept. 5, 2024, 2:12 p.m. UTC | #1
Hi,

Reviewed-by: Avinesh Kumar <akumar@suse.de>

On Wednesday, September 4, 2024 2:36:04 PM GMT+2 Petr Vorel wrote:
> Kernel commit e730558adffb ("fsnotify: consistent behavior for parent
> not watching children") will not be backported to SLE15-SP[45] v5.14
> based kernel, therefore skip it for kernel < 5.19 (the original mainline
> kernel which brought the functionality.
> 
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  testcases/kernel/syscalls/fanotify/fanotify09.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/testcases/kernel/syscalls/fanotify/fanotify09.c b/testcases/kernel/syscalls/fanotify/fanotify09.c
> index 48b198b941..72e9239897 100644
> --- a/testcases/kernel/syscalls/fanotify/fanotify09.c
> +++ b/testcases/kernel/syscalls/fanotify/fanotify09.c
> @@ -379,7 +379,12 @@ static void test_fanotify(unsigned int n)
>  		return;
>  	}
>  
> -	if (tc->ignore && tst_kvercmp(5, 10, 0) < 0) {
> +	static struct tst_kern_exv kvers[] = {
> +		{"SLES", "5.19"},
> +		{NULL, NULL}
> +	};
> +
> +	if (tc->ignore && tst_kvercmp2(5, 10, 0, kvers) < 0) {
>  		tst_res(TCONF, "ignored mask on parent dir has undefined "
>  				"behavior on kernel < 5.10");
>  		return;
> 

Regards,
Avinesh
Martin Doucha Sept. 10, 2024, 8:46 a.m. UTC | #2
Hi,
I've added fanotify09 to our internal whitelist for SLES with the 
relevant kernels. This patch is no longer needed.

On 04. 09. 24 14:36, Petr Vorel wrote:
> Kernel commit e730558adffb ("fsnotify: consistent behavior for parent
> not watching children") will not be backported to SLE15-SP[45] v5.14
> based kernel, therefore skip it for kernel < 5.19 (the original mainline
> kernel which brought the functionality.
> 
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>   testcases/kernel/syscalls/fanotify/fanotify09.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/testcases/kernel/syscalls/fanotify/fanotify09.c b/testcases/kernel/syscalls/fanotify/fanotify09.c
> index 48b198b941..72e9239897 100644
> --- a/testcases/kernel/syscalls/fanotify/fanotify09.c
> +++ b/testcases/kernel/syscalls/fanotify/fanotify09.c
> @@ -379,7 +379,12 @@ static void test_fanotify(unsigned int n)
>   		return;
>   	}
>   
> -	if (tc->ignore && tst_kvercmp(5, 10, 0) < 0) {
> +	static struct tst_kern_exv kvers[] = {
> +		{"SLES", "5.19"},
> +		{NULL, NULL}
> +	};
> +
> +	if (tc->ignore && tst_kvercmp2(5, 10, 0, kvers) < 0) {
>   		tst_res(TCONF, "ignored mask on parent dir has undefined "
>   				"behavior on kernel < 5.10");
>   		return;
diff mbox series

Patch

diff --git a/testcases/kernel/syscalls/fanotify/fanotify09.c b/testcases/kernel/syscalls/fanotify/fanotify09.c
index 48b198b941..72e9239897 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify09.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify09.c
@@ -379,7 +379,12 @@  static void test_fanotify(unsigned int n)
 		return;
 	}
 
-	if (tc->ignore && tst_kvercmp(5, 10, 0) < 0) {
+	static struct tst_kern_exv kvers[] = {
+		{"SLES", "5.19"},
+		{NULL, NULL}
+	};
+
+	if (tc->ignore && tst_kvercmp2(5, 10, 0, kvers) < 0) {
 		tst_res(TCONF, "ignored mask on parent dir has undefined "
 				"behavior on kernel < 5.10");
 		return;