* [LTP] [PATCH] fanotify: fix missing fallback for FAN_RESPONSE_ERRNO
@ 2025-03-31 8:15 Andrea Cervesato
2025-03-31 9:55 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Andrea Cervesato @ 2025-03-31 8:15 UTC (permalink / raw)
To: ltp
From: Andrea Cervesato <andrea.cervesato@suse.com>
Fix the following build error on i586:
fanotify24.c: In function ‘expected_errno’:
..
173 | return FAN_RESPONSE_ERRNO(response);
| ^~~~~~~~~~~~~~~~~~
| FAN_DENY_ERRNO
make[4]: *** [../../../../include/mk/rules.mk:48: fanotify24] Error 1
Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
The reason of the fail is related to the FAN_RESPONSE_ERRNO
definition, which is skipped in the fallback header file.
https://openqa.opensuse.org/tests/4961163#step/install_ltp/82
---
include/lapi/fanotify.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/lapi/fanotify.h b/include/lapi/fanotify.h
index 76907ea5f21989c5185478d3d4f5577d9403e519..8d04c8f28969d0b3d5fec71824d569b01c9ec054 100644
--- a/include/lapi/fanotify.h
+++ b/include/lapi/fanotify.h
@@ -128,6 +128,9 @@
#ifndef FAN_DENY_ERRNO
#define FAN_ERRNO(err) (((((__u32)(err)) & 0xff) << 24))
#define FAN_DENY_ERRNO(err) (FAN_DENY | FAN_ERRNO(err))
+#endif
+
+#ifndef FAN_RESPONSE_ERRNO
#define FAN_RESPONSE_ERRNO(res) ((int)((res) >> 24))
#endif
---
base-commit: 1aca297938c85b41e41c913d4ffc0ecc345d02d4
change-id: 20250331-fix_fanotify_i586-e96ee3d06275
Best regards,
--
Andrea Cervesato <andrea.cervesato@suse.com>
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [LTP] [PATCH] fanotify: fix missing fallback for FAN_RESPONSE_ERRNO
2025-03-31 8:15 [LTP] [PATCH] fanotify: fix missing fallback for FAN_RESPONSE_ERRNO Andrea Cervesato
@ 2025-03-31 9:55 ` Petr Vorel
2025-03-31 10:01 ` Andrea Cervesato via ltp
0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2025-03-31 9:55 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: Jan Kara, ltp
Hi Andrea, all,
[ Cc fanotify developers + active LTP maintainers for CI change decision ]
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Please add before merge:
Fixes: c088316452 ("fanotify24: Add test for FAN_PRE_ACCESS and FAN_DENY_ERRNO")
> From: Andrea Cervesato <andrea.cervesato@suse.com>
> Fix the following build error on i586:
> fanotify24.c: In function ‘expected_errno’:
> ..
> 173 | return FAN_RESPONSE_ERRNO(response);
> | ^~~~~~~~~~~~~~~~~~
> | FAN_DENY_ERRNO
> make[4]: *** [../../../../include/mk/rules.mk:48: fanotify24] Error 1
This is not i586 specific, it fails in our OBS also on x86_64 [1]. In fact it's
not an arch specific - it fails on all archs, e.g.: aarch64 [2] ppc64le [3].
This is actually caused by update of /usr/include/linux/fanotify.h from kernel
6.14 (in openSUSE Tumbleweed provided by linux-glibc-devel-6.14-1.1).
Please fix the commit message before merge.
And I agree that the best to avoid this in the future is to add a guard to any
definition.
@Andrea @Li @Cyril We had in the past Tumbleweed, but due internal repo problem
it sometimes failed. I wonder if it's a time trying to reintroduce it again to
catch this. If it's not working, we might try Fedora rawhide (@Li not sure if
rawhide is generally usable for CI).
Kind regards,
Petr
[1] https://build.opensuse.org/package/live_build_log/benchmark:ltp:devel/ltp/openSUSE_Factory/x86_64
[2] https://build.opensuse.org/package/live_build_log/benchmark:ltp:devel/ltp/openSUSE_Factory_ARM/aarch64
[3] https://build.opensuse.org/package/live_build_log/benchmark:ltp:devel/ltp/openSUSE_Factory_PowerPC/ppc64le
> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> ---
> The reason of the fail is related to the FAN_RESPONSE_ERRNO
> definition, which is skipped in the fallback header file.
> https://openqa.opensuse.org/tests/4961163#step/install_ltp/82
> ---
> include/lapi/fanotify.h | 3 +++
> 1 file changed, 3 insertions(+)
> diff --git a/include/lapi/fanotify.h b/include/lapi/fanotify.h
> index 76907ea5f21989c5185478d3d4f5577d9403e519..8d04c8f28969d0b3d5fec71824d569b01c9ec054 100644
> --- a/include/lapi/fanotify.h
> +++ b/include/lapi/fanotify.h
> @@ -128,6 +128,9 @@
> #ifndef FAN_DENY_ERRNO
> #define FAN_ERRNO(err) (((((__u32)(err)) & 0xff) << 24))
> #define FAN_DENY_ERRNO(err) (FAN_DENY | FAN_ERRNO(err))
> +#endif
> +
> +#ifndef FAN_RESPONSE_ERRNO
> #define FAN_RESPONSE_ERRNO(res) ((int)((res) >> 24))
> #endif
> ---
> base-commit: 1aca297938c85b41e41c913d4ffc0ecc345d02d4
> change-id: 20250331-fix_fanotify_i586-e96ee3d06275
> Best regards,
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [LTP] [PATCH] fanotify: fix missing fallback for FAN_RESPONSE_ERRNO
2025-03-31 9:55 ` Petr Vorel
@ 2025-03-31 10:01 ` Andrea Cervesato via ltp
0 siblings, 0 replies; 3+ messages in thread
From: Andrea Cervesato via ltp @ 2025-03-31 10:01 UTC (permalink / raw)
To: Petr Vorel, Andrea Cervesato; +Cc: Jan Kara, ltp
Merged, thanks for the fast reply.
- Andrea
On 3/31/25 11:55, Petr Vorel wrote:
> Hi Andrea, all,
>
> [ Cc fanotify developers + active LTP maintainers for CI change decision ]
>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>
> Please add before merge:
>
> Fixes: c088316452 ("fanotify24: Add test for FAN_PRE_ACCESS and FAN_DENY_ERRNO")
>
>> From: Andrea Cervesato <andrea.cervesato@suse.com>
>> Fix the following build error on i586:
>> fanotify24.c: In function ‘expected_errno’:
>> ..
>> 173 | return FAN_RESPONSE_ERRNO(response);
>> | ^~~~~~~~~~~~~~~~~~
>> | FAN_DENY_ERRNO
>> make[4]: *** [../../../../include/mk/rules.mk:48: fanotify24] Error 1
> This is not i586 specific, it fails in our OBS also on x86_64 [1]. In fact it's
> not an arch specific - it fails on all archs, e.g.: aarch64 [2] ppc64le [3].
> This is actually caused by update of /usr/include/linux/fanotify.h from kernel
> 6.14 (in openSUSE Tumbleweed provided by linux-glibc-devel-6.14-1.1).
> Please fix the commit message before merge.
>
> And I agree that the best to avoid this in the future is to add a guard to any
> definition.
>
> @Andrea @Li @Cyril We had in the past Tumbleweed, but due internal repo problem
> it sometimes failed. I wonder if it's a time trying to reintroduce it again to
> catch this. If it's not working, we might try Fedora rawhide (@Li not sure if
> rawhide is generally usable for CI).
>
> Kind regards,
> Petr
>
> [1] https://build.opensuse.org/package/live_build_log/benchmark:ltp:devel/ltp/openSUSE_Factory/x86_64
> [2] https://build.opensuse.org/package/live_build_log/benchmark:ltp:devel/ltp/openSUSE_Factory_ARM/aarch64
> [3] https://build.opensuse.org/package/live_build_log/benchmark:ltp:devel/ltp/openSUSE_Factory_PowerPC/ppc64le
>
>> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
>> ---
>> The reason of the fail is related to the FAN_RESPONSE_ERRNO
>> definition, which is skipped in the fallback header file.
>> https://openqa.opensuse.org/tests/4961163#step/install_ltp/82
>> ---
>> include/lapi/fanotify.h | 3 +++
>> 1 file changed, 3 insertions(+)
>> diff --git a/include/lapi/fanotify.h b/include/lapi/fanotify.h
>> index 76907ea5f21989c5185478d3d4f5577d9403e519..8d04c8f28969d0b3d5fec71824d569b01c9ec054 100644
>> --- a/include/lapi/fanotify.h
>> +++ b/include/lapi/fanotify.h
>> @@ -128,6 +128,9 @@
>> #ifndef FAN_DENY_ERRNO
>> #define FAN_ERRNO(err) (((((__u32)(err)) & 0xff) << 24))
>> #define FAN_DENY_ERRNO(err) (FAN_DENY | FAN_ERRNO(err))
>> +#endif
>> +
>> +#ifndef FAN_RESPONSE_ERRNO
>> #define FAN_RESPONSE_ERRNO(res) ((int)((res) >> 24))
>> #endif
>
>> ---
>> base-commit: 1aca297938c85b41e41c913d4ffc0ecc345d02d4
>> change-id: 20250331-fix_fanotify_i586-e96ee3d06275
>> Best regards,
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-31 10:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-31 8:15 [LTP] [PATCH] fanotify: fix missing fallback for FAN_RESPONSE_ERRNO Andrea Cervesato
2025-03-31 9:55 ` Petr Vorel
2025-03-31 10:01 ` Andrea Cervesato via ltp
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.