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/ltp/0001-Realtime-tests-Fix-robust-mutex-conditionals.patch62
-rw-r--r--meta/recipes-extended/ltp/ltp_20140422.bb1
2 files changed, 63 insertions, 0 deletions
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_20140422.bb b/meta/recipes-extended/ltp/ltp_20140422.bb
index 499b26311c..5deaabf663 100644
--- a/meta/recipes-extended/ltp/ltp_20140422.bb
+++ b/meta/recipes-extended/ltp/ltp_20140422.bb
@@ -29,6 +29,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
29 file://make-setregid02-work.patch \ 29 file://make-setregid02-work.patch \
30 file://add-knob-for-numa.patch \ 30 file://add-knob-for-numa.patch \
31 file://0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch \ 31 file://0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch \
32 file://0001-Realtime-tests-Fix-robust-mutex-conditionals.patch \
32" 33"
33 34
34S = "${WORKDIR}/git" 35S = "${WORKDIR}/git"