package/ltp-testsuite: proper fix for missing __kernel_fsid_t
PATCH v3 1/1 package/ltp-testsuite: proper fix for missing __kernel_fsid_t
Backported 4 fixes from upstream (2 of them require calling autoreconf).
---
Hi,
regression found and sent upstream [1], see notes there. I'd prefer merging this after it's merged upstream.
Various tests run:pc_x86_64_bios_defconfig with changed libc to musl (the one with BR2_TOOLCHAIN_BUILDROOT_MUSL=y, which failed).
MUSL with BR2_TOOLCHAIN_EXTERNAL_MUSL=y (worked previously)
br-x86-64-musl [1/5]: OK
br-arm-cortex-a9-musl [2/5]: OK
br-i386-pentium-mmx-musl [3/5]: OK
br-arm-full-static [4/5]: OK
br-arm-full [5/5]: OKAlso checked the default LTP travis build [2].
[1] https://patchwork.ozlabs.org/patch/1195915/
[2] https://travis-ci.org/pevik/ltp/builds/612641003
...x-missing-__kernel_fsid_t-definition.patch | 41 ------- ...kernel_fsid_t-definition-to-correct-.patch | 61 ++++++++++ ...work-checks-for-fallback-definitions.patch | 91 +++++++++++++++ ...val-vs.-__val-fanotify_event_info_fi.patch | 108 ++++++++++++++++++ .../0007-fanotify-Fix-for-musl.patch | 30 +++++ package/ltp-testsuite/ltp-testsuite.mk | 4 + 6 files changed, 294 insertions(+), 41 deletions(-) delete mode 100644 package/ltp-testsuite/0004-fanotify-Fix-missing-__kernel_fsid_t-definition.patch create mode 100644 package/ltp-testsuite/0004-fanotify-Move-__kernel_fsid_t-definition-to-correct-.patch create mode 100644 package/ltp-testsuite/0005-fanotify-Rework-checks-for-fallback-definitions.patch create mode 100644 package/ltp-testsuite/0006-fanotify-Detect-val-vs.-__val-fanotify_event_info_fi.patch create mode 100644 package/ltp-testsuite/0007-fanotify-Fix-for-musl.patch
package/ltp-testsuite/0004-fanotify-Fix-missing-__kernel_fsid_t-definition.patch deleted +0 -41
@@ -1,41 +0,0 @@ -From b8aebc83523691be2b37e87c62099d700b0473c7 Mon Sep 17 00:00:00 2001 -From: Petr Vorel <[email protected]> -Date: Mon, 14 Oct 2019 15:35:53 +0200 -Subject: [PATCH] fanotify: Fix missing __kernel_fsid_t definition - -which is needed for fallback definition when FAN_REPORT_FID is missing. -Instead of including <asm/posix_types.h> where it's defined we just -define the missing bit. - -This fixes build error at least on musl. - -Acked-by: Cyril Hrubis <[email protected]> -Acked-by: Jan Stancek <[email protected]> -Suggested-by: Jan Stancek <[email protected]> -Signed-off-by: Petr Vorel <[email protected]> -[Upstream status: b8aebc83523691be2b37e87c62099d700b0473c7] ---- - testcases/kernel/syscalls/fanotify/fanotify.h | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h -index 1c7623d3b..435f100d8 100644 ---- a/testcases/kernel/syscalls/fanotify/fanotify.h -+++ b/testcases/kernel/syscalls/fanotify/fanotify.h -@@ -126,6 +126,13 @@ struct fanotify_event_info_header { - }; - - #ifdef HAVE_NAME_TO_HANDLE_AT -+#ifndef __kernel_fsid_t -+typedef struct { -+ int val[2]; -+} lapi_fsid_t; -+#define __kernel_fsid_t lapi_fsid_t -+#endif -+ - struct fanotify_event_info_fid { - struct fanotify_event_info_header hdr; - __kernel_fsid_t fsid; --- -2.23.0 -
package/ltp-testsuite/0004-fanotify-Move-__kernel_fsid_t-definition-to-correct-.patch new file +61 -0
61 lines not on this page · raw message
package/ltp-testsuite/0005-fanotify-Rework-checks-for-fallback-definitions.patch new file +91 -0
91 lines not on this page · raw message
package/ltp-testsuite/0006-fanotify-Detect-val-vs.-__val-fanotify_event_info_fi.patch new file +108 -0
108 lines not on this page · raw message
package/ltp-testsuite/0007-fanotify-Fix-for-musl.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 087e13ecb9eea6cbd920708e64eab18e7ab8a90c Mon Sep 17 00:00:00 2001 +From: Petr Vorel <[email protected]> +Date: Sat, 16 Nov 2019 00:14:42 +0100 +Subject: [PATCH] fanotify: Fix for musl + +Fixes: 0498fc0a8 ("fanotify: Detect val vs. __val fanotify_event_info_fid.fsid member") + +Signed-off-by: Petr Vorel <[email protected]> +--- + testcases/kernel/syscalls/fanotify/fanotify13.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/testcases/kernel/syscalls/fanotify/fanotify13.c b/testcases/kernel/syscalls/fanotify/fanotify13.c +index 26212ab62..3d8de6009 100644 +--- a/testcases/kernel/syscalls/fanotify/fanotify13.c ++++ b/testcases/kernel/syscalls/fanotify/fanotify13.c +@@ -130,8 +130,8 @@ static int setup_marks(unsigned int fd, struct test_case_t *tc) + "kernel"); + return 1; + } else if (errno == ENODEV && +- !FSID_VAL_MEMBER(event_set[i].fsid, 0) && +- !FSID_VAL_MEMBER(event_set[i].fsid, 1)) { ++ !event_set[i].fsid.val[0] && ++ !event_set[i].fsid.val[1]) { + tst_res(TCONF, + "FAN_REPORT_FID not supported on " + "filesystem type %s", +-- +2.24.0 +
package/ltp-testsuite/ltp-testsuite.mk +4 -0
@@ -117,4 +117,8 @@ endef LTP_TESTSUITE_POST_PATCH_HOOKS += LTP_TESTSUITE_REMOVE_LDD endif +# 0005-fanotify-Rework-checks-for-fallback-definitions.patch +# 0006-fanotify-Detect-val-vs.-__val-fanotify_event_info_fi.patch +LTP_TESTSUITE_AUTORECONF = YES + $(eval $(autotools-package))
Signature · 1 line
2.24.0
PATCH v3 1/1 package/ltp-testsuite: proper fix for missing __kernel_fsid_t
Petr, All,
On 2019-11-16 01:36 +0100, Petr Vorel spake thusly:
Quoted 5 lines
Backported 4 fixes from upstream (2 of them require calling autoreconf).
Signed-off-by Petr Vorel <[email protected]>
[--SNIP--]
Quoted 2 lines
regression found and sent upstream [1], see notes there. I'd prefer merging this after it's merged upstream.
[--SNIP--]
Quoted 1 line
I've added this URL to the description of patch 7, and applied to master, thanks.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 1/1 package/ltp-testsuite: proper fix for missing __kernel_fsid_t
Hi Yann,
Quoted 5 lines
[--SNIP--]
Quoted 1 line
I've added this URL to the description of patch 7, and applied to master, thanks.
Thanks! I'll probably merge patch [1] in LTP on Monday (already Acked by Jan Stancek, pretty obvious, but I'll prefer to wait Cyril Hrubis ack).
Not sure if it's worth then add commit hash in buildroot patch and renumber patches (0005 was already taken by static linking fix), I guess these are minor and not needed to be done. Anyway, these are 3 are backports thus temporary.
Kind regards,
Petr