summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorGary S. Robertson <gary.robertson@linaro.org>2014-10-03 10:17:48 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-10-06 15:15:51 +0100
commit5c0b727903df25b701e6dc0444262ad047b5f045 (patch)
tree3c3fa6256c946df9230a6d746f334584c83a7cb0 /meta
parentfbcab6ee63afcd5cdaf75665ce91906243df74a2 (diff)
downloadpoky-5c0b727903df25b701e6dc0444262ad047b5f045.tar.gz
LTP - realtime tests - fix bad robust mutex conditionals
The tests for robust mutexes contained conditional clauses which failed in autoconf and/or used nonexistent variable names. Modified these conditional clauses to use only the variables actually created by LTP autoconf for this purpose. (From OE-Core rev: c0189ef8b58b1e63e227c5040cb1c9e915f225c2) Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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"