summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/ltp')
-rw-r--r--meta/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch23
-rw-r--r--meta/recipes-extended/ltp/files/periodic_output.patch31
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch48
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-robust-mutex-conditionals.patch62
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch202
-rw-r--r--meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch39
-rw-r--r--meta/recipes-extended/ltp/ltp/automake-foreign.patch20
-rw-r--r--meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch31
-rw-r--r--meta/recipes-extended/ltp/ltp/make-setregid02-work.patch61
-rw-r--r--meta/recipes-extended/ltp/ltp_20140422.bb93
10 files changed, 610 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch b/meta/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch
new file mode 100644
index 0000000000..8fb11af580
--- /dev/null
+++ b/meta/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch
@@ -0,0 +1,23 @@
1Fix test_proc_kill hanging
2
3Sometimes the signal is delivered to memcg_process before the framework took
4into consideration its pid entered in the tasks. Fixed by delaying the signal
5send command.
6
7Signed-off-by: George Nita <george.nita@enea.com>
8Upstream-Status: Not Submitted
9
10diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
11index ffbe006..e81bf74 100755
12--- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
13+++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
14@@ -220,8 +220,8 @@ test_proc_kill()
15
16 $TEST_PATH/memcg_process $2 -s $3 &
17 pid=$!
18- sleep 1
19 echo $pid > tasks
20+ sleep 1
21
22 kill -s USR1 $pid 2> /dev/null
23 sleep 1
diff --git a/meta/recipes-extended/ltp/files/periodic_output.patch b/meta/recipes-extended/ltp/files/periodic_output.patch
new file mode 100644
index 0000000000..153fe83524
--- /dev/null
+++ b/meta/recipes-extended/ltp/files/periodic_output.patch
@@ -0,0 +1,31 @@
1Add periodic output for long time test.
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
7--- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 15:54:09.515049081 +0100
8+++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 22:32:15.587370406 +0100
9@@ -37,7 +37,8 @@
10 exit 0
11 fi
12
13-RUN_TIME=$(( 60 * 60 ))
14+ONE_MINUTE=60
15+RUN_TIME=60
16
17 cleanup()
18 {
19@@ -81,7 +82,11 @@
20 eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null
21 done
22
23- sleep $4
24+ for i in $(seq 0 $RUN_TIME-1)
25+ do
26+ eval echo "Started $i min ago. Still alive... "
27+ sleep $ONE_MINUTE
28+ done
29
30 for i in $(seq 0 $(($1-1)))
31 do
diff --git a/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch b/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch
new file mode 100644
index 0000000000..fa20b085f7
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch
@@ -0,0 +1,48 @@
1From b601a8d1b39075a5339195fc0a4038f71ec3b49e Mon Sep 17 00:00:00 2001
2From: "Gary S. Robertson" <gary.robertson@linaro.org>
3Date: Wed, 27 Aug 2014 16:23:56 -0500
4Subject: [LTP][PATCH] Realtime tests: Fix bad priority inheritance conditionals
5
6testcases/realtime/lib/librttest.c and
7testcases/realtime/stress/pi-tests/testpi-3.c
8both referenced a non-existent autoconf configuration setting variable.
9Replaced the invalid variable name with the variable actually created
10by autoconf.
11
12Upstream-Status: Submitted
13
14Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
15---
16 testcases/realtime/lib/librttest.c | 2 +-
17 testcases/realtime/stress/pi-tests/testpi-3.c | 2 +-
18 2 files changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/testcases/realtime/lib/librttest.c b/testcases/realtime/lib/librttest.c
21index c175148..3679058 100644
22--- a/testcases/realtime/lib/librttest.c
23+++ b/testcases/realtime/lib/librttest.c
24@@ -586,7 +586,7 @@ void *busy_work_us(int us)
25
26 void init_pi_mutex(pthread_mutex_t * m)
27 {
28-#if HAVE_DECL_PTHREAD_PRIO_INHERIT
29+#if HAS_PRIORITY_INHERIT
30 pthread_mutexattr_t attr;
31 int ret;
32 int protocol;
33diff --git a/testcases/realtime/stress/pi-tests/testpi-3.c b/testcases/realtime/stress/pi-tests/testpi-3.c
34index 30f38f6..e483945 100644
35--- a/testcases/realtime/stress/pi-tests/testpi-3.c
36+++ b/testcases/realtime/stress/pi-tests/testpi-3.c
37@@ -365,7 +365,7 @@ int main(int argc, char *argv[])
38
39 printf("Start %s\n", argv[0]);
40
41-#if HAVE_DECL_PTHREAD_PRIO_INHERIT
42+#if HAS_PRIORITY_INHERIT
43 if (!nopi) {
44 pthread_mutexattr_t mutexattr;
45 int protocol;
46--
471.7.9.5
48
diff --git a/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-robust-mutex-conditionals.patch b/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-robust-mutex-conditionals.patch
new file mode 100644
index 0000000000..ccdd4d0bb3
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-robust-mutex-conditionals.patch
@@ -0,0 +1,62 @@
1From 663a14423baea0e05ba79d90d2497dde5e4594bd Mon Sep 17 00:00:00 2001
2From: "Gary S. Robertson" <gary.robertson@linaro.org>
3Date: Thu, 11 Sep 2014 13:02:47 -0500
4Subject: [LTP][PATCH] Realtime tests: Fix robust mutex conditionals
5
6sbrk_mutex, testpi-5, and testpi-6 realtime tests in subdir
7testcases/realtime/func/pi-tests used compile time config variables
8which were not generated by autoconf in order to configure tests
9for robust mutexes. Changed these conditionals to use the config
10variables actually generated in the autoconf process.
11
12Upstream-Status: Submitted
13
14Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
15---
16 testcases/realtime/func/pi-tests/sbrk_mutex.c | 2 +-
17 testcases/realtime/func/pi-tests/testpi-5.c | 2 +-
18 testcases/realtime/func/pi-tests/testpi-6.c | 2 +-
19 3 files changed, 3 insertions(+), 3 deletions(-)
20
21diff --git a/testcases/realtime/func/pi-tests/sbrk_mutex.c b/testcases/realtime/func/pi-tests/sbrk_mutex.c
22index 684021f..5c325b4 100644
23--- a/testcases/realtime/func/pi-tests/sbrk_mutex.c
24+++ b/testcases/realtime/func/pi-tests/sbrk_mutex.c
25@@ -45,7 +45,7 @@
26 #include <unistd.h>
27 #include "librttest.h"
28
29-#if defined(HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS) && defined(PTHREAD_MUTEX_ROBUST_NP)
30+#if HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS
31
32 #define NUM_MUTEXES 5000
33 #define NUM_THREADS 50
34diff --git a/testcases/realtime/func/pi-tests/testpi-5.c b/testcases/realtime/func/pi-tests/testpi-5.c
35index a1d93cc..70f02fd 100644
36--- a/testcases/realtime/func/pi-tests/testpi-5.c
37+++ b/testcases/realtime/func/pi-tests/testpi-5.c
38@@ -69,7 +69,7 @@ int do_test(int argc, char **argv)
39 pthread_mutexattr_t mutexattr;
40 int retc, protocol;
41
42-#if HAS_PTHREAD_MUTEXATTR_PROTOCOL_FUNCTIONS
43+#if HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS
44
45 if (pthread_mutexattr_init(&mutexattr) != 0)
46 printf("Failed to init mutexattr\n");
47diff --git a/testcases/realtime/func/pi-tests/testpi-6.c b/testcases/realtime/func/pi-tests/testpi-6.c
48index b3c3e4a..f715eee 100644
49--- a/testcases/realtime/func/pi-tests/testpi-6.c
50+++ b/testcases/realtime/func/pi-tests/testpi-6.c
51@@ -41,7 +41,7 @@
52 #include <unistd.h>
53 #include <librttest.h>
54
55-#if defined(PTHREAD_MUTEX_ROBUST_NP)
56+#if HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS
57 pthread_mutex_t child_mutex;
58
59 void *child_thread(void *arg)
60--
611.7.9.5
62
diff --git a/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch b/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
new file mode 100644
index 0000000000..1b4d2324a5
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
@@ -0,0 +1,202 @@
1From 9751a6526cffcdf4e3dc2cb33641259a7be00e19 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sat, 7 Dec 2013 18:24:32 +0100
4Subject: [PATCH] Rename runtests_noltp.sh script so have unique name
5
6* they are installed in the same target path
7 /opt/ltp/testcases/bin/runtests_noltp.sh
8 and overwrite each other in non-deterministic way
9 when multiple processes are used in "make install"
10
11 ./temp/log.do_install:install -m 00775
12 "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/sysvipc/runtests_noltp.sh"
13 "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh"
14 ./temp/log.do_install:install -m 00775
15 "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/utsname/runtests_noltp.sh"
16 "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh"
17
18Upstream-Status: Pending
19
20Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
21---
22 .../kernel/containers/sysvipc/runipctests_noltp.sh | 31 ++++++++++++++++
23 .../kernel/containers/sysvipc/runtests_noltp.sh | 31 ----------------
24 .../kernel/containers/utsname/runtests_noltp.sh | 41 ----------------------
25 .../kernel/containers/utsname/runutstests_noltp.sh | 41 ++++++++++++++++++++++
26 4 files changed, 72 insertions(+), 72 deletions(-)
27 create mode 100644 testcases/kernel/containers/sysvipc/runipctests_noltp.sh
28 delete mode 100644 testcases/kernel/containers/sysvipc/runtests_noltp.sh
29 delete mode 100755 testcases/kernel/containers/utsname/runtests_noltp.sh
30 create mode 100755 testcases/kernel/containers/utsname/runutstests_noltp.sh
31
32diff --git a/testcases/kernel/containers/sysvipc/runipctests_noltp.sh b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh
33new file mode 100644
34index 0000000..84f398f
35--- /dev/null
36+++ b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh
37@@ -0,0 +1,31 @@
38+#!/bin/sh
39+################################################################################
40+## ##
41+## Copyright (c) International Business Machines Corp., 2007 ##
42+## ##
43+## This program is free software; you can redistribute it and#or modify ##
44+## it under the terms of the GNU General Public License as published by ##
45+## the Free Software Foundation; either version 2 of the License, or ##
46+## (at your option) any later version. ##
47+## ##
48+## This program is distributed in the hope that it will be useful, but ##
49+## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
50+## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
51+## for more details. ##
52+## ##
53+## You should have received a copy of the GNU General Public License ##
54+## along with this program; if not, write to the Free Software ##
55+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ##
56+## ##
57+################################################################################
58+
59+exit_code=0
60+echo "sysvipc tests"
61+for type in none clone unshare; do
62+ echo "**sysvipc $type"
63+ ./shmnstest_noltp $type
64+ if [ $? -ne 0 ]; then
65+ exit_code=$?
66+ fi
67+done
68+exit $exit_code
69diff --git a/testcases/kernel/containers/sysvipc/runtests_noltp.sh b/testcases/kernel/containers/sysvipc/runtests_noltp.sh
70deleted file mode 100644
71index 84f398f..0000000
72--- a/testcases/kernel/containers/sysvipc/runtests_noltp.sh
73+++ /dev/null
74@@ -1,31 +0,0 @@
75-#!/bin/sh
76-################################################################################
77-## ##
78-## Copyright (c) International Business Machines Corp., 2007 ##
79-## ##
80-## This program is free software; you can redistribute it and#or modify ##
81-## it under the terms of the GNU General Public License as published by ##
82-## the Free Software Foundation; either version 2 of the License, or ##
83-## (at your option) any later version. ##
84-## ##
85-## This program is distributed in the hope that it will be useful, but ##
86-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
87-## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
88-## for more details. ##
89-## ##
90-## You should have received a copy of the GNU General Public License ##
91-## along with this program; if not, write to the Free Software ##
92-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ##
93-## ##
94-################################################################################
95-
96-exit_code=0
97-echo "sysvipc tests"
98-for type in none clone unshare; do
99- echo "**sysvipc $type"
100- ./shmnstest_noltp $type
101- if [ $? -ne 0 ]; then
102- exit_code=$?
103- fi
104-done
105-exit $exit_code
106diff --git a/testcases/kernel/containers/utsname/runtests_noltp.sh b/testcases/kernel/containers/utsname/runtests_noltp.sh
107deleted file mode 100755
108index 43cb7e2..0000000
109--- a/testcases/kernel/containers/utsname/runtests_noltp.sh
110+++ /dev/null
111@@ -1,41 +0,0 @@
112-#!/bin/sh
113-################################################################################
114-## ##
115-## Copyright (c) International Business Machines Corp., 2007 ##
116-## ##
117-## This program is free software; you can redistribute it and#or modify ##
118-## it under the terms of the GNU General Public License as published by ##
119-## the Free Software Foundation; either version 2 of the License, or ##
120-## (at your option) any later version. ##
121-## ##
122-## This program is distributed in the hope that it will be useful, but ##
123-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
124-## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
125-## for more details. ##
126-## ##
127-## You should have received a copy of the GNU General Public License ##
128-## along with this program; if not, write to the Free Software ##
129-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ##
130-## ##
131-################################################################################
132-
133-oldhostname=`hostname`
134-exit_code=0
135-echo "unshare tests"
136-for i in `seq 1 5`; do
137- echo "test $i (unshare)"
138- ./utstest_noltp unshare $i
139- if [ $? -ne 0 ]; then
140- exit_code=$?
141- fi
142-done
143-echo "clone tests"
144-for i in `seq 1 5`; do
145- echo "test $i (clone)"
146- ./utstest_noltp clone $i
147- if [ $? -ne 0 ]; then
148- exit_code=$?
149- fi
150-done
151-hostname "$oldhostname"
152-exit $exit_code
153diff --git a/testcases/kernel/containers/utsname/runutstests_noltp.sh b/testcases/kernel/containers/utsname/runutstests_noltp.sh
154new file mode 100755
155index 0000000..43cb7e2
156--- /dev/null
157+++ b/testcases/kernel/containers/utsname/runutstests_noltp.sh
158@@ -0,0 +1,41 @@
159+#!/bin/sh
160+################################################################################
161+## ##
162+## Copyright (c) International Business Machines Corp., 2007 ##
163+## ##
164+## This program is free software; you can redistribute it and#or modify ##
165+## it under the terms of the GNU General Public License as published by ##
166+## the Free Software Foundation; either version 2 of the License, or ##
167+## (at your option) any later version. ##
168+## ##
169+## This program is distributed in the hope that it will be useful, but ##
170+## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
171+## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
172+## for more details. ##
173+## ##
174+## You should have received a copy of the GNU General Public License ##
175+## along with this program; if not, write to the Free Software ##
176+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ##
177+## ##
178+################################################################################
179+
180+oldhostname=`hostname`
181+exit_code=0
182+echo "unshare tests"
183+for i in `seq 1 5`; do
184+ echo "test $i (unshare)"
185+ ./utstest_noltp unshare $i
186+ if [ $? -ne 0 ]; then
187+ exit_code=$?
188+ fi
189+done
190+echo "clone tests"
191+for i in `seq 1 5`; do
192+ echo "test $i (clone)"
193+ ./utstest_noltp clone $i
194+ if [ $? -ne 0 ]; then
195+ exit_code=$?
196+ fi
197+done
198+hostname "$oldhostname"
199+exit $exit_code
200--
2011.8.4.3
202
diff --git a/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch b/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch
new file mode 100644
index 0000000000..064f00ae3d
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch
@@ -0,0 +1,39 @@
1[PATCH] add knob to control whether numa support should be checked
2
3Upstream-Status: Pending
4
5otherwise the random dependency will be generated
6
7Signed-off-by: Roy.Li <rongqing.li@windriver.com>
8---
9 configure.ac | 10 +-
10diff --git a/configure.ac b/configure.ac
11index 9f397e7..1357256 100644
12--- a/configure.ac
13+++ b/configure.ac
14@@ -142,6 +142,12 @@ else
15 AC_SUBST([WITH_REALTIME_TESTSUITE],["no"])
16 fi
17
18+AC_ARG_WITH([numa],
19+ AC_HELP_STRING([--without-numa],
20+ [without the numa support]),
21+ [],[with_numa=yes],
22+)
23+
24 AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2])
25
26 # END testsuites knobs
27@@ -159,7 +165,9 @@ LTP_CHECK_SIGNAL
28 LTP_CHECK_SYSCALL_EVENTFD
29 LTP_CHECK_SYSCALL_KEYCTL
30 LTP_CHECK_SYSCALL_MODIFY_LDT
31+if test "x$with_numa" = xyes; then
32 LTP_CHECK_SYSCALL_NUMA
33+fi
34 LTP_CHECK_SYSCALL_QUOTACTL
35 LTP_CHECK_SYSCALL_SIGNALFD
36 LTP_CHECK_SYSCALL_UNSHARE
37--
381.9.1
39
diff --git a/meta/recipes-extended/ltp/ltp/automake-foreign.patch b/meta/recipes-extended/ltp/ltp/automake-foreign.patch
new file mode 100644
index 0000000000..c3dd891395
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/automake-foreign.patch
@@ -0,0 +1,20 @@
1Use foreign strictness to avoid automake errors.
2
3Upstream-Status: Submitted (https://github.com/linux-test-project/ltp/issues/16)
4Signed-off-by: Ross Burton <ross.burton@intel.com>
5
6diff --git a/configure.ac b/configure.ac
7index 9f397e7..fc57957 100644
8--- a/configure.ac
9+++ b/configure.ac
10@@ -4 +4 @@
11-AM_INIT_AUTOMAKE
12+AM_INIT_AUTOMAKE([foreign])
13--- a/utils/ffsb-6.0-rc2/configure.in
14+++ b/utils/ffsb-6.0-rc2/configure.in
15@@ -2,2 +2,3 @@ dnl Process this file with autoconf to produce a configure script.
16-AC_INIT(main.c)
17-AM_INIT_AUTOMAKE(ffsb, 6.0-RC2)
18+AC_INIT([ffsb], [6.0-RC2])
19+AC_CONFIG_SRCDIR([main.c])
20+AM_INIT_AUTOMAKE([foreign])
diff --git a/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch b/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch
new file mode 100644
index 0000000000..20fd4c3691
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch
@@ -0,0 +1,31 @@
1From 5bda9c0af56869c6ff2c25d38ea087179c946bc6 Mon Sep 17 00:00:00 2001
2From: Chong Lu <Chong.Lu@windriver.com>
3Date: Tue, 11 Mar 2014 14:47:22 +0800
4Subject: [PATCH] ltp: Don't link against libfl
5
6We have already defined yywrap function in scan.l file. After this, we no longer need to
7link against libfl and so no longer get errors about undefined references to yylex.
8
9Upstream-Status: Pending
10
11Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
12---
13 pan/Makefile | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/pan/Makefile b/pan/Makefile
17index 4cc6466..a4b575b 100644
18--- a/pan/Makefile
19+++ b/pan/Makefile
20@@ -31,7 +31,7 @@ CPPFLAGS += -Wno-error
21
22 CPPFLAGS += -I$(abs_srcdir)
23
24-LDLIBS += -lm $(LEXLIB)
25+LDLIBS += -lm
26
27 LFLAGS += -l
28
29--
301.7.9.5
31
diff --git a/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch b/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch
new file mode 100644
index 0000000000..4836010bdf
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch
@@ -0,0 +1,61 @@
1[PATCH] make setregid02 work
2
3Upstream-Status: Inappropriate [configuration]
4
5there is no "nobody" group in oe-core, the user "nobody" belongs to
6"nogroup" group, so replace nobody with nogroup to make the test pass
7
8Signed-off-by: Roy.Li <rongqing.li@windriver.com>
9---
10 testcases/kernel/syscalls/setregid/setregid02.c | 16 ++++++++--------
11 1 file changed, 8 insertions(+), 8 deletions(-)
12
13diff --git a/testcases/kernel/syscalls/setregid/setregid02.c b/testcases/kernel/syscalls/setregid/setregid02.c
14index 8058627..866bee4 100644
15--- a/testcases/kernel/syscalls/setregid/setregid02.c
16+++ b/testcases/kernel/syscalls/setregid/setregid02.c
17@@ -41,7 +41,7 @@ static gid_t neg_one = -1;
18
19 static struct passwd *ltpuser;
20
21-static struct group nobody, root, bin;
22+static struct group nogroup, root, bin;
23
24 /*
25 * The following structure contains all test data. Each structure in the array
26@@ -57,17 +57,17 @@ struct test_data_t {
27 char *test_msg;
28 } test_data[] = {
29 {
30- &neg_one, &root.gr_gid, EPERM, &nobody, &nobody,
31+ &neg_one, &root.gr_gid, EPERM, &nogroup, &nogroup,
32 "After setregid(-1, root),"}, {
33- &neg_one, &bin.gr_gid, EPERM, &nobody, &nobody,
34+ &neg_one, &bin.gr_gid, EPERM, &nogroup, &nogroup,
35 "After setregid(-1, bin)"}, {
36- &root.gr_gid, &neg_one, EPERM, &nobody, &nobody,
37+ &root.gr_gid, &neg_one, EPERM, &nogroup, &nogroup,
38 "After setregid(root,-1),"}, {
39- &bin.gr_gid, &neg_one, EPERM, &nobody, &nobody,
40+ &bin.gr_gid, &neg_one, EPERM, &nogroup, &nogroup,
41 "After setregid(bin, -1),"}, {
42- &root.gr_gid, &bin.gr_gid, EPERM, &nobody, &nobody,
43+ &root.gr_gid, &bin.gr_gid, EPERM, &nogroup, &nogroup,
44 "After setregid(root, bin)"}, {
45- &bin.gr_gid, &root.gr_gid, EPERM, &nobody, &nobody,
46+ &bin.gr_gid, &root.gr_gid, EPERM, &nogroup, &nogroup,
47 "After setregid(bin, root),"}
48 };
49
50@@ -165,7 +165,7 @@ static void setup(void)
51 } while (0)
52
53 GET_GID(root);
54- GET_GID(nobody);
55+ GET_GID(nogroup);
56 GET_GID(bin);
57
58 TEST_PAUSE;
59--
601.9.1
61
diff --git a/meta/recipes-extended/ltp/ltp_20140422.bb b/meta/recipes-extended/ltp/ltp_20140422.bb
new file mode 100644
index 0000000000..0632f11ad8
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp_20140422.bb
@@ -0,0 +1,93 @@
1SUMMARY = "Linux Test Project"
2DESCRIPTION = "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."
3HOMEPAGE = "http://ltp.sourceforge.net"
4SECTION = "console/utils"
5LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause"
6LIC_FILES_CHKSUM = "\
7 file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
8 file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
9 file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \
10 file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
11 file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
12 file://testcases/open_posix_testsuite/COPYING;md5=216e43b72efbe4ed9017cc19c4c68b01 \
13 file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
14 file://tools/netpipe-2.4/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \
15 file://tools/netpipe-2.4-ipv6/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \
16 file://tools/top-LTP/proc/COPYING;md5=aefc88eb8a41672fbfcfe6b69ab8c49c \
17 file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
18 file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
19 file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \
20"
21
22DEPENDS = "attr libaio libcap acl openssl zip-native"
23SRCREV = "f4c3bfe1eab51eb72caeb0f3336d2790c9a8bd1b"
24
25SRC_URI = "git://github.com/linux-test-project/ltp.git \
26 file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \
27 file://periodic_output.patch \
28 file://ltp-Do-not-link-against-libfl.patch \
29 file://automake-foreign.patch \
30 file://make-setregid02-work.patch \
31 file://add-knob-for-numa.patch \
32 file://0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch \
33 file://0001-Realtime-tests-Fix-robust-mutex-conditionals.patch \
34 file://fix-test_proc_kill-hang.patch \
35"
36
37S = "${WORKDIR}/git"
38
39inherit autotools-brokensep
40
41TARGET_CC_ARCH += "${LDFLAGS}"
42
43export prefix = "/opt/ltp"
44export exec_prefix = "/opt/ltp"
45
46PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl,"
47EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
48EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite "
49
50# ltp doesn't regenerate ffsb-6.0-rc2 configure and hardcode configure call.
51# we explicitly force regeneration of that directory and pass configure options.
52do_configure_append() {
53 (cd utils/ffsb-6.0-rc2; autoreconf -fvi; ./configure ${CONFIGUREOPTS})
54}
55
56# The makefiles make excessive use of make -C and several include testcases.mk
57# which triggers a build of the syscall header. To reproduce, build ltp,
58# then delete the header, then "make -j XX" and watch regen.sh run multiple
59# times. Its easier to generate this once here instead.
60do_compile_prepend () {
61 ( make -C ${B}/testcases/kernel include/linux_syscall_numbers.h )
62}
63
64do_install(){
65 install -d ${D}/opt/ltp/
66 oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install
67
68 # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
69 cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
70
71 # We need to remove all scripts which depend on /usr/bin/expect, since expect is not supported in oe-core
72 # We will add expect for enhancement in future
73 find ${D} -type f -print | xargs grep "\!.*\/usr\/bin\/expect" | awk -F":" '{print $1}' | xargs rm -f
74}
75
76RDEPENDS_${PN} = "perl e2fsprogs-mke2fs python-core libaio bash gawk"
77
78FILES_${PN}-dbg += "\
79 /opt/ltp/runtest/.debug \
80 /opt/ltp/testcases/bin/.debug \
81 /opt/ltp/testcases/bin/*/bin/.debug \
82 /opt/ltp/testcases/bin/*/test/.debug \
83 /opt/ltp/scenario_groups/.debug \
84 /opt/ltp/testscripts/.debug \
85 /opt/ltp/testscripts/open_posix_testsuite/.debug \
86"
87
88FILES_${PN}-staticdev += "/opt/ltp/lib/libmem.a"
89
90FILES_${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/*"
91
92# Avoid generated binaries stripping. Otherwise some of the ltp tests such as ldd01 & nm01 fails
93INHIBIT_PACKAGE_STRIP = "1"