ltp-testsuite: change install prefix
PATCH 1/3 ltp-testsuite: change install prefix
ltp-testsuite installs some of its files directly at its specified prefix, which by default in Buildroot is /usr for autotools packages. This is currently leaving scripts and its internal directories directly installed in /usr, such as in:
# ls /usr IDcheck.sh lib64 runltplite.sh share Version libexec runtest testcases bin runalltests.sh sbin testscripts lib runltp scenario_groups ver_linux
It also seems to be not feasible to try to install all of its testcases to standard locations such as /usr/bin as may contain hundreds of binaries and may not be able to find them all if we change their install locations. Therefore, it is better if ltp-testsuite installs its tree to its own self-contained subdirectory.
Upstream instructions recommend that the install path be /opt/ltp, however it seems that installing things to /opt is not a very common Buildroot practice.
The proposal then is to install it to /usr/lib/ltp-testsuite and so it can be run directly from there.
---
The /usr/lib/ltp-testsuite suggestion came from a brief discussion that I had on IRC about where would be the least bad place to install it. Alternatives could be /usr/share/ltp-testsuite or even /opt/ltp if we were to strictly follow the upstream documentation.
It doesn't matter too much really as long as it doesn't mess /usr up anymore.
--- package/ltp-testsuite/ltp-testsuite.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/ltp-testsuite/ltp-testsuite.mk +4 -0
@@ -21,6 +21,10 @@ else LTP_TESTSUITE_CONF_OPTS += --without-modules endif +# We change the prefix to a custom one, otherwise we get scripts and +# directories directly in /usr, such as /usr/runalltests.sh +LTP_TESTSUITE_CONF_OPTS += --prefix=/usr/lib/ltp-testsuite + # Needs libcap with file attrs which needs attr, so both required ifeq ($(BR2_PACKAGE_LIBCAP)$(BR2_PACKAGE_ATTR),yy) LTP_TESTSUITE_DEPENDENCIES += libcap
Signature · 1 line
2.7.4
PATCH 2/3 ltp-testsuite: bump to version 20160920
Patch 0001-fix-uClibc-build.patch is now part of upstream so it is not needed in Buildroot anymore. The remaining patches were just rebased and then renumbered so that they apply cleanly to this new version.
This has been build-tested with both glibc and uClibc toolchains and run-tested on x86_64 and aarch64.
---
I wonder if we should really maintain the uClibc-related patches given that even the patches themselves mention that they are not upstreamable. This feels a bit like maintaining feature patches. If upstream adds more changes that break uClibc, we would need to maintain that ourselves. I'm interested in maintaining this package but if it turns out that it eventually starts breaking for uClibc in future versions, I'd vote for removing uClibc support for it.
---
package/ltp-testsuite/0001-fix-uClibc-build.patch | 51 -------
...disable-tirpc_auth_authdes_-create-tests.patch} | 9 +-
.../0002-uClibc-ng-has-no-profil-support.patch | 39 +++++
.../0003-disable-profil-on-uClibc.patch | 27 ----
...eed-__UCLIBC_SV4_DEPRECATED__-enabled-for.patch | 84 +++++++++++
.../0004-disable-ustat-on-uClibc.patch | 70 ---------
...-unused-and-not-available-for-uClibc-ng-l.patch | 157 +++++++++++++++++++++
package/ltp-testsuite/0005-rpc-fix-uClibc.patch | 125 ----------------
package/ltp-testsuite/ltp-testsuite.hash | 8 +-
package/ltp-testsuite/ltp-testsuite.mk | 2 +-
10 files changed, 292 insertions(+), 280 deletions(-)
delete mode 100644 package/ltp-testsuite/0001-fix-uClibc-build.patch
rename package/ltp-testsuite/{0002-rpc-tirpc-disable-tirpc_auth_authdes_seccreate-tests.patch => 0001-rpc-tirpc-disable-tirpc_auth_authdes_-create-tests.patch} (78%)
create mode 100644 package/ltp-testsuite/0002-uClibc-ng-has-no-profil-support.patch
delete mode 100644 package/ltp-testsuite/0003-disable-profil-on-uClibc.patch
create mode 100644 package/ltp-testsuite/0003-uClibc-ng-need-__UCLIBC_SV4_DEPRECATED__-enabled-for.patch
delete mode 100644 package/ltp-testsuite/0004-disable-ustat-on-uClibc.patch
create mode 100644 package/ltp-testsuite/0004-rusers.h-is-unused-and-not-available-for-uClibc-ng-l.patch
delete mode 100644 package/ltp-testsuite/0005-rpc-fix-uClibc.patchpackage/ltp-testsuite/0001-fix-uClibc-build.patch deleted +0 -51
@@ -1,51 +0,0 @@ -O_DIRECTORY is only available if _GNU_SOURCE is defined - -https://github.com/linux-test-project/ltp/pull/58 - -Signed-off-by: Waldemar Brodkorb <[email protected]> - -diff -Nur ltp-full-20160126.orig/testcases/kernel/syscalls/fanotify/fanotify01.c ltp-full-20160126/testcases/kernel/syscalls/fanotify/fanotify01.c ---- ltp-full-20160126.orig/testcases/kernel/syscalls/fanotify/fanotify01.c 2016-01-26 13:35:25.000000000 +0100 -+++ ltp-full-20160126/testcases/kernel/syscalls/fanotify/fanotify01.c 2016-03-05 00:55:02.977264913 +0100 -@@ -25,6 +25,7 @@ - * DESCRIPTION - * Check that fanotify work for a file - */ -+#define _GNU_SOURCE - #include "config.h" - - #include <stdio.h> -diff -Nur ltp-full-20160126.orig/testcases/kernel/syscalls/fanotify/fanotify02.c ltp-full-20160126/testcases/kernel/syscalls/fanotify/fanotify02.c ---- ltp-full-20160126.orig/testcases/kernel/syscalls/fanotify/fanotify02.c 2016-01-26 13:35:25.000000000 +0100 -+++ ltp-full-20160126/testcases/kernel/syscalls/fanotify/fanotify02.c 2016-03-05 00:54:44.600558612 +0100 -@@ -25,6 +25,7 @@ - * DESCRIPTION - * Check that fanotify work for children of a directory - */ -+#define _GNU_SOURCE - #include "config.h" - - #include <stdio.h> -diff -Nur ltp-full-20160126.orig/testcases/kernel/syscalls/fanotify/fanotify03.c ltp-full-20160126/testcases/kernel/syscalls/fanotify/fanotify03.c ---- ltp-full-20160126.orig/testcases/kernel/syscalls/fanotify/fanotify03.c 2016-01-26 13:35:25.000000000 +0100 -+++ ltp-full-20160126/testcases/kernel/syscalls/fanotify/fanotify03.c 2016-03-05 00:55:13.917685403 +0100 -@@ -25,6 +25,7 @@ - * DESCRIPTION - * Check that fanotify permission events work - */ -+#define _GNU_SOURCE - #include "config.h" - - #include <stdio.h> -diff -Nur ltp-full-20160126.orig/testcases/kernel/syscalls/fanotify/fanotify04.c ltp-full-20160126/testcases/kernel/syscalls/fanotify/fanotify04.c ---- ltp-full-20160126.orig/testcases/kernel/syscalls/fanotify/fanotify04.c 2016-01-26 13:35:25.000000000 +0100 -+++ ltp-full-20160126/testcases/kernel/syscalls/fanotify/fanotify04.c 2016-03-05 00:55:24.530093286 +0100 -@@ -25,6 +25,8 @@ - * DESCRIPTION - * Check various fanotify special flags - */ -+ -+#define _GNU_SOURCE - #include "config.h" - - #include <stdio.h>
package/ltp-testsuite/0001-rpc-tirpc-disable-tirpc_auth_authdes_-create-tests.patch renamed from package/ltp-testsuite/0002-rpc-tirpc-disable-tirpc_auth_authdes_seccreate-tests.patch +7 -2
@@ -1,4 +1,7 @@ -rpc-tirpc: disable tirpc_auth_authdes_*create tests +From 9bbadb7ece1b068465279e7248b3439d443054a6 Mon Sep 17 00:00:00 2001 +From: Erico Nunes <[email protected]> +Date: Fri, 30 Sep 2016 17:43:08 +0200 +Subject: [PATCH] rpc-tirpc: disable tirpc_auth_authdes_*create tests Due to Buildroot patch 0007-Disable-DES-authentification-support.patch on libtirpc, this library is built without method authdes_create. Any code
@@ -9,6 +12,8 @@ just disable the problematic tests. Upstream-status: not applicable Signed-off-by: Thomas De Schampheleire <[email protected]> +[Erico: Rebase for ltp 20160920] +Signed-off-by: Erico Nunes <[email protected]> --- testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/tirpc/Makefile | 4 ++++ 1 file changed, 4 insertions(+)
@@ -27,5 +32,5 @@ index 45bc8a6..c04a088 100644 + include $(top_srcdir)/include/mk/generic_trunk_target.mk -- -1.9.5 +2.7.4
package/ltp-testsuite/0002-uClibc-ng-has-no-profil-support.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 4ab7dc5fd201318e2a62dbd3ba1680b97034ec65 Mon Sep 17 00:00:00 2001 +From: Erico Nunes <[email protected]> +Date: Fri, 30 Sep 2016 17:45:03 +0200 +Subject: [PATCH] uClibc-ng has no profil() support + +Signed-off-by: Waldemar Brodkorb <[email protected]> +[Erico: Rebase for ltp 20160920] +Signed-off-by: Erico Nunes <[email protected]> +--- + testcases/kernel/syscalls/profil/profil01.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/testcases/kernel/syscalls/profil/profil01.c b/testcases/kernel/syscalls/profil/profil01.c +index 2fc47aa..f8afd57 100644 +--- a/testcases/kernel/syscalls/profil/profil01.c ++++ b/testcases/kernel/syscalls/profil/profil01.c +@@ -37,6 +37,9 @@ + #define PROFIL_BUFLEN (32*1024) + + char *TCID = "profil01"; ++ ++#if !defined(__UCLIBC__) ++ + int TST_TOTAL = 1; + + static volatile sig_atomic_t profil_done; +@@ -124,3 +127,9 @@ int main(int ac, char *av[]) + + tst_exit(); + } ++#else /* systems that dont support profil */ ++int main(void) ++{ ++ tst_brkm(TCONF, NULL, "system doesn't have profil support"); ++} ++#endif +-- +2.7.4 +
package/ltp-testsuite/0003-disable-profil-on-uClibc.patch deleted +0 -27
@@ -1,27 +0,0 @@ -uClibc-ng has no profil() support - -Signed-off-by: Waldemar Brodkorb <[email protected]> - -diff -Nur ltp-full-20160126.orig/testcases/kernel/syscalls/profil/profil01.c ltp-full-20160126/testcases/kernel/syscalls/profil/profil01.c ---- ltp-full-20160126.orig/testcases/kernel/syscalls/profil/profil01.c 2016-01-26 13:35:25.000000000 +0100 -+++ ltp-full-20160126/testcases/kernel/syscalls/profil/profil01.c 2016-03-05 01:00:07.328962536 +0100 -@@ -37,6 +37,9 @@ - #define PROFIL_BUFLEN (32*1024) - - char *TCID = "profil01"; -+ -+#if !defined(__UCLIBC__) -+ - int TST_TOTAL = 1; - - static volatile sig_atomic_t profil_done; -@@ -124,3 +127,9 @@ - - tst_exit(); - } -+#else /* systems that dont support profil */ -+int main(void) -+{ -+ tst_brkm(TCONF, NULL, "system doesn't have profil support"); -+} -+#endif
package/ltp-testsuite/0003-uClibc-ng-need-__UCLIBC_SV4_DEPRECATED__-enabled-for.patch new file +84 -0
84 lines not on this page · raw message
package/ltp-testsuite/0004-disable-ustat-on-uClibc.patch deleted +0 -70
70 lines not on this page · raw message
package/ltp-testsuite/0004-rusers.h-is-unused-and-not-available-for-uClibc-ng-l.patch new file +157 -0
157 lines not on this page · raw message
package/ltp-testsuite/0005-rpc-fix-uClibc.patch deleted +0 -125
125 lines not on this page · raw message
package/ltp-testsuite/ltp-testsuite.hash +4 -4
@@ -1,4 +1,4 @@ -# From: https://github.com/linux-test-project/ltp/releases/download/20160126/ltp-full-20160126.tar.xz.md5 -md5 fc3b7411cdf17b2608e26c05d36fc26a ltp-full-20160126.tar.xz -# From: https://github.com/linux-test-project/ltp/releases/download/20160126/ltp-full-20160126.tar.xz.sha1 -sha1 a39c9b05edb942cde23a1f7fa08289a5e427fa04 ltp-full-20160126.tar.xz +# From: https://github.com/linux-test-project/ltp/releases/download/20160920/ltp-full-20160920.tar.xz.md5 +md5 d1d5b7389d209fe0afca16d8d73a8357 ltp-full-20160920.tar.xz +# From: https://github.com/linux-test-project/ltp/releases/download/20160920/ltp-full-20160920.tar.xz.sha1 +sha1 79f3311ecbcf02f070e601745243c9757638c4ef ltp-full-20160920.tar.xz
package/ltp-testsuite/ltp-testsuite.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -LTP_TESTSUITE_VERSION = 20160126 +LTP_TESTSUITE_VERSION = 20160920 LTP_TESTSUITE_SOURCE = ltp-full-$(LTP_TESTSUITE_VERSION).tar.xz LTP_TESTSUITE_SITE = https://github.com/linux-test-project/ltp/releases/download/$(LTP_TESTSUITE_VERSION) LTP_TESTSUITE_LICENSE = GPLv2, GPLv2+
Signature · 1 line
2.7.4
Thomas Petazzoni
AppliedPATCH 2/3 ltp-testsuite: bump to version 20160920
Hello,
Quoted 8 lines · Erico Nunes
Patch 0001-fix-uClibc-build.patch is now part of upstream so it is not needed in Buildroot anymore. The remaining patches were just rebased and then renumbered so that they apply cleanly to this new version.
This has been build-tested with both glibc and uClibc toolchains and run-tested on
x86_64and aarch64.Signed-off-by Erico Nunes <[email protected]>
Applied to master, thanks!
Quoted 7 lines
I wonder if we should really maintain the uClibc-related patches given that even the patches themselves mention that they are not upstreamable. This feels a bit like maintaining feature patches. If upstream adds more changes that break uClibc, we would need to maintain that ourselves. I'm interested in maintaining this package but if it turns out that it eventually starts breaking for uClibc in future versions, I'd vote for removing uClibc support for it.
I looked at the remaining patches:
- 0001 I'm not sure to fully understand
- 0002 and 0002 are just missing features in uClibc, I don't see why those patches can't be upstreamed. Waldemar, maybe you could help?
- 0004 fixes an issue that also occurs with libtirpc, so it definitely should be upstreamable
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 2/3 ltp-testsuite: bump to version 20160920
In reply to Erico NunesHi Erico,
Erico Nunes wrote,
Quoted 9 lines
Patch 0001-fix-uClibc-build.patch is now part of upstream so it is not needed in Buildroot anymore. The remaining patches were just rebased and then renumbered so that they apply cleanly to this new version.
This has been build-tested with both glibc and uClibc toolchains and run-tested on
x86_64and aarch64.Signed-off-by Erico Nunes <[email protected]>
Quoted 8 lines
---
I wonder if we should really maintain the uClibc-related patches given that even the patches themselves mention that they are not upstreamable. This feels a bit like maintaining feature patches. If upstream adds more changes that break uClibc, we would need to maintain that ourselves. I'm interested in maintaining this package but if it turns out that it eventually starts breaking for uClibc in future versions, I'd vote for removing uClibc support for it.
No, I disagree here. The patches for uClibc are upstreamable. Only the libtirpc patch has the comment and this is related to features missing in uClibc and musl. (DES)
If more ltp tests should break and you want to maintain the package please work with me and LTP people to get things working.
Compiling and running LTP with uClibc-ng is an important part of getting missing features or bugs fixed.
It is not an option to disable the package for uClibc-ng.
This worked fine in the past, see exp10 related issues.
best regards
Waldemar
PATCH 3/3 ltp-testsuite: make Config.in libc comment standard
In reply to Erico Nunesltp-testsuite was the only package to mention "non-musl" while all other packages have it as "glibc or uClibc". This change only adjusts it to look like all the other packages.
--- package/ltp-testsuite/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/ltp-testsuite/Config.in +1 -1
@@ -22,7 +22,7 @@ config BR2_PACKAGE_LTP_TESTSUITE http://linux-test-project.github.io -comment "ltp-testsuite needs a non-musl toolchain w/ threads" +comment "ltp-testsuite needs a glibc or uClibc toolchain w/ threads" depends on !BR2_nios2 depends on BR2_USE_MMU depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_USES_MUSL
Signature · 1 line
2.7.4
Thomas Petazzoni
AppliedPATCH 3/3 ltp-testsuite: make Config.in libc comment standard
Hello,
Quoted 8 lines · Erico Nunes
ltp-testsuite was the only package to mention "non-musl" while all other packages have it as "glibc or uClibc". This change only adjusts it to look like all the other packages.
Signed-off-by Erico Nunes <[email protected]>--- package/ltp-testsuite/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Thomas Petazzoni
AppliedPATCH 1/3 ltp-testsuite: change install prefix
In reply to Erico NunesHello,
Quoted 30 lines · Erico Nunes
ltp-testsuite installs some of its files directly at its specified prefix, which by default in Buildroot is /usr for autotools packages. This is currently leaving scripts and its internal directories directly installed in /usr, such as in:
# ls /usr IDcheck.sh lib64 runltplite.sh share Version libexec runtest testcases bin runalltests.sh sbin testscripts lib runltp scenario_groups ver_linuxIt also seems to be not feasible to try to install all of its testcases to standard locations such as
/usr/binas may contain hundreds of binaries and may not be able to find them all if we change their install locations. Therefore, it is better if ltp-testsuite installs its tree to its own self-contained subdirectory.
Upstream instructions recommend that the install path be/opt/ltp, however it seems that installing things to /opt is not a very common Buildroot practice.
The proposal then is to install it to/usr/lib/ltp-testsuiteand so it can be run directly from there.Signed-off-by Erico Nunes <[email protected]>---
The/usr/lib/ltp-testsuitesuggestion came from a brief discussion that I had on IRC about where would be the least bad place to install it. Alternatives could be/usr/share/ltp-testsuiteor even/opt/ltpif we were to strictly follow the upstream documentation.
It doesn't matter too much really as long as it doesn't mess /usr up anymore.
Quoted 3 lines
--- package/ltp-testsuite/ltp-testsuite.mk | 4 ++++ 1 file changed, 4 insertions(+)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com