package/ltp-testsuite: Rename older patches
authorPetr Vorel <petr.vorel@gmail.com>
Wed, 20 Nov 2019 17:14:01 +0000 (18:14 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 20 Nov 2019 21:00:38 +0000 (22:00 +0100)
* add upstream commit hash
* renumber patches

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/ltp-testsuite/0005-Fix-static-linking-with-musl-fts.patch [deleted file]
package/ltp-testsuite/0007-fanotify-Fix-FSID_VAL_MEMBER-usage.patch [new file with mode: 0644]
package/ltp-testsuite/0007-fanotify-Fix-for-musl.patch [deleted file]
package/ltp-testsuite/0011-Fix-static-linking-with-musl-fts.patch [new file with mode: 0644]

diff --git a/package/ltp-testsuite/0005-Fix-static-linking-with-musl-fts.patch b/package/ltp-testsuite/0005-Fix-static-linking-with-musl-fts.patch
deleted file mode 100644 (file)
index 9fa888d..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-From 9bf80b5781fc62e0dd821413a6d21f2689ee4ef1 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Mon, 14 Oct 2019 11:47:49 +0200
-Subject: [PATCH] Fix static linking with musl-fts
-
-Don't append libraries to LDLIBS but prepend them in cpuset_lib/Makefile
-and cpuset/Makefile.inc to allow the user to provide its FTS library
-such as -lfts for musl/uclibc through LDLIBS
-
-This will fix static build of ltp with musl-fts on uclibc
-
-Fixes:
- - http://autobuild.buildroot.org/results/9155326e1ff7c2bb2218122c453872c2fc76f65e
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-[Upstream status: https://github.com/linux-test-project/ltp/pull/616]
----
- testcases/kernel/controllers/cpuset/Makefile.inc        | 2 +-
- testcases/kernel/controllers/cpuset/cpuset_lib/Makefile | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/testcases/kernel/controllers/cpuset/Makefile.inc b/testcases/kernel/controllers/cpuset/Makefile.inc
-index db6a84305..c03dd77d7 100644
---- a/testcases/kernel/controllers/cpuset/Makefile.inc
-+++ b/testcases/kernel/controllers/cpuset/Makefile.inc
-@@ -41,7 +41,7 @@ MAKE_DEPS            := $(LIBCONTROLLERS) $(LIBCPUSET)
- LDFLAGS                       += -L$(abs_builddir)/$(LIBCPUSET_DIR) -L$(abs_builddir)/$(LIBCONTROLLERS_DIR)
--LDLIBS                        += -lcpu_set -lcontrollers -lltp
-+LDLIBS                        := -lcpu_set -lcontrollers -lltp $(LDLIBS)
- INSTALL_TARGETS               ?= *.sh
-diff --git a/testcases/kernel/controllers/cpuset/cpuset_lib/Makefile b/testcases/kernel/controllers/cpuset/cpuset_lib/Makefile
-index 322d03cac..069ebc38c 100644
---- a/testcases/kernel/controllers/cpuset/cpuset_lib/Makefile
-+++ b/testcases/kernel/controllers/cpuset/cpuset_lib/Makefile
-@@ -25,7 +25,7 @@ top_srcdir           ?= ../../../../..
- include $(top_srcdir)/include/mk/testcases.mk
--LDLIBS                        += -lm -lcontrollers -lltp
-+LDLIBS                        := -lm -lcontrollers -lltp $(LDLIBS)
- LIB                   := libcpu_set.a
--- 
-2.24.0
-
diff --git a/package/ltp-testsuite/0007-fanotify-Fix-FSID_VAL_MEMBER-usage.patch b/package/ltp-testsuite/0007-fanotify-Fix-FSID_VAL_MEMBER-usage.patch
new file mode 100644 (file)
index 0000000..2e80c58
--- /dev/null
@@ -0,0 +1,55 @@
+From f37704d6cf69c9616dfd2aee5647b7941aa2bbaa Mon Sep 17 00:00:00 2001
+From: Petr Vorel <petr.vorel@gmail.com>
+Date: Sat, 16 Nov 2019 00:14:42 +0100
+Subject: [PATCH] fanotify: Fix FSID_VAL_MEMBER() usage
+
+This basically reverts part of 0498fc0a8.
+
+FSID_VAL_MEMBER() wrapper was meant to be only for struct
+fanotify_event_info_fid, it was used also for struct event_t
+(which has also __kernel_fsid_t fsid, but shouldn't be redefined).
+
+This caused error on recent musl v1.1.23 (with f67b3c17),
+which has struct fanotify_event_info_fid.
+
+Fixes: 0498fc0a8 ("fanotify: Detect val vs. __val
+fanotify_event_info_fid.fsid member")
+
+Acked-by: Jan Stancek <jstancek@redhat.com>
+Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
+[Upstream status: f37704d6cf69c9616dfd2aee5647b7941aa2bbaa]
+---
+ testcases/kernel/syscalls/fanotify/fanotify.h   | 1 +
+ testcases/kernel/syscalls/fanotify/fanotify13.c | 4 ++--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
+index 5370e30bb..9c98aaa1d 100644
+--- a/testcases/kernel/syscalls/fanotify/fanotify.h
++++ b/testcases/kernel/syscalls/fanotify/fanotify.h
+@@ -143,6 +143,7 @@ struct fanotify_event_info_fid {
+ };
+ #endif /* HAVE_STRUCT_FANOTIFY_EVENT_INFO_FID */
++/* NOTE: only for struct fanotify_event_info_fid */
+ #ifdef HAVE_STRUCT_FANOTIFY_EVENT_INFO_FID_FSID___VAL
+ # define FSID_VAL_MEMBER(fsid, i) (fsid.__val[i])
+ #else
+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.23.0
+
diff --git a/package/ltp-testsuite/0007-fanotify-Fix-for-musl.patch b/package/ltp-testsuite/0007-fanotify-Fix-for-musl.patch
deleted file mode 100644 (file)
index d1d0fc0..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-From 087e13ecb9eea6cbd920708e64eab18e7ab8a90c Mon Sep 17 00:00:00 2001
-From: Petr Vorel <petr.vorel@gmail.com>
-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")
-
-[upstream status: https://patchwork.ozlabs.org/patch/1195915/]
-Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
----
- 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
-
diff --git a/package/ltp-testsuite/0011-Fix-static-linking-with-musl-fts.patch b/package/ltp-testsuite/0011-Fix-static-linking-with-musl-fts.patch
new file mode 100644 (file)
index 0000000..161a65e
--- /dev/null
@@ -0,0 +1,50 @@
+From 9bf80b5781fc62e0dd821413a6d21f2689ee4ef1 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Mon, 14 Oct 2019 11:47:49 +0200
+Subject: [PATCH] Fix static linking with musl-fts
+
+Don't append libraries to LDLIBS but prepend them in cpuset_lib/Makefile
+and cpuset/Makefile.inc to allow the user to provide its FTS library
+such as -lfts for musl/uclibc through LDLIBS
+
+This will fix static build of ltp with musl-fts on uclibc
+
+Fixes:
+ - http://autobuild.buildroot.org/results/9155326e1ff7c2bb2218122c453872c2fc76f65e
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: 22f510de8072c5cacce5b2a4ca2ff97d1a6fa3ca]
+---
+ testcases/kernel/controllers/cpuset/Makefile.inc        | 2 +-
+ testcases/kernel/controllers/cpuset/cpuset_lib/Makefile | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/controllers/cpuset/Makefile.inc b/testcases/kernel/controllers/cpuset/Makefile.inc
+index db6a84305..c03dd77d7 100644
+--- a/testcases/kernel/controllers/cpuset/Makefile.inc
++++ b/testcases/kernel/controllers/cpuset/Makefile.inc
+@@ -41,7 +41,7 @@ MAKE_DEPS            := $(LIBCONTROLLERS) $(LIBCPUSET)
+ LDFLAGS                       += -L$(abs_builddir)/$(LIBCPUSET_DIR) -L$(abs_builddir)/$(LIBCONTROLLERS_DIR)
+-LDLIBS                        += -lcpu_set -lcontrollers -lltp
++LDLIBS                        := -lcpu_set -lcontrollers -lltp $(LDLIBS)
+ INSTALL_TARGETS               ?= *.sh
+diff --git a/testcases/kernel/controllers/cpuset/cpuset_lib/Makefile b/testcases/kernel/controllers/cpuset/cpuset_lib/Makefile
+index 322d03cac..069ebc38c 100644
+--- a/testcases/kernel/controllers/cpuset/cpuset_lib/Makefile
++++ b/testcases/kernel/controllers/cpuset/cpuset_lib/Makefile
+@@ -25,7 +25,7 @@ top_srcdir           ?= ../../../../..
+ include $(top_srcdir)/include/mk/testcases.mk
+-LDLIBS                        += -lm -lcontrollers -lltp
++LDLIBS                        := -lm -lcontrollers -lltp $(LDLIBS)
+ LIB                   := libcpu_set.a
+-- 
+2.24.0
+