From b98f45363349b16e8532be383a9fd4134a8458ca Mon Sep 17 00:00:00 2001 From: Petr Vorel Date: Thu, 1 Nov 2018 18:47:18 +0100 Subject: ltp: Update to 20180926 New patches * 0001-statx-fix-compile-errors.patch Rebased patches * 0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch Removed removed (accepted in upstream) * 0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch * 0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch * 0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch Removed patches (different fix accepted in upstream) * 0001-mmap15-mips64-return-EINVAL.patch (From OE-Core rev: 439cb0421570e1edea6994775ed782b9b264f4a1) Signed-off-by: Petr Vorel Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- .../ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch | 41 ------- .../ltp/ltp/0001-statx-fix-compile-errors.patch | 34 ++++++ ...s-ar01-Fix-for-test-in-deterministic-mode.patch | 42 +++---- ...69-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch | 97 ---------------- ...est06.c-Fix-too-small-name-string-and-rel.patch | 34 ------ ...skip-S_ISGID-check-on-files-created-by-no.patch | 81 ------------- meta/recipes-extended/ltp/ltp_20180515.bb | 127 --------------------- meta/recipes-extended/ltp/ltp_20180926.bb | 123 ++++++++++++++++++++ 8 files changed, 179 insertions(+), 400 deletions(-) delete mode 100644 meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch create mode 100644 meta/recipes-extended/ltp/ltp/0001-statx-fix-compile-errors.patch delete mode 100644 meta/recipes-extended/ltp/ltp/0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch delete mode 100644 meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch delete mode 100644 meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch delete mode 100644 meta/recipes-extended/ltp/ltp_20180515.bb create mode 100644 meta/recipes-extended/ltp/ltp_20180926.bb (limited to 'meta') diff --git a/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch b/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch deleted file mode 100644 index 18eba27c2d..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch +++ /dev/null @@ -1,41 +0,0 @@ -From b909805b4fc1b72e0ce299afb4abc02720ee81da Mon Sep 17 00:00:00 2001 -From: Dengke Du -Date: Wed, 12 Sep 2018 14:24:35 +0800 -Subject: [PATCH] mmap15: mips64 return EINVAL - -In mips64 kernel, system check the addr that passed to mmap: - - if (TASK_SIZE - len < addr) - return -EINVAL; - -Link: https://github.com/torvalds/linux/blob/master/arch/mips/mm/mmap.c#L71 - -Upstream-Status: Submitted [https://github.com/linux-test-project/ltp/pull/394] - -Signed-off-by: Dengke Du ---- - testcases/kernel/syscalls/mmap/mmap15.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/testcases/kernel/syscalls/mmap/mmap15.c b/testcases/kernel/syscalls/mmap/mmap15.c -index eff27d6..a10b5c7 100644 ---- a/testcases/kernel/syscalls/mmap/mmap15.c -+++ b/testcases/kernel/syscalls/mmap/mmap15.c -@@ -81,9 +81,14 @@ int main(int ac, char **av) - } - - if (errno != ENOMEM) { -+#ifdef __mips__ -+ tst_resm(TPASS | TERRNO, "mmap into high region " -+ "failed as expected"); -+#else - tst_resm(TFAIL | TERRNO, "mmap into high region " - "failed unexpectedly - expect " - "errno=ENOMEM, got"); -+#endif - } else { - tst_resm(TPASS | TERRNO, "mmap into high region " - "failed as expected"); --- -2.7.4 - diff --git a/meta/recipes-extended/ltp/ltp/0001-statx-fix-compile-errors.patch b/meta/recipes-extended/ltp/ltp/0001-statx-fix-compile-errors.patch new file mode 100644 index 0000000000..c4fd8d0223 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-statx-fix-compile-errors.patch @@ -0,0 +1,34 @@ +From a945304b6a2286d0665c70250cc5475eb07fd21e Mon Sep 17 00:00:00 2001 +From: Thadeu Lima de Souza Cascardo +Date: Wed, 26 Sep 2018 11:15:45 -0300 +Subject: [PATCH] statx: fix compile errors + +struct statx is only defined in sys/stat.h when _GNU_SOURCE is defined. +The testcases do define _GNU_SOURCE, but not the m4 struct check. + +Signed-off-by: Thadeu Lima de Souza Cascardo +Acked-by: Cyril Hrubis +--- + m4/ltp-statx.m4 | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/m4/ltp-statx.m4 b/m4/ltp-statx.m4 +index 44303d30c..5f79a94cd 100644 +--- a/m4/ltp-statx.m4 ++++ b/m4/ltp-statx.m4 +@@ -23,6 +23,11 @@ dnl + AC_DEFUN([LTP_CHECK_STATX],[ + AC_CHECK_FUNCS(statx,,,[[#include ]]) + AC_CHECK_HEADER(linux/fs.h,,,) +-AC_CHECK_TYPES([struct statx],,,[[#include ]]) +-AC_CHECK_TYPES([struct statx_timestamp],,,[[#include ]]) ++AC_CHECK_TYPES([struct statx],,,[[ ++ #define _GNU_SOURCE ++ #include ++]]) ++AC_CHECK_TYPES([struct statx_timestamp],,,[[ ++ #define _GNU_SOURCE ++ #include ]]) + ]) +-- +2.19.1 diff --git a/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch b/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch index e7c927e116..9244a06b44 100644 --- a/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch +++ b/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch @@ -21,16 +21,18 @@ Signed-off-by: Yi Zhao 1 file changed, 52 insertions(+), 40 deletions(-) diff --git a/testcases/commands/ar/ar01 b/testcases/commands/ar/ar01 -index ddab2e0..d688f76 100644 +index be105f6da..813a51d9c 100644 --- a/testcases/commands/ar/ar01 +++ b/testcases/commands/ar/ar01 -@@ -23,14 +23,26 @@ - # This is a basic ar command test. +@@ -24,16 +24,28 @@ # + AR="${AR:=ar}" TST_CNT=17 +TST_SETUP=setup TST_TESTFUNC=test TST_NEEDS_TMPDIR=1 + TST_NEEDS_CMDS="$AR" + . tst_test.sh +setup() @@ -53,7 +55,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -47,9 +59,9 @@ test1() +@@ -50,9 +62,9 @@ test1() test2() { @@ -66,7 +68,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile4.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -66,8 +78,8 @@ test2() +@@ -69,8 +81,8 @@ test2() test3() { @@ -77,7 +79,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -84,9 +96,9 @@ test3() +@@ -87,9 +99,9 @@ test3() test4() { @@ -90,7 +92,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -103,7 +115,7 @@ test4() +@@ -106,7 +118,7 @@ test4() test5() { @@ -99,7 +101,7 @@ index ddab2e0..d688f76 100644 if [ -s ar.out ]; then tst_res TFAIL "ar produced output unexpectedly (-c)" -@@ -117,7 +129,7 @@ test5() +@@ -120,7 +132,7 @@ test5() test6() { @@ -108,7 +110,7 @@ index ddab2e0..d688f76 100644 if [ -s ar.out ]; then tst_res TFAIL "ar produced output unexpectedly (-qc)" -@@ -131,9 +143,9 @@ test6() +@@ -134,9 +146,9 @@ test6() test7() { @@ -121,7 +123,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file3.in\n" > ar.exp -@@ -150,9 +162,9 @@ test7() +@@ -153,9 +165,9 @@ test7() test8() { @@ -134,7 +136,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -169,8 +181,8 @@ test8() +@@ -172,8 +184,8 @@ test8() test9() { @@ -145,7 +147,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -187,9 +199,9 @@ test9() +@@ -190,9 +202,9 @@ test9() test10() { @@ -158,7 +160,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -206,9 +218,9 @@ test10() +@@ -209,9 +221,9 @@ test10() test11() { @@ -171,7 +173,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -225,9 +237,9 @@ test11() +@@ -228,9 +240,9 @@ test11() test12() { @@ -184,7 +186,7 @@ index ddab2e0..d688f76 100644 printf "This is file one\nThis is file two\nThis is file three\n" > ar.exp -@@ -244,9 +256,9 @@ test12() +@@ -247,9 +259,9 @@ test12() test13() { @@ -197,7 +199,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\nfile4.in\n" > ar.exp -@@ -264,14 +276,14 @@ test13() +@@ -267,14 +279,14 @@ test13() test14() { ROD touch file0.in @@ -214,7 +216,7 @@ index ddab2e0..d688f76 100644 file0_mtime2=$(ar -tv lib.a | grep file0.in) file1_mtime2=$(ar -tv lib.a | grep file1.in) -@@ -293,7 +305,7 @@ test14() +@@ -296,7 +308,7 @@ test14() test15() { @@ -223,7 +225,7 @@ index ddab2e0..d688f76 100644 ROD ar -tv lib.a \> ar.out if grep -q '[rwx-]\{9\} [0-9].*/[0-9].*\s*[0-9].*.*file1.in' ar.out; then -@@ -308,9 +320,9 @@ test15() +@@ -311,9 +323,9 @@ test15() test16() { @@ -236,7 +238,7 @@ index ddab2e0..d688f76 100644 printf "x - file1.in\nx - file2.in\nx - file3.in\n" > ar.exp -@@ -332,8 +344,8 @@ test16() +@@ -335,8 +347,8 @@ test16() test17() { @@ -248,5 +250,5 @@ index ddab2e0..d688f76 100644 printf "x - file2.in\n" > ar.exp -- -2.7.4 +2.19.0.rc2 diff --git a/meta/recipes-extended/ltp/ltp/0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch b/meta/recipes-extended/ltp/ltp/0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch deleted file mode 100644 index 0d2d2cbce4..0000000000 --- a/meta/recipes-extended/ltp/ltp/0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch +++ /dev/null @@ -1,97 +0,0 @@ -From b767b73ef027ba8d35f297c7d3659265ac80425b Mon Sep 17 00:00:00 2001 -From: Rafael David Tinoco -Date: Wed, 30 May 2018 09:14:34 -0300 -Subject: [PATCH] cve-2017-5669: shmat() for 0 (or -Date: Fri May 25 14:47:30 2018 -0700 - - ipc/shm: fix shmat() nil address after round-down when remapping - -commit a73ab244f0da -Author: Davidlohr Bueso -Date: Fri May 25 14:47:27 2018 -0700 - - Revert "ipc/shm: Fix shmat mmap nil-page protection" - -For previously test, and now broken, made based on: - -commit 95e91b831f87 -Author: Davidlohr Bueso -Date: Mon Feb 27 14:28:24 2017 -0800 - - ipc/shm: Fix shmat mmap nil-page protection - -Signed-off-by: Rafael David Tinoco -Tested-by: Naresh Kamboju -Reviewed-by: Jan Stancek - -Upstream-Status: Accepted [https://github.com/linux-test-project/ltp/pull/324] -CVE: CVE-2017-5669 -Signed-off-by: Rafael David Tinoco ---- - testcases/cve/cve-2017-5669.c | 20 +++++++++++++++++++- - 1 file changed, 19 insertions(+), 1 deletion(-) - -diff --git a/testcases/cve/cve-2017-5669.c b/testcases/cve/cve-2017-5669.c -index 1ca5983..0834626 100644 ---- a/testcases/cve/cve-2017-5669.c -+++ b/testcases/cve/cve-2017-5669.c -@@ -28,7 +28,20 @@ - * is just to see if we get an access error or some other unexpected behaviour. - * - * See commit 95e91b831f (ipc/shm: Fix shmat mmap nil-page protection) -+ * -+ * The commit above disallowed SHM_RND maps to zero (and rounded) entirely and -+ * that broke userland for cases like Xorg. New behavior disallows REMAPs to -+ * lower addresses (0<=PAGESIZE). -+ * -+ * See commit a73ab244f0da (Revert "ipc/shm: Fix shmat mmap nil-page protect...) -+ * See commit 8f89c007b6de (ipc/shm: fix shmat() nil address after round-dow...) -+ * See https://github.com/linux-test-project/ltp/issues/319 -+ * -+ * This test needs root permissions or else security_mmap_addr(), from -+ * get_unmapped_area(), will cause permission errors when trying to mmap lower -+ * addresses. - */ -+ - #include - #include - #include -@@ -60,7 +73,11 @@ static void cleanup(void) - static void run(void) - { - tst_res(TINFO, "Attempting to attach shared memory to null page"); -- shm_addr = shmat(shm_id, ((void *)1), SHM_RND); -+ /* -+ * shmat() for 0 (or < PAGESIZE with RND flag) has to fail with REMAPs -+ * https://github.com/linux-test-project/ltp/issues/319 -+ */ -+ shm_addr = shmat(shm_id, ((void *)1), SHM_RND | SHM_REMAP); - if (shm_addr == (void *)-1) { - shm_addr = NULL; - if (errno == EINVAL) { -@@ -89,6 +106,7 @@ static void run(void) - } - - static struct tst_test test = { -+ .needs_root = 1, - .setup = setup, - .cleanup = cleanup, - .test_all = run, --- -2.7.4 - diff --git a/meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch b/meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch deleted file mode 100644 index 407d98eff0..0000000000 --- a/meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch +++ /dev/null @@ -1,34 +0,0 @@ -From baeef026f80e19a634a4096e97286419aca1cf68 Mon Sep 17 00:00:00 2001 -From: He Zhe -Date: Thu, 23 Aug 2018 00:22:04 +0800 -Subject: [PATCH] fs/ftest/ftest06.c: Fix too small name string and related - failure - -The name string is too small to contain normal full path names and causes -the following failure. - -"ftest06 2 TFAIL : ftest06.c:223: Can't chdir(): errno=ENOENT(2): No such file or directory" - -Upstream-Status: Submitted [ltp-list@lists.sourceforge.net] - -Signed-off-by: He Zhe ---- - testcases/kernel/fs/ftest/ftest06.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/testcases/kernel/fs/ftest/ftest06.c b/testcases/kernel/fs/ftest/ftest06.c -index 2ca7c88..b434067 100644 ---- a/testcases/kernel/fs/ftest/ftest06.c -+++ b/testcases/kernel/fs/ftest/ftest06.c -@@ -100,7 +100,7 @@ static char *fstyp; - int main(int ac, char *av[]) - { - int pid, child, status, count, k, j; -- char name[3]; -+ char name[MAXPATHLEN]; - - int lc; - --- -2.7.4 - diff --git a/meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch b/meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch deleted file mode 100644 index dc61fcc039..0000000000 --- a/meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 3c87ef2961dedb10d1f674c6a530e00dbab8ec1b Mon Sep 17 00:00:00 2001 -From: Jan Stancek -Date: Tue, 17 Jul 2018 10:26:39 +0200 -Subject: [PATCH] open|creat: skip S_ISGID check on files created by non-group - members - -0fa3ecd87848 ("Fix up non-directory creation in SGID directories") -fixes problem described in CVE-2018-13405. This commit is getting -backported to older streams as well. - -This patch removes S_ISGID check for files created by non-group members -in LTP tests creat08 and open10. - -Once 0fa3ecd87848 will be in non-rc kernel, we could add a new test -for this CVE that would be limited to 4.18+ kernels. - -Signed-off-by: Jan Stancek -Acked-by: Cyril Hrubis -Reviewed-by: Naresh Kamboju - -Upstream-Status: Backport -[ git://github.com/linux-test-project/ltp.git - 3c87ef2961dedb10d1f674c6a530e00dbab8ec1b - "open|creat: skip S_ISGID check on files created by non-group members" ] - -Signed-off-by: He Zhe ---- - testcases/kernel/syscalls/creat/creat08.c | 13 ++++++------- - testcases/kernel/syscalls/open/open10.c | 12 +++++------- - 2 files changed, 11 insertions(+), 14 deletions(-) - -diff --git a/testcases/kernel/syscalls/creat/creat08.c b/testcases/kernel/syscalls/creat/creat08.c -index 50f2b3993..d22558ac3 100644 ---- a/testcases/kernel/syscalls/creat/creat08.c -+++ b/testcases/kernel/syscalls/creat/creat08.c -@@ -361,13 +361,12 @@ int main(int ac, char **av) - local_flag = FAILED; - } - -- /* Verify modes */ -- if (!(buf.st_mode & S_ISGID)) { -- tst_resm(TFAIL, -- "%s: Incorrect modes, setgid bit should be set", -- setgid_B); -- local_flag = FAILED; -- } -+ /* -+ * Skip S_ISGID check -+ * 0fa3ecd87848 ("Fix up non-directory creation in SGID directories") -+ * clears S_ISGID for files created by non-group members -+ */ -+ - close(fd); - - if (local_flag == PASSED) { -diff --git a/testcases/kernel/syscalls/open/open10.c b/testcases/kernel/syscalls/open/open10.c -index 613f2288f..14feec9e1 100644 ---- a/testcases/kernel/syscalls/open/open10.c -+++ b/testcases/kernel/syscalls/open/open10.c -@@ -345,13 +345,11 @@ int main(int ac, char *av[]) - local_flag = FAILED; - } - -- /* Verify modes */ -- if (!(buf.st_mode & S_ISGID)) { -- tst_resm(TFAIL, -- "%s: Incorrect modes, setgid bit not set", -- setgid_B); -- local_flag = FAILED; -- } -+ /* -+ * Skip S_ISGID check -+ * 0fa3ecd87848 ("Fix up non-directory creation in SGID directories") -+ * clears S_ISGID for files created by non-group members -+ */ - - if (local_flag == PASSED) { - tst_resm(TPASS, "Test passed in block2."); --- -2.11.0 - diff --git a/meta/recipes-extended/ltp/ltp_20180515.bb b/meta/recipes-extended/ltp/ltp_20180515.bb deleted file mode 100644 index ff85be723f..0000000000 --- a/meta/recipes-extended/ltp/ltp_20180515.bb +++ /dev/null @@ -1,127 +0,0 @@ -SUMMARY = "Linux Test Project" -DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features." -HOMEPAGE = "http://ltp.sourceforge.net" -SECTION = "console/utils" -LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause" -LIC_FILES_CHKSUM = "\ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ - file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \ - file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ - file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ - file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947 \ - file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ - file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \ -" - -DEPENDS = "attr libaio libcap acl openssl zip-native" -DEPENDS_append_libc-musl = " fts " -EXTRA_OEMAKE_append_libc-musl = " LIBC=musl " - -# since ltp contains x86-64 assembler which uses the frame-pointer register, -# set -fomit-frame-pointer x86-64 to handle cases where optimisation -# is set to -O0 or frame pointers have been enabled by -fno-omit-frame-pointer -# earlier in CFLAGS, etc. -CFLAGS_append_x86-64 = " -fomit-frame-pointer" - -CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__" -CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" -SRCREV = "96cbf48313afa65ef4d693d3441cbfd60a8d9b27" - -SRC_URI = "git://github.com/linux-test-project/ltp.git \ - file://0001-mmap15-mips64-return-EINVAL.patch \ - file://0004-build-Add-option-to-select-libc-implementation.patch \ - file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \ - file://0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch \ - file://0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \ - file://0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch \ - file://0018-guard-mallocopt-with-__GLIBC__.patch \ - file://0020-getdents-define-getdents-getdents64-only-for-glibc.patch \ - file://0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch \ - file://0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch \ - file://0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch \ - file://0026-crash01-Define-_GNU_SOURCE.patch \ - file://0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch \ - file://0034-periodic_output.patch \ - file://0035-fix-test_proc_kill-hang.patch \ - file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \ - file://0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch \ - file://0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch \ - file://0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch \ - file://0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch \ - file://0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch \ - file://0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch \ - file://0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch \ - file://0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch \ - file://0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch \ - " - -S = "${WORKDIR}/git" - -inherit autotools-brokensep - -TARGET_CC_ARCH += "${LDFLAGS}" - -export prefix = "/opt/ltp" -export exec_prefix = "/opt/ltp" - -PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl," -EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4" -EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite --with-open-posix-testsuite " -# ltp network/rpc test cases ftbfs when libtirpc is found -EXTRA_OECONF += " --without-tirpc " - -do_install(){ - install -d ${D}/opt/ltp/ - oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install - - # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run - # as it lacks dependency on some perl moudle such as LWP::Simple - # And this script previously works as a tool for analyzing failures from LTP - # runs on the OSDL's Scaleable Test Platform (STP) and it mainly accesses - # http://khack.osdl.org to retrieve ltp test results run on - # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible - rm -rf ${D}/opt/ltp/bin/STPfailure_report.pl - - # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual - cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases -} - -RDEPENDS_${PN} = "\ - acl \ - at \ - attr \ - bash \ - cpio \ - cronie \ - curl \ - e2fsprogs-mke2fs \ - expect \ - gawk \ - gzip \ - iproute2 \ - ldd \ - libaio \ - logrotate \ - perl \ - python-core \ - procps \ - unzip \ - util-linux \ - which \ - tar \ -" - -FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/* /opt/ltp/testcases/data/nm01/lib.a /opt/ltp/lib/libmem.a" - -# Avoid stripping some generated binaries otherwise some of the ltp tests such as ldd01 & nm01 fail -INHIBIT_PACKAGE_STRIP_FILES = "/opt/ltp/testcases/bin/nm01 /opt/ltp/testcases/bin/ldd01" -INSANE_SKIP_${PN} += "already-stripped staticdev" - -# Avoid file dependency scans, as LTP checks for things that may or may not -# exist on the running system. For instance it has specific checks for -# csh and ksh which are not typically part of OpenEmbedded systems (but -# can be added via additional layers.) -SKIP_FILEDEPS_${PN} = '1' diff --git a/meta/recipes-extended/ltp/ltp_20180926.bb b/meta/recipes-extended/ltp/ltp_20180926.bb new file mode 100644 index 0000000000..622c1f42f7 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp_20180926.bb @@ -0,0 +1,123 @@ +SUMMARY = "Linux Test Project" +DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features." +HOMEPAGE = "http://ltp.sourceforge.net" +SECTION = "console/utils" +LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause" +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ + file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \ + file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ + file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ + file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947 \ + file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ + file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \ +" + +DEPENDS = "attr libaio libcap acl openssl zip-native" +DEPENDS_append_libc-musl = " fts " +EXTRA_OEMAKE_append_libc-musl = " LIBC=musl " + +# since ltp contains x86-64 assembler which uses the frame-pointer register, +# set -fomit-frame-pointer x86-64 to handle cases where optimisation +# is set to -O0 or frame pointers have been enabled by -fno-omit-frame-pointer +# earlier in CFLAGS, etc. +CFLAGS_append_x86-64 = " -fomit-frame-pointer" + +CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__" +CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" +SRCREV = "f424769b1ad9fca477118763f88a6cec98ea2c0a" + +SRC_URI = "git://github.com/linux-test-project/ltp.git \ + file://0004-build-Add-option-to-select-libc-implementation.patch \ + file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \ + file://0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch \ + file://0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \ + file://0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch \ + file://0018-guard-mallocopt-with-__GLIBC__.patch \ + file://0020-getdents-define-getdents-getdents64-only-for-glibc.patch \ + file://0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch \ + file://0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch \ + file://0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch \ + file://0026-crash01-Define-_GNU_SOURCE.patch \ + file://0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch \ + file://0034-periodic_output.patch \ + file://0035-fix-test_proc_kill-hang.patch \ + file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \ + file://0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch \ + file://0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch \ + file://0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch \ + file://0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch \ + file://0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch \ + file://0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch \ + file://0001-statx-fix-compile-errors.patch \ + " + +S = "${WORKDIR}/git" + +inherit autotools-brokensep + +TARGET_CC_ARCH += "${LDFLAGS}" + +export prefix = "/opt/ltp" +export exec_prefix = "/opt/ltp" + +PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl," +EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4" +EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite --with-open-posix-testsuite " +# ltp network/rpc test cases ftbfs when libtirpc is found +EXTRA_OECONF += " --without-tirpc " + +do_install(){ + install -d ${D}/opt/ltp/ + oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install + + # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run + # as it lacks dependency on some perl moudle such as LWP::Simple + # And this script previously works as a tool for analyzing failures from LTP + # runs on the OSDL's Scaleable Test Platform (STP) and it mainly accesses + # http://khack.osdl.org to retrieve ltp test results run on + # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible + rm -rf ${D}/opt/ltp/bin/STPfailure_report.pl + + # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual + cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases +} + +RDEPENDS_${PN} = "\ + acl \ + at \ + attr \ + bash \ + cpio \ + cronie \ + curl \ + e2fsprogs-mke2fs \ + expect \ + gawk \ + gzip \ + iproute2 \ + ldd \ + libaio \ + logrotate \ + perl \ + python-core \ + procps \ + unzip \ + util-linux \ + which \ + tar \ +" + +FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/* /opt/ltp/testcases/data/nm01/lib.a /opt/ltp/lib/libmem.a" + +# Avoid stripping some generated binaries otherwise some of the ltp tests such as ldd01 & nm01 fail +INHIBIT_PACKAGE_STRIP_FILES = "/opt/ltp/testcases/bin/nm01 /opt/ltp/testcases/bin/ldd01" +INSANE_SKIP_${PN} += "already-stripped staticdev" + +# Avoid file dependency scans, as LTP checks for things that may or may not +# exist on the running system. For instance it has specific checks for +# csh and ksh which are not typically part of OpenEmbedded systems (but +# can be added via additional layers.) +SKIP_FILEDEPS_${PN} = '1' -- cgit v1.2.3-54-g00ecf